]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/views/SourceView.java
Remove usage of deprecated SimanticsUI-methods
[simantics/platform.git] / bundles / org.simantics.document.linking.ui / src / org / simantics / document / linking / views / SourceView.java
index 68c2b0045cc719b87b8350f3bd72cae864d46bde..e3b1c55d3ab4f0961f02383ad6a018b2a2bde025 100644 (file)
@@ -147,11 +147,11 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis
                browseComposite.setLayout(new GridLayout(2,false));
                modelCombo = new CCombo(browseComposite, SWT.BORDER|SWT.READ_ONLY);
                final WidgetSupport support = new WidgetSupportImpl();
-               SimanticsUI.getSession().asyncRequest(new ReadRequest() {
+               Simantics.getSession().asyncRequest(new ReadRequest() {
                        
                        @Override
                        public void run(ReadGraph graph) throws DatabaseException {
-                               Resource project = SimanticsUI.getProject().get();
+                               Resource project = Simantics.getProject().get();
                                modelToComboListener = new ModelToComboListener(modelCombo) {
                                        @Override
                                        public Resource getCurrentModel() {
@@ -317,7 +317,7 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis
                if (res == null)
                        return;
                try {
-                       final Resource selected  = SimanticsUI.getSession().syncRequest(new Read<Resource>() {
+                       final Resource selected  = Simantics.getSession().syncRequest(new Read<Resource>() {
                                @Override
                                public Resource perform(ReadGraph graph) throws DatabaseException {
                                        try {
@@ -335,8 +335,8 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis
                                        return;
                        }
                        ISelection realSelection = new StructuredSelection(selected);
-                       objectExplorer.setInput(SimanticsUI.getSessionContext(), realSelection);
-                       propertyExplorer.setInput(SimanticsUI.getSessionContext(), realSelection);
+                       objectExplorer.setInput(Simantics.getSessionContext(), realSelection);
+                       propertyExplorer.setInput(Simantics.getSessionContext(), realSelection);
                        Simantics.getSession().asyncRequest(new ReadRequest() {
                                
                                @Override
@@ -453,13 +453,13 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis
                        if (model.equals(r)) {
                                modelCombo.select(i);
                                ISelection realSelection = new StructuredSelection(currentModel);
-                               browseExplorer.setInput(SimanticsUI.getSessionContext(), realSelection);
+                               browseExplorer.setInput(Simantics.getSessionContext(), realSelection);
                                return;
                        }
                }
                modelCombo.select(-1);
                ISelection realSelection = new StructuredSelection();
-               browseExplorer.setInput(SimanticsUI.getSessionContext(), realSelection);
+               browseExplorer.setInput(Simantics.getSessionContext(), realSelection);
        }
        
        @SuppressWarnings("rawtypes")