Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Pre and post build events on project

Hello,

I am migrating my plugin to indigo and cdt 8.

I have a following chunk of code in the startup class:

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IResourceChangeListener listener = new RessourceChangeListener();
workspace.addResourceChangeListener(listener,
IResourceChangeEvent.PRE_BUILD |  IResourceChangeEvent.POST_BUILD);

Now in the listener itself following code gets called:

public void resourceChanged(IResourceChangeEvent event) {
		System.out.println("source: "+event.getSource().getClass().toString());
...

The problem is that since the update I am only getting "workspace" as
source of the event. Even if I press build in the CDT project window.
In the earlier versions I was getting Workspace only if I made "Build
All", in other cases I was getting a Project object of the initial
project to build.

Is it a desired behaviour or a bug? What is causing this CDT or Indigo?

Regards
Sten


Back to the top