Bug 288692 - [modeling] DocumentRoot is taken as top of tree viewer, Outline view
diff --git a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/DSEditorConfig.java b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/DSEditorConfig.java
index c989990..06521d2 100644
--- a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/DSEditorConfig.java
+++ b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/DSEditorConfig.java
@@ -8,17 +8,15 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: DSEditorConfig.java,v 1.3 2009/09/11 22:00:14 bcabe Exp $
+ * $Id: DSEditorConfig.java,v 1.4 2009/09/13 18:04:02 bcabe Exp $
  */
 package org.eclipse.pde.ds.ui.internal.editor;
 
 import org.eclipse.pde.ds.scr.Component;
 import org.eclipse.pde.emfforms.editor.DefaultEmfFormEditorConfig;
-import org.eclipse.pde.emfforms.editor.EmfFormEditor;
 
-public class DSEditorConfig extends DefaultEmfFormEditorConfig<Component> {
-
-	public DSEditorConfig(EmfFormEditor<Component> editor) {
+public class DSEditorConfig extends DefaultEmfFormEditorConfig<DSEditor, Component> {
+	public DSEditorConfig(DSEditor editor) {
 		super(editor);
 	}
 
diff --git a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/DefaultEmfFormEditorConfig.java b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/DefaultEmfFormEditorConfig.java
index 907d673..6b7beec 100644
--- a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/DefaultEmfFormEditorConfig.java
+++ b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/DefaultEmfFormEditorConfig.java
@@ -8,22 +8,22 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: DefaultEmfFormEditorConfig.java,v 1.4 2009/08/19 15:13:23 bcabe Exp $
+ * $Id: DefaultEmfFormEditorConfig.java,v 1.5 2009/09/13 18:04:04 bcabe Exp $
  */
 package org.eclipse.pde.emfforms.editor;
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.swt.widgets.Display;
 
-public class DefaultEmfFormEditorConfig<T extends EObject> implements IEmfFormEditorConfig<T> {
+public class DefaultEmfFormEditorConfig<E extends EmfFormEditor<O>, O extends EObject> implements IEmfFormEditorConfig<E, O> {
 	private PDEFormToolkit customizedToolkit = null;
-	private EmfFormEditor<T> editor;
+	private E editor;
 
-	public DefaultEmfFormEditorConfig(EmfFormEditor<T> editor) {
+	public DefaultEmfFormEditorConfig(E editor) {
 		this.editor = editor;
 	}
 
-	public EmfFormEditor<T> getEditor() {
+	public E getEditor() {
 		return editor;
 	}
 
@@ -58,7 +58,7 @@
 		this.customizedToolkit = customizedToolkit;
 	}
 
-	public Object getOutlineInput(T suggestedInput) {
+	public Object getOutlineInput(O suggestedInput) {
 		return suggestedInput.eResource();
 	};
 
diff --git a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/EmfFormEditor.java b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/EmfFormEditor.java
index 5d9f1f4..db1d4c4 100644
--- a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/EmfFormEditor.java
+++ b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/EmfFormEditor.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: EmfFormEditor.java,v 1.26 2009/09/12 20:36:02 bcabe Exp $
+ * $Id: EmfFormEditor.java,v 1.27 2009/09/13 18:04:04 bcabe Exp $
  */
 package org.eclipse.pde.emfforms.editor;
 
@@ -69,10 +69,10 @@
  * A {@link FormEditor} allowing to edit an EMF {@link EObject} in a convenient
  * way
  * 
- * @param <T>
+ * @param <O>
  *            The type of the {@link EObject} to edit.
  */
-public abstract class EmfFormEditor<T extends EObject> extends FormEditor implements IEditingDomainProvider, ISelectionProvider, IViewerProvider, IResourceChangeListener, IGotoMarker {
+public abstract class EmfFormEditor<O extends EObject> extends FormEditor implements IEditingDomainProvider, ISelectionProvider, IViewerProvider, IResourceChangeListener, IGotoMarker {
 
 	/**
 	 * This keeps track of the editing domain that is used to track all changes
@@ -82,7 +82,7 @@
 
 	/**
 	 */
-	private IEmfFormEditorConfig<T> _editorConfig;
+	private IEmfFormEditorConfig<EmfFormEditor<O>, O> _editorConfig;
 
 	/**
 	 * This is the one adapter factory used for providing views of the model.
@@ -91,7 +91,7 @@
 
 	private final IObservableValue _observableValue = new WritableValue();
 
-	private T _currentEObject;
+	private O _currentEObject;
 
 	/**
 	 * This keeps track of all the
@@ -137,8 +137,8 @@
 	/**
 	 * @return the {@link IEmfFormEditorConfig} the editor will use as its configuration
 	 */
-	protected IEmfFormEditorConfig<T> getFormEditorConfig() {
-		return new DefaultEmfFormEditorConfig<T>(this);
+	protected IEmfFormEditorConfig<EmfFormEditor<O>, O> getFormEditorConfig() {
+		return new DefaultEmfFormEditorConfig<EmfFormEditor<O>, O>(this);
 	}
 
 	private void init() {
@@ -452,7 +452,7 @@
 		if (_currentEObject != null)
 			_currentEObject.eAdapters().remove(_validator);
 
-		_currentEObject = (T) resource.getContents().get(0);
+		_currentEObject = (O) resource.getContents().get(0);
 		_observableValue.setValue(_currentEObject);
 		_currentEObject.eAdapters().add(_validator);
 	}
@@ -476,9 +476,9 @@
 	}
 
 	/**
-	 * @return The {@link T} currently edited
+	 * @return The {@link O} currently edited
 	 */
-	public T getCurrentEObject() {
+	public O getCurrentEObject() {
 		return _currentEObject;
 	}
 
@@ -687,7 +687,7 @@
 		}
 	}
 
-	private EmfFormEditor<T> getCurrentInstance() {
+	private EmfFormEditor<O> getCurrentInstance() {
 		return this;
 	}
 
diff --git a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/IEmfFormEditorConfig.java b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/IEmfFormEditorConfig.java
index 541bb62..c189d38 100644
--- a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/IEmfFormEditorConfig.java
+++ b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/IEmfFormEditorConfig.java
@@ -8,20 +8,20 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: IEmfFormEditorConfig.java,v 1.4 2009/09/12 20:16:06 bcabe Exp $
+ * $Id: IEmfFormEditorConfig.java,v 1.5 2009/09/13 18:04:04 bcabe Exp $
  */
 package org.eclipse.pde.emfforms.editor;
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.swt.widgets.Display;
 
-public interface IEmfFormEditorConfig<T extends EObject> {
+public interface IEmfFormEditorConfig<E extends EmfFormEditor<O>, O extends EObject> {
 
 	public enum VALIDATE_ON_SAVE {
 		NO_VALIDATION, VALIDATE_AND_WARN, VALIDATE_AND_ABORT
 	}
 
-	EmfFormEditor<T> getEditor();
+	E getEditor();
 
 	/**
 	 * Return a member of {@link VALIDATE_ON_SAVE}, in order to say if a
@@ -62,6 +62,6 @@
 	 */
 	PDEFormToolkit createPDEFormToolkit(Display display);
 
-	Object getOutlineInput(T suggestedInput);
+	Object getOutlineInput(O suggestedInput);
 
 }
\ No newline at end of file