X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2FdiagramEditor%2FWikiDiagramViewer.java;h=47913a7e078403a2ed9f51c793eea91635b4aa5c;hb=b45e9e5c1696a2e729dcecac0f58d16c15391770;hp=d6c4f69328bbd6e32afbae2efd444e33b0a435c4;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/WikiDiagramViewer.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/WikiDiagramViewer.java index d6c4f6932..47913a7e0 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/WikiDiagramViewer.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/WikiDiagramViewer.java @@ -26,6 +26,7 @@ import org.eclipse.ui.contexts.IContextActivation; import org.eclipse.ui.contexts.IContextService; import org.eclipse.ui.part.EditorPart; import org.eclipse.ui.views.contentoutline.IContentOutlinePage; +import org.simantics.Simantics; import org.simantics.db.ReadGraph; import org.simantics.db.Session; import org.simantics.db.common.ResourceArray; @@ -83,7 +84,6 @@ import org.simantics.modeling.mapping.ModelingSynchronizationHints; import org.simantics.scenegraph.g2d.events.command.CommandKeyBinding; import org.simantics.scenegraph.g2d.events.command.Commands; import org.simantics.simulation.experiment.IExperiment; -import org.simantics.ui.SimanticsUI; import org.simantics.ui.dnd.ResourceTransferData; import org.simantics.ui.dnd.ResourceTransferUtils; import org.simantics.ui.workbench.IResourceEditorInput; @@ -138,7 +138,7 @@ public class WikiDiagramViewer extends EditorPart implements IResourceEditorPart this.layer = layer; this.structuralPath = structuralPath; - sessionContextProvider = SimanticsUI.getSessionContextProvider(); + sessionContextProvider = Simantics.getSessionContextProvider(); sessionContext = sessionContextProvider.getSessionContext(); canvasContext = createViewerCanvas(); @@ -157,7 +157,7 @@ public class WikiDiagramViewer extends EditorPart implements IResourceEditorPart IHintContext hints = new HintContext(); hints.setHint(DiagramModelHints.KEY_ACTIVE_EXPERIMENT, experiment); if(layer != null) { - System.out.println("using layer '"+layer+"'"); + System.out.println("using layer '"+layer+"'"); //$NON-NLS-1$ //$NON-NLS-2$ hints.setHint(DiagramHints.KEY_FIXED_LAYERS, new String[] { layer }); } @@ -170,7 +170,7 @@ public class WikiDiagramViewer extends EditorPart implements IResourceEditorPart void scheduleZoomToFit() { if (sourceDiagram == null) - throw new IllegalStateException("source diagram is null"); + throw new IllegalStateException("source diagram is null"); //$NON-NLS-1$ sourceDiagram.setHint(Hints.KEY_DISABLE_PAINTING, Boolean.TRUE); sourceDiagram.setHint(DiagramHints.KEY_INITIAL_ZOOM_TO_FIT, Boolean.TRUE); @@ -188,7 +188,7 @@ public class WikiDiagramViewer extends EditorPart implements IResourceEditorPart if(experiment != null) hints.setHint(DiagramModelHints.KEY_ACTIVE_EXPERIMENT, experiment); if(layer != null) { - System.out.println("using layer '"+layer+"'"); + System.out.println("using layer '"+layer+"'"); //$NON-NLS-1$ //$NON-NLS-2$ hints.setHint(DiagramHints.KEY_FIXED_LAYERS, new String[] { layer }); } IDiagram d = sessionContext.getSession().syncRequest(DiagramRequests.loadDiagram(new NullProgressMonitor(), getResourceInput2().getModel(null), structuralPath.resources[0], null, structuralPath.removeFromBeginning(0), synchronizer, hints)); @@ -213,7 +213,7 @@ public class WikiDiagramViewer extends EditorPart implements IResourceEditorPart } }); } catch (DatabaseException e) { - throw new UnsupportedOperationException("Failed to initialize data model synchronizer", e); + throw new UnsupportedOperationException("Failed to initialize data model synchronizer", e); //$NON-NLS-1$ } } @@ -311,7 +311,7 @@ public class WikiDiagramViewer extends EditorPart implements IResourceEditorPart @Override public void dispose() { - System.out.println("RemoteDiagramViewer.dispose()"); + System.out.println("RemoteDiagramViewer.dispose()"); //$NON-NLS-1$ if(getSite() != null) { IContextService contextService = (IContextService) getSite().getService(IContextService.class); contextService.deactivateContext(contextActivation); @@ -352,7 +352,7 @@ public class WikiDiagramViewer extends EditorPart implements IResourceEditorPart public void init(IEditorSite site, IEditorInput input) throws PartInitException { if (!(input instanceof IResourceEditorInput)) - throw new PartInitException("Invalid input: must be IResourceEditorInput"); + throw new PartInitException("Invalid input: must be IResourceEditorInput"); //$NON-NLS-1$ setSite(site); setInput(input); support = new ResourceEditorSupport(this); @@ -376,7 +376,7 @@ public class WikiDiagramViewer extends EditorPart implements IResourceEditorPart try { SerialisationSupport support = session.getService(SerialisationSupport.class); ResourceTransferData data = ResourceTransferUtils.readAwtTransferable(support, tr); - if ("property".equals(data.getPurpose())) + if ("property".equals(data.getPurpose())) //$NON-NLS-1$ return data.toResourceArrayArray(); } catch (UnsupportedFlavorException e) { throw new RuntimeException(e);