Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » WorkspaceModifyOperation does not generate the events(In an RCP application the WorkspaceModifyOperation does not generate events)
WorkspaceModifyOperation does not generate the events [message #902392] Fri, 17 August 2012 12:43
Yigal Spinner is currently offline Yigal Spinner
Messages: 102
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?
Previous Topic:how to enable/disable Common Filters in Common Navigator (CNF)
Next Topic:beforeEditorActivated: Never double-click
Goto Forum:
  


Current Time: Thu Sep 18 11:57:08 GMT 2014

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

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