Deleting projects [message #286120] |
Thu, 02 June 2005 20:09 |
Eclipse User |
|
|
|
Originally posted by: torkildr.tihlde.org
I want my plugin to be notified when a project is being deleted so that I
can remove all the metadata. Considering that all resource changes are
caught by my IncrementalProjectBuilder I was guessing that I can trap
project deletions there, but that does not seem to be the case. Am I doing
something wrong or should I use a ResourceChangeListener for this?
--
Med vennlig hilsen / Kind regards ((
Torkild Ulvøy Resheim, Senior Systemutvikler / Software Engineer ))
Emma EDB AS, Trondheim, Norway. http://www.emmaedb.no |----|_
Private pages: http://resheim.no - "Any sufficiently advanced | | )
bug is indistinguishable from a feature." |____|'
|
|
|
Re: Deleting projects [message #286122 is a reply to message #286120] |
Thu, 02 June 2005 21:01 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
There is a way of storing the metadata on a per project basis. In that
case the metadata will be deleted at the same time as the project for
you automatically.
To put something in the project metadata area use:
IPath data = iproject.getWorkingLocation("yourpluginid/whatever-you-want ");
This will return an absolute file path that is per project.
Torkild Ulvøy Resheim wrote:
> I want my plugin to be notified when a project is being deleted so that I
> can remove all the metadata. Considering that all resource changes are
> caught by my IncrementalProjectBuilder I was guessing that I can trap
> project deletions there, but that does not seem to be the case. Am I doing
> something wrong or should I use a ResourceChangeListener for this?
--
Thanks,
Rich Kulp
|
|
|
Re: Deleting projects [message #286144 is a reply to message #286122] |
Fri, 03 June 2005 05:38 |
Eclipse User |
|
|
|
Originally posted by: torkildr.tihlde.org
Rich Kulp wrote:
> There is a way of storing the metadata on a per project basis. In that
> case the metadata will be deleted at the same time as the project for
> you automatically.
>
> To put something in the project metadata area use:
>
> IPath data =
> iproject.getWorkingLocation("yourpluginid/whatever-you-want ");
>
> This will return an absolute file path that is per project.
Hi Rich,
Ah... that looks like something I need to investigate. So far I've been
using the plugin's working location. However I also need to remove data
from memory at the same time. Maybe I should just implement the
ResourceChangeListener. It's pretty straightforward so there is not a big
deal if I need to change it.
[snip]
Thanks :-)
--
Med vennlig hilsen / Kind regards ((
Torkild Ulvøy Resheim, Senior Systemutvikler / Software Engineer ))
Emma EDB AS, Trondheim, Norway. http://www.emmaedb.no |----|_
Private pages: http://resheim.no - "Any sufficiently advanced | | )
bug is indistinguishable from a feature." |____|'
|
|
|
Re: Deleting projects [message #286162 is a reply to message #286144] |
Fri, 03 June 2005 12:49 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
You should probably put your project in the project metadata area and
use the resource listener for in-memory. This is because it is possible
to have the project deleted before anything caused your plugin to be
activated. In that case you would not have a listener. So the data would
still automatically go away then.
Torkild Ulvøy Resheim wrote:
> Rich Kulp wrote:
>
>
>>There is a way of storing the metadata on a per project basis. In that
>>case the metadata will be deleted at the same time as the project for
>>you automatically.
>>
>>To put something in the project metadata area use:
>>
>>IPath data =
>>iproject.getWorkingLocation("yourpluginid/whatever-you-want ");
>>
>>This will return an absolute file path that is per project.
>
> Hi Rich,
>
> Ah... that looks like something I need to investigate. So far I've been
> using the plugin's working location. However I also need to remove data
> from memory at the same time. Maybe I should just implement the
> ResourceChangeListener. It's pretty straightforward so there is not a big
> deal if I need to change it.
>
> [snip]
>
> Thanks :-)
--
Thanks,
Rich Kulp
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03140 seconds