Commit 010a7681 authored by Johannes Roith's avatar Johannes Roith

add build observer.

parent d5e80e20
package de.tum.in.www2.cupplugin;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.eclipse.core.resources.IWorkspace;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
public class DebugListener implements IResourceChangeListener {
public void resourceChanged(IResourceChangeEvent event) {
System.out.println("GOT EVENT: " + event.getType());
if (event.getType() != IResourceChangeEvent.POST_BUILD)
return;
System.out.println("GOT POST BUILD EVENT!");
}
}
// The plug-in ID
public static final String PLUGIN_ID = "CupPlugin"; //$NON-NLS-1$
......@@ -19,6 +35,8 @@ public class Activator extends AbstractUIPlugin {
* The constructor
*/
public Activator() {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
workspace.addResourceChangeListener(new DebugListener());
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment