Skip to content
Snippets Groups Projects
Commit 9cf57697 authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

code cleaning

refs 340
parent 003d05b0
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ Bundle-Version: 1.0.0.qualifier ...@@ -6,7 +6,7 @@ Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.fortiss.tooling.base.ui.ToolingBaseUIActivator Bundle-Activator: org.fortiss.tooling.base.ui.ToolingBaseUIActivator
Require-Bundle: org.fortiss.tooling.base;bundle-version="1.0.0";visibility:=reexport, Require-Bundle: org.fortiss.tooling.base;bundle-version="1.0.0";visibility:=reexport,
org.fortiss.tooling.kernel.ui;bundle-version="1.0.0";visibility:=reexport, org.fortiss.tooling.kernel.ui;bundle-version="1.0.0";visibility:=reexport,
org.eclipse.jface.text;bundle-version="3.7.1" org.eclipse.jface.text;bundle-version="3.7.0"
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: fortiss Bundle-Vendor: fortiss
......
...@@ -26,7 +26,6 @@ import org.eclipse.ui.PartInitException; ...@@ -26,7 +26,6 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.editors.text.TextEditor; import org.eclipse.ui.editors.text.TextEditor;
import org.fortiss.tooling.kernel.service.ICommandStackService; import org.fortiss.tooling.kernel.service.ICommandStackService;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler; import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.internal.editor.ModelElementEditorInput;
/** /**
* *
...@@ -65,18 +64,20 @@ public class TextEditorBase<T extends EObject> extends TextEditor { ...@@ -65,18 +64,20 @@ public class TextEditorBase<T extends EObject> extends TextEditor {
@Override @Override
public void init(IEditorSite site, IEditorInput input) public void init(IEditorSite site, IEditorInput input)
throws PartInitException { throws PartInitException {
if (!(input instanceof ModelElementEditorInput)) {
throw new PartInitException("Expected input of type "
+ ModelElementEditorInput.class);
}
ModelElementEditorInput meInput = (ModelElementEditorInput) input;
editedObject = (T) meInput.getModelElement();
if (editedObject == null) {
throw new PartInitException("Missing model element!");
}
handler = (IModelElementHandler<T>) meInput.getModelElementHandler(); // if (!(input instanceof ModelElementEditorInput)) {
// throw new PartInitException("Expected input of type "
// + ModelElementEditorInput.class);
// }
// ModelElementEditorInput meInput = (ModelElementEditorInput) input;
//
// editedObject = (T) meInput.getModelElement();
// if (editedObject == null) {
// throw new PartInitException("Missing model element!");
// }
//
// handler = (IModelElementHandler<T>) meInput.getModelElementHandler();
if (handler == null) { if (handler == null) {
throw new PartInitException("Missing model element handler!"); throw new PartInitException("Missing model element handler!");
} }
......
...@@ -22,7 +22,6 @@ Export-Package: org.fortiss.tooling.kernel.ui, ...@@ -22,7 +22,6 @@ Export-Package: org.fortiss.tooling.kernel.ui,
org.fortiss.tooling.kernel.ui.extension.base, org.fortiss.tooling.kernel.ui.extension.base,
org.fortiss.tooling.kernel.ui.extension.data, org.fortiss.tooling.kernel.ui.extension.data,
org.fortiss.tooling.kernel.ui.extension.editingsupport, org.fortiss.tooling.kernel.ui.extension.editingsupport,
org.fortiss.tooling.kernel.ui.internal.editor,
org.fortiss.tooling.kernel.ui.listener, org.fortiss.tooling.kernel.ui.listener,
org.fortiss.tooling.kernel.ui.service, org.fortiss.tooling.kernel.ui.service,
org.fortiss.tooling.kernel.ui.util org.fortiss.tooling.kernel.ui.util
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment