Bug 506820: avoid running callin marker creator during tests
diff --git a/plugins/org.eclipse.objectteams.otdt.ui/src/org/eclipse/objectteams/otdt/ui/OTDTUIPlugin.java b/plugins/org.eclipse.objectteams.otdt.ui/src/org/eclipse/objectteams/otdt/ui/OTDTUIPlugin.java
index c27b5c7..94ac225 100644
--- a/plugins/org.eclipse.objectteams.otdt.ui/src/org/eclipse/objectteams/otdt/ui/OTDTUIPlugin.java
+++ b/plugins/org.eclipse.objectteams.otdt.ui/src/org/eclipse/objectteams/otdt/ui/OTDTUIPlugin.java
@@ -39,6 +39,7 @@
 import org.eclipse.objectteams.otdt.internal.ui.preferences.GeneralPreferences;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
@@ -121,9 +122,10 @@
         
         registerAdapter();
 
-        addJavaElementChangedListeners();
-
-        getCallinMarkerCreator(); // initialize
+        if (PlatformUI.isWorkbenchRunning()) { // not running during headless tests, e.g.
+        	addJavaElementChangedListeners();
+        	getCallinMarkerCreator(); // initialize
+        }
     }
     
     public void stop(BundleContext context) throws Exception