Ignore:
Timestamp:
09/15/11 21:47:04 (13 years ago)
Author:
wschamai
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modelicaml/org.openmodelica.modelicaml.common/src/org/openmodelica/modelicaml/common/services/PapyrusServices.java

    r943 r958  
    3636        if (object instanceof String) {
    3737           
    38 //          IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("org.openmodelica.modelicaml.view.componentstree");
    3938            List<Object> elements = new ArrayList<Object>();
    4039            // find treeObject with the dotPath
    41            
    4240            HashSet<Object> treeObjects =  TreeUtls.findTreeItems((String) object, TreeUtls.componentsTreeRoot, new HashSet<Object>());
    4341            elements.addAll(treeObjects);
    4442           
    4543            StructuredSelection selection = new StructuredSelection(elements);
    46             TreeUtls.componentsTreeViewer.setSelection(selection);
    47            
    48 //          if (view instanceof ModelExplorerPageBookView) {
    49 //              modelExplorerPageBookView = (ModelExplorerPageBookView)view;
    50 //          }
    51 //          CommonViewer modelExplorerView = ((ModelExplorerView) modelExplorerPageBookView.getAdapter(ModelExplorerView.class)).getCommonViewer();
    52 //          List<Object> items = new ArrayList<Object>();
    53 //          items.add(modelExplorerPageBookView.findElementForEObject( modelExplorerView, (EObject)object));
    54 //          modelExplorerView.setSelection(new StructuredSelection(items), true);
     44
     45            if (TreeUtls.componentsTreeViewer != null) {
     46                TreeUtls.componentsTreeViewer.setSelection(selection); 
     47            }
    5548        }
    5649    }
Note: See TracChangeset for help on using the changeset viewer.