not required code removed
diff --git a/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView$1.class b/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView$1.class
index 73b8941..2fc40c7 100644
--- a/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView$1.class
+++ b/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView$1.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView$2.class b/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView$2.class
index cdc1a39..b2e6b92 100644
--- a/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView$2.class
+++ b/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView$2.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView.class b/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView.class
index 88dd150..1d57221 100644
--- a/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView.class
+++ b/org.eclipse.emf.refactor.smells.runtime/bin/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.smells.runtime/src/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView.java b/org.eclipse.emf.refactor.smells.runtime/src/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView.java
index 2a4e16b..59fbe32 100644
--- a/org.eclipse.emf.refactor.smells.runtime/src/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView.java
+++ b/org.eclipse.emf.refactor.smells.runtime/src/org/eclipse/emf/refactor/smells/runtime/ui/ResultModelTreeView.java
@@ -95,9 +95,10 @@
// Object[] objects = eObjectList.toArray();
// RuntimeManager.selectModelObjects(objects);
// }
- IEditorPart editorPart = null;
+ IWorkbenchWindow workbenchWindow= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ IEditorPart editorPart = workbenchWindow.getActivePage().getActiveEditor();
if(event.getSelection() instanceof IStructuredSelection) {
- editorPart = openEditor((IStructuredSelection)event.getSelection());
+// editorPart = openEditor((IStructuredSelection)event.getSelection());
StructuredSelection ss = (StructuredSelection) event.getSelection();
Object selection = ss.getFirstElement();
// if (selection instanceof EObject || selection instanceof EObjectGroup) {
@@ -164,38 +165,38 @@
// return eObject;
}
- @SuppressWarnings("unchecked")
- private IEditorPart openEditor(IStructuredSelection selection){
- Object o = selection.getFirstElement();
- EObject obj = null;
- if(o instanceof EObject){
- obj = (EObject)o;
- }else if(o instanceof EObjectGroup){
- EObjectGroup group = (EObjectGroup)o;
- if(!group.getEObjects().isEmpty()){
- obj = group.getEObjects().getFirst();
- }
- }
- if(obj != null){
-// URI uri = obj.eResource().getURI();
-// String fileString = URI.decode(uri.path());
-// fileString = fileString.replaceFirst("/resource", "");
-// IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileString));
-// IWorkbench workbench = PlatformUI.getWorkbench();
- IFile file = ((LinkedList<ResultModel>)viewer.getInput()).get(0).getIFile();
- IWorkbenchWindow workbenchWindow= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage page = workbenchWindow.getActivePage();
- try {
- if(file.exists()){
- return IDE.openEditor(page, file);
- }
- }catch (PartInitException exception) {
- return null;
- }
- }
- return null;
- }
-
+// @SuppressWarnings("unchecked")
+// private IEditorPart openEditor(IStructuredSelection selection){
+// Object o = selection.getFirstElement();
+// EObject obj = null;
+// if(o instanceof EObject){
+// obj = (EObject)o;
+// }else if(o instanceof EObjectGroup){
+// EObjectGroup group = (EObjectGroup)o;
+// if(!group.getEObjects().isEmpty()){
+// obj = group.getEObjects().getFirst();
+// }
+// }
+// if(obj != null){
+//// URI uri = obj.eResource().getURI();
+//// String fileString = URI.decode(uri.path());
+//// fileString = fileString.replaceFirst("/resource", "");
+//// IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileString));
+//// IWorkbench workbench = PlatformUI.getWorkbench();
+// IFile file = ((LinkedList<ResultModel>)viewer.getInput()).get(0).getIFile();
+// IWorkbenchWindow workbenchWindow= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+// IWorkbenchPage page = workbenchWindow.getActivePage();
+// try {
+// if(file.exists()){
+// return IDE.openEditor(page, file);
+// }
+// }catch (PartInitException exception) {
+// return null;
+// }
+// }
+// return null;
+// }
+//
});
RuntimeManager.setResultModelTreeViewer(viewer);