Ignore:
Timestamp:
12/12/11 16:31:35 (13 years ago)
Author:
wschamai
Message:

bug fix: do not look for the Papyrus Model Explorer View when the active editor is not Papyrus!

File:
1 edited

Legend:

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

    r1130 r1199  
    3535        if (view instanceof ModelExplorerPageBookView) {
    3636            modelExplorerPageBookView = (ModelExplorerPageBookView)view;
     37           
     38            CommonViewer modelExplorerView = ((ModelExplorerView) modelExplorerPageBookView.getAdapter(ModelExplorerView.class)).getCommonViewer();
     39            if (modelExplorerView != null) {
     40                return modelExplorerView.getControl().isVisible();
     41            }
    3742        }
    38         CommonViewer modelExplorerView = ((ModelExplorerView) modelExplorerPageBookView.getAdapter(ModelExplorerView.class)).getCommonViewer();
    39         if (modelExplorerView != null) {
    40             return modelExplorerView.getControl().isVisible();
    41         }
     43
    4244       
    4345        return false;
Note: See TracChangeset for help on using the changeset viewer.