Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » SaveParticipant for multiple plugins?
SaveParticipant for multiple plugins? [message #306303] Wed, 26 July 2006 12:38 Go to next message
Eclipse UserFriend
Originally posted by: blackdrag.gmx.org

hi,

I am currently thinking about creating a plugin. For this I need to
parse the constents of ceretain file types and then display my results
in a view. I think I can get the files, but I need to know when they are
changed. Or at last, when they are saved.

I found out I may have to register a ISaveParticipant like

ResourcesPlugin.getWorkspace().addSaveParticipant(plugin, saveParticipant);

but then I need to know the plugin. But maybe I need only one plugin,
and just need to know which one. Maybe someone could be of help here. Or
maybe that is totaly wrong to do?

bye blackdrag
Re: SaveParticipant for multiple plugins? [message #306393 is a reply to message #306303] Thu, 27 July 2006 16:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: blackdrag.gmx.org

Jochen Theodorou schrieb:
> hi,
>
> I am currently thinking about creating a plugin. For this I need to
> parse the constents of ceretain file types and then display my results
> in a view. I think I can get the files, but I need to know when they are
> changed. Or at last, when they are saved.
>
> I found out I may have to register a ISaveParticipant like
>
> ResourcesPlugin.getWorkspace().addSaveParticipant(plugin, saveParticipant);
>
> but then I need to know the plugin. But maybe I need only one plugin,
> and just need to know which one. Maybe someone could be of help here. Or
> maybe that is totaly wrong to do?


looks like nobody knows an answer to this... maybe someone can give me
hints on where to search? Or should I try a different group?

bye blackdrag
Re: SaveParticipant for multiple plugins? [message #306428 is a reply to message #306393] Fri, 28 July 2006 12:27 Go to previous messageGo to next message
Eclipse UserFriend
to listen for changes to file(s), usually you use an
IResourceChangeListener ...


AFAIK, ISaveParticipant is about having your plugin participate in any
workbench save requests (like on session close).

Later,
PW
Re: SaveParticipant for multiple plugins? [message #306458 is a reply to message #306428] Sun, 30 July 2006 06:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: blackdrag.gmx.org

Paul Webster schrieb:
> to listen for changes to file(s), usually you use an
> IResourceChangeListener ...
>
> AFAIK, ISaveParticipant is about having your plugin participate in any
> workbench save requests (like on session close).

ok, so I make something like this:

IResourceChangeListener listener = new MyResourceChangeReporter();
ResourcesPlugin.getWorkspace().addResourceChangeListener(lis tener);

then I start a new workbench, I see that these lines are executed, I
open a file, I change it, I save it... and nothing.

So what am I doing wrong?

bye blackdrag
Re: SaveParticipant for multiple plugins? [message #306473 is a reply to message #306458] Mon, 31 July 2006 08:29 Go to previous messageGo to next message
Eclipse UserFriend
Jochen Theodorou wrote:
>
> ok, so I make something like this:
>
> IResourceChangeListener listener = new MyResourceChangeReporter();
> ResourcesPlugin.getWorkspace().addResourceChangeListener(lis tener);
>
> then I start a new workbench, I see that these lines are executed, I
> open a file, I change it, I save it... and nothing.
>
> So what am I doing wrong?

Dunno ... check out the Platform plug-in Developers Guide (Help>Help
Contents) for an example of using the resource change listeners.

Also, Did you debug and see your code executed? Most plugins are loaded
unless there's some kind of user action to start them.

Later,
PW
Re: SaveParticipant for multiple plugins? [message #306481 is a reply to message #306473] Mon, 31 July 2006 09:26 Go to previous messageGo to next message
Eclipse UserFriend
Paul Webster wrote:
> Also, Did you debug and see your code executed? Most plugins are loaded
> unless there's some kind of user action to start them.


Oooop, must plugins *aren't* loaded unless there's some kind ...

PW
Re: SaveParticipant for multiple plugins? [message #306516 is a reply to message #306473] Tue, 01 August 2006 06:02 Go to previous message
Eclipse UserFriend
Originally posted by: blackdrag.gmx.org

Paul Webster schrieb:
> Jochen Theodorou wrote:
>>
>> ok, so I make something like this:
>>
>> IResourceChangeListener listener = new MyResourceChangeReporter();
>> ResourcesPlugin.getWorkspace().addResourceChangeListener(lis tener);
>>
>> then I start a new workbench, I see that these lines are executed, I
>> open a file, I change it, I save it... and nothing.
>>
>> So what am I doing wrong?
>
> Dunno ...

stupid me, I do always forget that workspace centric view of eclipse. No
workspaces, no listener. After making a new project and adding a file
there it worked like a charm! thx for the help

bye blackdrag
Previous Topic:Test
Next Topic:Getting your markers added to "Java Problem Type" in 3.2?
Goto Forum:
  


Current Time: Sat Jul 19 12:32:30 EDT 2025

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

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

Back to the top