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 Herz
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 Rizzo
Messages: 2313
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: Thu Oct 23 20:50:49 GMT 2014

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

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