]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.proconf.processeditor/src/org/simantics/processeditor/views/ProcessEditor.java
Set copyright texts for java files in the latest development branches.
[simantics/3d.git] / org.simantics.proconf.processeditor / src / org / simantics / processeditor / views / ProcessEditor.java
index 699bd1e345fbed861786e9af95bfb8a069bbb3ec..67c1982cf443f9be832c2bf28591fba4def35f62 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************\r
- * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
  * All rights reserved. This program and the accompanying materials\r
  * are made available under the terms of the Eclipse Public License v1.0\r
  * which accompanies this distribution, and is available at\r
@@ -102,29 +102,22 @@ public class ProcessEditor extends ThreeDimensionalEditorBase {
 \r
     @Override\r
     protected void pageSelectionChanged(IWorkbenchPart part, ISelection selection) {\r
-        if (!(selection instanceof StructuredResourceSelection)) {\r
-            return;\r
-        }\r
-        \r
-        StructuredResourceSelection s = (StructuredResourceSelection) selection;\r
+       StructuredResourceSelection s = SelectionAdapter.transformSelection(selection);\r
+\r
         selectionAdapter.setCurrentSelection(s);\r
         viewChanged = true;\r
-        \r
-        //if (s.getRootSelection() == null) {\r
-        if (!(part instanceof ProcessEditor)) {\r
-            //System.out.println("ShapeEditorView.pageSelectionChanged() no root selection");\r
-               ((ProcessEditorSelectionAdapter)selectionAdapter).setEditorSelection(true);\r
-            return;\r
+\r
+        /*\r
+        if (part instanceof ProcessEditor) {\r
+               ProcessEditor sender = (ProcessEditor)part;\r
+            if (!sender.getPlantResource().equals(plantResource)) {\r
+               selectionAdapter.setCurrentSelection(new StructuredResourceSelection());\r
+               selectionAdapter.setEditorSelection();\r
+              return;\r
+            }\r
         } \r
-        //if (!s.getRootSelection().getResource().getId().equals(plant.getResource().getId())) {\r
-        ProcessEditor sender = (ProcessEditor)part;\r
-        if (!sender.getPlantResource().equals(plantResource)) {\r
-//          System.out.println("ShapeEditorView.pageSelectionChanged() not right group "\r
-//                  + s.getRootSelection().getResource().getId() + " != " + model.getResource().getId());\r
-               selectionAdapter.setCurrentSelection(new StructuredResourceSelection());\r
-               ((ProcessEditorSelectionAdapter)selectionAdapter).setEditorSelection(false);\r
-          return;\r
-      }\r
+               */\r
+        \r
         selectionAdapter.setEditorSelection();\r
         \r
     }\r