Timingproblem with IResourceChangeListener [message #503653] |
Tue, 15 December 2009 03:48  |
Eclipse User |
|
|
|
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 04:14  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04328 seconds