Bug 444572. Implemented get-property active for editors.
Fixed workbench provider manager to throw early on errors.
diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/Editor.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/Editor.java
index 3e12ff6..f3745e5 100644
--- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/Editor.java
+++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/Editor.java
@@ -22,6 +22,7 @@
  *   <li>{@link org.eclipse.rcptt.tesla.core.ui.Editor#getTitle <em>Title</em>}</li>
  *   <li>{@link org.eclipse.rcptt.tesla.core.ui.Editor#getInput <em>Input</em>}</li>
  *   <li>{@link org.eclipse.rcptt.tesla.core.ui.Editor#isDirty <em>Dirty</em>}</li>
+ *   <li>{@link org.eclipse.rcptt.tesla.core.ui.Editor#isActive <em>Active</em>}</li>
  * </ul>
  * </p>
  *
@@ -108,4 +109,30 @@
 	 */
 	void setDirty(boolean value);
 
+	/**
+	 * Returns the value of the '<em><b>Active</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Active</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Active</em>' attribute.
+	 * @see #setActive(boolean)
+	 * @see org.eclipse.rcptt.tesla.core.ui.UiPackage#getEditor_Active()
+	 * @model required="true"
+	 * @generated
+	 */
+	boolean isActive();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.rcptt.tesla.core.ui.Editor#isActive <em>Active</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Active</em>' attribute.
+	 * @see #isActive()
+	 * @generated
+	 */
+	void setActive(boolean value);
+
 } // Editor
diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/UiPackage.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/UiPackage.java
index 489dc72..8929aef 100644
--- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/UiPackage.java
+++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/UiPackage.java
@@ -3740,13 +3740,22 @@
 	int EDITOR__DIRTY = CONTROL_FEATURE_COUNT + 2;
 
 	/**
+	 * The feature id for the '<em><b>Active</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int EDITOR__ACTIVE = CONTROL_FEATURE_COUNT + 3;
+
+	/**
 	 * The number of structural features of the '<em>Editor</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EDITOR_FEATURE_COUNT = CONTROL_FEATURE_COUNT + 3;
+	int EDITOR_FEATURE_COUNT = CONTROL_FEATURE_COUNT + 4;
 
 	/**
 	 * The feature id for the '<em><b>Property Nodes</b></em>' containment reference list.
@@ -6115,6 +6124,17 @@
 	EAttribute getEditor_Dirty();
 
 	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.rcptt.tesla.core.ui.Editor#isActive <em>Active</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Active</em>'.
+	 * @see org.eclipse.rcptt.tesla.core.ui.Editor#isActive()
+	 * @see #getEditor()
+	 * @generated
+	 */
+	EAttribute getEditor_Active();
+
+	/**
 	 * Returns the meta object for class '{@link org.eclipse.rcptt.tesla.core.ui.Window <em>Window</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -8046,6 +8066,14 @@
 		EAttribute EDITOR__DIRTY = eINSTANCE.getEditor_Dirty();
 
 		/**
+		 * The meta object literal for the '<em><b>Active</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute EDITOR__ACTIVE = eINSTANCE.getEditor_Active();
+
+		/**
 		 * The meta object literal for the '{@link org.eclipse.rcptt.tesla.core.ui.impl.WindowImpl <em>Window</em>}' class.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/EditorImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/EditorImpl.java
index 40fc153..4fd67fa 100644
--- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/EditorImpl.java
+++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/EditorImpl.java
@@ -29,6 +29,7 @@
  *   <li>{@link org.eclipse.rcptt.tesla.core.ui.impl.EditorImpl#getTitle <em>Title</em>}</li>
  *   <li>{@link org.eclipse.rcptt.tesla.core.ui.impl.EditorImpl#getInput <em>Input</em>}</li>
  *   <li>{@link org.eclipse.rcptt.tesla.core.ui.impl.EditorImpl#isDirty <em>Dirty</em>}</li>
+ *   <li>{@link org.eclipse.rcptt.tesla.core.ui.impl.EditorImpl#isActive <em>Active</em>}</li>
  * </ul>
  * </p>
  *
@@ -96,6 +97,26 @@
 	protected boolean dirty = DIRTY_EDEFAULT;
 
 	/**
+	 * The default value of the '{@link #isActive() <em>Active</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isActive()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean ACTIVE_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isActive() <em>Active</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isActive()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean active = ACTIVE_EDEFAULT;
+
+	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -182,6 +203,27 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public boolean isActive() {
+		return active;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setActive(boolean newActive) {
+		boolean oldActive = active;
+		active = newActive;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, UiPackage.EDITOR__ACTIVE, oldActive, active));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
@@ -191,6 +233,8 @@
 				return getInput();
 			case UiPackage.EDITOR__DIRTY:
 				return isDirty();
+			case UiPackage.EDITOR__ACTIVE:
+				return isActive();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -212,6 +256,9 @@
 			case UiPackage.EDITOR__DIRTY:
 				setDirty((Boolean)newValue);
 				return;
+			case UiPackage.EDITOR__ACTIVE:
+				setActive((Boolean)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -233,6 +280,9 @@
 			case UiPackage.EDITOR__DIRTY:
 				setDirty(DIRTY_EDEFAULT);
 				return;
+			case UiPackage.EDITOR__ACTIVE:
+				setActive(ACTIVE_EDEFAULT);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -251,6 +301,8 @@
 				return INPUT_EDEFAULT == null ? input != null : !INPUT_EDEFAULT.equals(input);
 			case UiPackage.EDITOR__DIRTY:
 				return dirty != DIRTY_EDEFAULT;
+			case UiPackage.EDITOR__ACTIVE:
+				return active != ACTIVE_EDEFAULT;
 		}
 		return super.eIsSet(featureID);
 	}
@@ -271,6 +323,8 @@
 		result.append(input);
 		result.append(", dirty: ");
 		result.append(dirty);
+		result.append(", active: ");
+		result.append(active);
 		result.append(')');
 		return result.toString();
 	}
diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/UiFactoryImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/UiFactoryImpl.java
index ff4b66e..567b310 100644
--- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/UiFactoryImpl.java
+++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/UiFactoryImpl.java
@@ -37,7 +37,7 @@
 	 */
 	public static UiFactory init() {
 		try {
-			UiFactory theUiFactory = (UiFactory)EPackage.Registry.INSTANCE.getEFactory("http://eclipse.org/rcptt/tesla/widgets"); 
+			UiFactory theUiFactory = (UiFactory)EPackage.Registry.INSTANCE.getEFactory(UiPackage.eNS_URI);
 			if (theUiFactory != null) {
 				return theUiFactory;
 			}
diff --git a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/UiPackageImpl.java b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/UiPackageImpl.java
index 0f603be..d7b583d 100644
--- a/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/UiPackageImpl.java
+++ b/core/org.eclipse.rcptt.tesla.core/gen-src/org/eclipse/rcptt/tesla/core/ui/impl/UiPackageImpl.java
@@ -1858,6 +1858,15 @@
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
+	public EAttribute getEditor_Active() {
+		return (EAttribute)editorEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
 	public EClass getWindow() {
 		return windowEClass;
 	}
@@ -2583,6 +2592,7 @@
 		createEAttribute(editorEClass, EDITOR__TITLE);
 		createEAttribute(editorEClass, EDITOR__INPUT);
 		createEAttribute(editorEClass, EDITOR__DIRTY);
+		createEAttribute(editorEClass, EDITOR__ACTIVE);
 
 		windowEClass = createEClass(WINDOW);
 		createEAttribute(windowEClass, WINDOW__TITLE);
@@ -2906,6 +2916,7 @@
 		initEAttribute(getEditor_Title(), ecorePackage.getEString(), "title", null, 0, 1, Editor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getEditor_Input(), ecorePackage.getEString(), "input", null, 0, 1, Editor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getEditor_Dirty(), ecorePackage.getEBoolean(), "dirty", null, 0, 1, Editor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getEditor_Active(), ecorePackage.getEBoolean(), "active", null, 1, 1, Editor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(windowEClass, Window.class, "Window", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getWindow_Title(), ecorePackage.getEString(), "title", null, 0, 1, Window.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/core/org.eclipse.rcptt.tesla.core/models/ui.ecore b/core/org.eclipse.rcptt.tesla.core/models/ui.ecore
index b77d48d..454a222 100644
--- a/core/org.eclipse.rcptt.tesla.core/models/ui.ecore
+++ b/core/org.eclipse.rcptt.tesla.core/models/ui.ecore
@@ -1,8 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
-    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ui"
-    nsURI="http://eclipse.org/rcptt/tesla/widgets" nsPrefix="org.eclipse.rcptt.tesla.widgets">
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ui" nsURI="http://eclipse.org/rcptt/tesla/widgets" nsPrefix="org.eclipse.rcptt.tesla.widgets">
   <eClassifiers xsi:type="ecore:EClass" name="Widget" eSuperTypes="#//PropertyNodeList"/>
   <eClassifiers xsi:type="ecore:EClass" name="Control" eSuperTypes="#//Widget">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="className" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
@@ -262,6 +260,8 @@
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="input" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="dirty" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="active" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Window" eSuperTypes="#//Control">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
diff --git a/core/org.eclipse.rcptt.tesla.core/plugin.xml b/core/org.eclipse.rcptt.tesla.core/plugin.xml
index e72aa04..8af6753 100644
--- a/core/org.eclipse.rcptt.tesla.core/plugin.xml
+++ b/core/org.eclipse.rcptt.tesla.core/plugin.xml
@@ -24,4 +24,12 @@
         uri="http://eclipse.org/rcptt/tesla/info">
   </package>
 	</extension>
+   <extension point="org.eclipse.emf.ecore.generated_package">
+      <!-- @generated controls -->
+      <package
+            uri="http://eclipse.org/rcptt/tesla/widgets"
+            class="org.eclipse.rcptt.tesla.core.ui.UiPackage"
+            genModel="models/controls.genmodel"/>
+   </extension>
+
 </plugin>
diff --git a/rcpttTests/platform_tests/q7Explorer/ResourceRenameTest.test b/rcpttTests/platform_tests/q7Explorer/ResourceRenameTest.test
index 118ccc6..de04587 100644
--- a/rcpttTests/platform_tests/q7Explorer/ResourceRenameTest.test
+++ b/rcpttTests/platform_tests/q7Explorer/ResourceRenameTest.test
@@ -1,14 +1,12 @@
 --- RCPTT testcase ---
 Format-Version: 1.0
-Q7-vendor: www.xored.com/q7
 Contexts: _tlWZcGphEeCzId1Gnkds9A,_4zI9AWpgEeCzId1Gnkds9A
 Element-Name: ResourceRenameTest
 Element-Type: testcase
 Element-Version: 3.0
 External-Reference: 
 Id: _da-SEauHEeCsAecib2O_8g
-Q7-Runtime-Version: 1.5.0.201406131029
-Save-Time: 6/13/14 7:04 PM
+Save-Time: 9/19/14 7:48 PM
 Tags: Q7Explorer, Rename
 Testcase-Type: ecl
 
@@ -40,6 +38,7 @@
     get-editbox -after [get-label "File name:"] | set-text "test.txt"
     get-button Finish | click
 }
+get-editor "test.txt" | get-property active -raw | verify-true
 get-editor "test.txt" | close
 get-view "Project Explorer" | click -nowait
 get-view "Test Explorer" | get-tree | get-item "TestQ7Prj/test.txt" | get-property caption | equals "test.txt" 
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/player/SWTModelMapper.java b/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/player/SWTModelMapper.java
index e7ab23e..278f194 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/player/SWTModelMapper.java
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/internal/ui/player/SWTModelMapper.java
@@ -21,30 +21,6 @@
 import org.eclipse.jface.fieldassist.ControlDecoration;
 import org.eclipse.jface.util.Policy;
 import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.ui.IWorkbenchPartReference;
-
-import org.eclipse.rcptt.util.JSoupUtil;
-import org.eclipse.rcptt.util.swt.TableTreeUtil;
 import org.eclipse.rcptt.tesla.core.ui.Button;
 import org.eclipse.rcptt.tesla.core.ui.ButtonKind;
 import org.eclipse.rcptt.tesla.core.ui.Combo;
@@ -81,6 +57,29 @@
 import org.eclipse.rcptt.tesla.jface.ImageSources.ImageSource;
 import org.eclipse.rcptt.tesla.jface.ImageSources.ResourceSource;
 import org.eclipse.rcptt.tesla.swt.reflection.JavaMembersHelper;
+import org.eclipse.rcptt.util.JSoupUtil;
+import org.eclipse.rcptt.util.swt.TableTreeUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.ui.IWorkbenchPartReference;
 
 public class SWTModelMapper {
 
@@ -269,6 +268,7 @@
 					.getReference();
 			editor.setTitle(unify(reference.getPartName()));
 			editor.setDirty(reference.isDirty());
+			editor.setActive(reference.getPage().getActivePartReference() == reference);
 			fillControl(editor,
 					((org.eclipse.swt.widgets.Control) element.unwrap()));
 
diff --git a/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/swt/workbench/EclipseWorkbenchProvider.java b/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/swt/workbench/EclipseWorkbenchProvider.java
index a0c02e5..6e026dc 100644
--- a/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/swt/workbench/EclipseWorkbenchProvider.java
+++ b/runtime/tesla/org.eclipse.rcptt.tesla.swt/src/org/eclipse/rcptt/tesla/swt/workbench/EclipseWorkbenchProvider.java
@@ -10,9 +10,9 @@
  *******************************************************************************/
 package org.eclipse.rcptt.tesla.swt.workbench;
 
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.Platform;
-
 import org.eclipse.rcptt.tesla.ui.SWTTeslaActivator;
 
 public class EclipseWorkbenchProvider {
@@ -25,21 +25,24 @@
 
 	private static void initialize() {
 		if (currentProvider == null) {
+			final String extensionPointId = SWTTeslaActivator.PLUGIN_ID + ".workbenchProvider";
 			IConfigurationElement[] elements = Platform.getExtensionRegistry()
 					.getConfigurationElementsFor(
-							SWTTeslaActivator.PLUGIN_ID + ".workbenchProvider");
+							extensionPointId);
 			for (IConfigurationElement cfg : elements) {
 				try {
-					Object object = cfg.createExecutableExtension("class");
-					if (object instanceof IEclipseWorkbenchProvider) {
-						if (((IEclipseWorkbenchProvider) object).isSupported()) {
-							currentProvider = (IEclipseWorkbenchProvider) object;
-						}
+					IEclipseWorkbenchProvider object = (IEclipseWorkbenchProvider) cfg
+							.createExecutableExtension("class");
+					if (((IEclipseWorkbenchProvider) object).isSupported()) {
+						currentProvider = (IEclipseWorkbenchProvider) object;
 					}
-				} catch (Throwable e) {
-
+				} catch (CoreException e) {
+					throw new RuntimeException("Failed to create " + cfg.getName(), e);
 				}
 			}
+			if (currentProvider == null)
+				throw new NullPointerException("Failed to find " + extensionPointId
+						+ " extension. Is org.eclipse.rcptt.tesla.swt.e*x extension loaded?");
 		}
 	}
 }