X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2FcomponentTypeEditor%2FPGraphEditorDocumentProvider.java;h=e718390b8b6b041154b77b774ed55449b3862b51;hp=39152636b0e80aab3d9b18eaa439ce26ca839cf1;hb=47269fe0acb894f346810417d950a1ab59cdc0ea;hpb=11309f6516278203264b680235cbbe1dc2bde98e diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/PGraphEditorDocumentProvider.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/PGraphEditorDocumentProvider.java index 39152636b..e718390b8 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/PGraphEditorDocumentProvider.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/PGraphEditorDocumentProvider.java @@ -57,7 +57,7 @@ public class PGraphEditorDocumentProvider extends AbstractDocumentProvider { if(graph.isInstanceOf(resource, L0.PGraph)) { currentText = graph.getRelatedValue(resource, L0.PGraph_definition, Bindings.STRING); errorHappened = false; - return new Document(currentText != null ? currentText : ""); + return new Document(currentText != null ? currentText : ""); //$NON-NLS-1$ } else { Resource indexRoot = graph.syncRequest(new PossibleIndexRoot(resource)); try { @@ -67,9 +67,9 @@ public class PGraphEditorDocumentProvider extends AbstractDocumentProvider { currentText = PrettyPrintTG.print(tg, false); errorHappened = false; } - return new Document(currentText != null ? currentText : ""); + return new Document(currentText != null ? currentText : ""); //$NON-NLS-1$ } catch (Exception e) { - throw new DatabaseException("Could not get PGraph from " + resource); + throw new DatabaseException("Could not get PGraph from " + resource); //$NON-NLS-1$ } } } @@ -96,7 +96,7 @@ public class PGraphEditorDocumentProvider extends AbstractDocumentProvider { synchronized(annotationModel.getLockObject()) { annotationModel.removeAllAnnotations(); for(CompilationError error : errors) { - Annotation annotation = new Annotation("org.eclipse.ui.workbench.texteditor.error", true, + Annotation annotation = new Annotation("org.eclipse.ui.workbench.texteditor.error", true, //$NON-NLS-1$ error.description); int begin = Locations.beginOf(error.location); int end = Locations.endOf(error.location); @@ -121,7 +121,7 @@ public class PGraphEditorDocumentProvider extends AbstractDocumentProvider { @Override protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException { - TimeLogger.resetTimeAndLog("PGraphEditorDocumentProvider.doSaveDocument"); + TimeLogger.resetTimeAndLog("PGraphEditorDocumentProvider.doSaveDocument"); //$NON-NLS-1$ currentText = document.get(); Simantics.getSession().asyncRequest(new WriteRequest() { @Override @@ -129,7 +129,7 @@ public class PGraphEditorDocumentProvider extends AbstractDocumentProvider { graph.markUndoPoint(); Layer0 L0 = Layer0.getInstance(graph); graph.claimLiteral(resource, L0.PGraph_definition, currentText, Bindings.STRING); - Layer0Utils.addCommentMetadata(graph, "Saved Ontology Definition File " + graph.getRelatedValue2(resource, Layer0.getInstance(graph).HasName, Bindings.STRING)); + Layer0Utils.addCommentMetadata(graph, "Saved Ontology Definition File " + graph.getRelatedValue2(resource, Layer0.getInstance(graph).HasName, Bindings.STRING)); //$NON-NLS-1$ } }); }