]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/SheetViewer.java
Externalize strings
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / diagramEditor / SheetViewer.java
index 2838892c402e2831f8df68f924b374819eaddcf7..22a1b59e4ec9a22d9d466b986c1bee0d9afa9631 100644 (file)
@@ -195,7 +195,7 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
     }
 
     protected String getPopupId() {
-        return "#ModelingDiagramPopup";
+        return "#ModelingDiagramPopup"; //$NON-NLS-1$
     }
 
     protected void getPreferences() {
@@ -227,7 +227,7 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
         swt = SWTThread.getThreadAccess(parent.getDisplay());
         statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
 
-        Object task = BEGIN("DV.initSession");
+        Object task = BEGIN("DV.initSession"); //$NON-NLS-1$
         initSession();
         END(task);
 
@@ -235,7 +235,7 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
         readNames();
         getPreferences();
 
-        task = BEGIN("DV.createChassis");
+        task = BEGIN("DV.createChassis"); //$NON-NLS-1$
         createChassis(parent);
         END(task);
 
@@ -246,9 +246,9 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
     }
 
     protected void initializeCanvas() {
-        Object canvasInit = BEGIN("DV.canvasInitialization");
+        Object canvasInit = BEGIN("DV.canvasInitialization"); //$NON-NLS-1$
 
-        Object task = BEGIN("DV.createViewerCanvas");
+        Object task = BEGIN("DV.createViewerCanvas"); //$NON-NLS-1$
 //        ThreadUtils.syncExec(AWTThread.getThreadAccess(), new Runnable() {
 //            @Override
 //            public void run() {
@@ -259,17 +259,17 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
 
         //FullscreenUtils.addFullScreenHandler(canvasContext, s, canvasProvider);
 
-        task = BEGIN("DV.setCanvasContext");
+        task = BEGIN("DV.setCanvasContext"); //$NON-NLS-1$
         setCanvasContext(canvasContext);
         END(task);
 
         try {
-            task = BEGIN("DV.loadDiagram");
+            task = BEGIN("DV.loadDiagram"); //$NON-NLS-1$
             sourceDiagram = loadDiagram(diagramResource);
             END(task);
 
             // Zoom to fit
-            task = BEGIN("DV.scheduleZoomToFit");
+            task = BEGIN("DV.scheduleZoomToFit"); //$NON-NLS-1$
 
 //            canvasContext.getDefaultHintContext().setHint(Hints.KEY_CANVAS_TRANSFORM, new AffineTransform());
 //            canvasContext.getContentContext().setDirty();
@@ -279,15 +279,15 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
 
             // Start an activation for the input resource.
             // This will activate mapping if necessary.
-            task = BEGIN("DV.performActivation");
+            task = BEGIN("DV.performActivation"); //$NON-NLS-1$
             performActivation();
             END(task);
 
-            task = BEGIN("DV.activate context");
+            task = BEGIN("DV.activate context"); //$NON-NLS-1$
             contextUtil.activate(DiagramViewer.DIAGRAMMING_CONTEXT);
             END(task);
 
-            task = BEGIN("DV.onCreated");
+            task = BEGIN("DV.onCreated"); //$NON-NLS-1$
             onCreated();
             END(task);
 
@@ -313,7 +313,7 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
 
     protected 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);
@@ -353,7 +353,7 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
             PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
                 @Override
                 public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-                    SubMonitor mon = SubMonitor.convert(monitor, "Loading Diagram", 100);
+                    SubMonitor mon = SubMonitor.convert(monitor, Messages.SheetViewer_MonitorLoadingDiagram, 100);
                     try {
                         dc.set( loadDiagram(mon.newChild(100), r) );
                     } catch (DatabaseException e) {
@@ -375,17 +375,17 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
     }
 
     protected IDiagram loadDiagram(IProgressMonitor monitor, Resource r) throws DatabaseException {
-        SubMonitor mon = SubMonitor.convert(monitor, "Loading Diagram", 100);
+        SubMonitor mon = SubMonitor.convert(monitor, Messages.SheetViewer_MonitorLoadingDiagram, 100);
 
-        Object task = BEGIN("DV.DiagramLoadQuery");
+        Object task = BEGIN("DV.DiagramLoadQuery"); //$NON-NLS-1$
         IDiagram d = sessionContext.getSession().syncRequest(DiagramRequests.loadDiagram(mon.newChild(100), getResourceInput2().getModel(null), r, null, structuralPath, synchronizer, null));
         END(task);
 
-        task = BEGIN("DV.setDiagramHint");
+        task = BEGIN("DV.setDiagramHint"); //$NON-NLS-1$
         canvasContext.getDefaultHintContext().setHint(DiagramHints.KEY_DIAGRAM, d);
         END(task);
 
-        task = BEGIN("DV.set other hints");
+        task = BEGIN("DV.set other hints"); //$NON-NLS-1$
         // Setup a copy advisor for the synchronizer
         //d.setHint(SynchronizationHints.COPY_ADVISOR, new MappedElementCopyAdvisor(new ComponentCopyAdvisor()));
         d.setHint(DiagramHints.KEY_USE_CONNECTION_FLAGS, Boolean.FALSE);
@@ -407,7 +407,7 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
                 }
             });
         } 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$
         }
     }
 
@@ -428,7 +428,7 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
         CanvasContext ctx = new CanvasContext(thread);
         IHintContext h = ctx.getDefaultHintContext();
 
-        Object task = BEGIN("createSynchronizer");
+        Object task = BEGIN("createSynchronizer"); //$NON-NLS-1$
         this.synchronizer = createSynchronizer(ctx, sessionContext);
         END(task);
 
@@ -619,7 +619,7 @@ public class SheetViewer extends EditorPart implements IResourceEditorPart2 {
     @Override
     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);