Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Deleting projects
Deleting projects [message #286120] Thu, 02 June 2005 20:09 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Deleting projects [message #286164 is a reply to message #286162] Fri, 03 June 2005 12:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Also, this article may be useful to you. It is about resource change
listening:

http://eclipse.org/articles/Article-Resource-deltas/resource -deltas.html

--
Thanks,
Rich Kulp
Re: Deleting projects [message #286253 is a reply to message #286164] Mon, 06 June 2005 09:31 Go to previous message
Eclipse UserFriend
Originally posted by: torkildr.tihlde.org

Rich Kulp wrote:

> Also, this article may be useful to you. It is about resource change
> listening:
>
> http://eclipse.org/articles/Article-Resource-deltas/resource -deltas.html
>
Thanks :-) I've implemented the ResourceChangeListener and it all works
well. Now I just need to move the metadata.
--
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." |____|'
Previous Topic:Full path from SaveAsDialog
Next Topic:Path to resources
Goto Forum:
  


Current Time: Wed Dec 04 03:12:36 GMT 2024

Powered by FUDForum. Page generated in 0.03140 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top