Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dr. Michael Petter
CUP Eclipse Plugin
Commits
010a7681
Commit
010a7681
authored
Nov 27, 2014
by
Johannes Roith
Browse files
add build observer.
parent
d5e80e20
Changes
1
Show whitespace changes
Inline
Side-by-side
CupPlugin/src/de/tum/in/www2/cupplugin/Activator.java
View file @
010a7681
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
());
}
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment