WorkspaceModifyOperation does not generate the events [message #902392] |
Fri, 17 August 2012 12:43 |
Yigal Spinner Messages: 127 Registered: July 2009 |
Senior Member |
|
|
I'm a little new to RCP.
I created an RCP project that utilizes the the project explorer.
In my wizard I used WorkspaceModifyOperation to create new files in the current project.
I expected the WorkspaceModifyOperation to generate the resource change event on the creation, modify or deleting of any file. However in my editor I do not get any event.
In my editor I have the code:
protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() {
public void resourceChanged(IResourceChangeEvent event) {
System.out.println("Resource event: "+event);
};
@Override
public void init(IEditorSite site, IEditorInput editorInput) {
setSite(site);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
site.getPage().addPartListener(partListener);
ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
}
If I refresh the project (F5), I get the event as expected.
Am I missing some initialization code that will generate the events to the listeners automatically?
|
|
|
Powered by
FUDForum. Page generated in 0.03374 seconds