[153150] Created testcase for this bug and fixed that JEM was marked as in UI  context only when WTP is installed. Added usage of uiTester extension point to jem.ui so that if ui active it will ui context. Also fixed UIContextDetermination because it used the same value for both unknown context and ui context, so that when in UI it will reprocess the extension point on every single jem call because even though we had set it to UI it thought it was unknown.
diff --git a/plugins/org.eclipse.jem.ui/plugin.xml b/plugins/org.eclipse.jem.ui/plugin.xml
index 1145888..e58a61e 100644
--- a/plugins/org.eclipse.jem.ui/plugin.xml
+++ b/plugins/org.eclipse.jem.ui/plugin.xml
@@ -130,5 +130,9 @@
             id="org.eclipse.jem.beaninfo.OverrideEditor">
       </editor>
    </extension>
+   <extension
+         point="org.eclipse.jem.util.uiTester">
+      <uiTester className="org.eclipse.jem.internal.ui.core.UITester"/>
+   </extension>
 
 </plugin>
diff --git a/plugins/org.eclipse.jem.ui/ui/org/eclipse/jem/internal/ui/core/UITester.java b/plugins/org.eclipse.jem.ui/ui/org/eclipse/jem/internal/ui/core/UITester.java
new file mode 100644
index 0000000..5c1dbc5
--- /dev/null
+++ b/plugins/org.eclipse.jem.ui/ui/org/eclipse/jem/internal/ui/core/UITester.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ *  $RCSfile: UITester.java,v $
+ *  $Revision: 1.1 $  $Date: 2006/08/09 15:38:16 $ 
+ */
+package org.eclipse.jem.internal.ui.core;
+
+import org.eclipse.ui.PlatformUI;
+ 
+
+/**
+ * Tests if UI is active, and if it is, it will return true.
+ * @since 1.2.1
+ */
+public class UITester implements org.eclipse.jem.util.UITester {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jem.util.UITester#isCurrentContextUI()
+	 */
+	public boolean isCurrentContextUI() {
+		return PlatformUI.isWorkbenchRunning();
+	}
+
+}