Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Timingproblem with IResourceChangeListener
Timingproblem with IResourceChangeListener [message #503653] Tue, 15 December 2009 08:48 Go to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi,

I have implement a IResourceChangeListener for my own file types.

Unfortunately I receive the change event if I save the file with my own
editor. It is not possible for me to differ if I save the
file with my own editor or if the file has been changed outside of eclipse.

My code sequence is like this:

....save(....)
{
IWorkspace workspace = ResourcesPlugin.getWorkspace();
workspace.removeResourceChangeListener(myResourceChangeListe ner);

<< code to save my model files >>
IFile modelFile = JacobDesigner.getPlugin().getModelFile();
modelFile.setContents( stringBufferInputStream, true,true, null);


workspace.addResourceChangeListener(myResourceChangeListener );
}

Any idea?


Greetings

Andreas
Re: Timingproblem with IResourceChangeListener [message #503724 is a reply to message #503653] Tue, 15 December 2009 09:14 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 12/15/09 3:48 AM, FreeGroup wrote:
> Hi,
>
> I have implement a IResourceChangeListener for my own file types.
>
> Unfortunately I receive the change event if I save the file with my own
> editor. It is not possible for me to differ if I save the
> file with my own editor or if the file has been changed outside of eclipse.
>
> My code sequence is like this:
>
> ...save(....)
> {
> IWorkspace workspace = ResourcesPlugin.getWorkspace();
> workspace.removeResourceChangeListener(myResourceChangeListe ner);
>
> << code to save my model files >>
> IFile modelFile = JacobDesigner.getPlugin().getModelFile();
> modelFile.setContents( stringBufferInputStream, true,true, null);
>
>
> workspace.addResourceChangeListener(myResourceChangeListener );
> }
>
> Any idea?


Maybe it's just me, but I don't think you've described the problem.
You've described an observed behavior, but I think that is intentional,
by-design behavior. What is it that you are trying to accomplish that is
incompatible with the behavior you've observed?

Eric
Previous Topic:Creating a Custom Eclipse Compare Editor
Next Topic:Environment problem in plugin
Goto Forum:
  


Current Time: Fri Apr 19 07:11:17 GMT 2024

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

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

Back to the top