]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.ui/src/org/simantics/document/ui/graphfile/DocumentVersionUtils.java
Externalize strings in org.simantics.document.ui
[simantics/platform.git] / bundles / org.simantics.document.ui / src / org / simantics / document / ui / graphfile / DocumentVersionUtils.java
index 82372f1264a568c21a06927a59c147f7583b6f24..c53fd1ab37038a1791a1603102aad54035065b7d 100644 (file)
@@ -43,7 +43,7 @@ public class DocumentVersionUtils {
        public static void createNewVersion(WriteGraph graph, Resource oldDocument, Resource newDocument, Resource relation) throws DatabaseException{
                DocumentResource doc = DocumentResource.getInstance(graph);
                if (graph.hasStatement(oldDocument, doc.HasNewerVersion))
-                       throw new DatabaseException("Document " + NameUtils.getSafeName(graph, oldDocument) +" has already new version");
+                       throw new DatabaseException("Document " + NameUtils.getSafeName(graph, oldDocument) +" has already new version"); //$NON-NLS-1$ //$NON-NLS-2$
                
                Resource inverse = graph.getInverse(relation);
                Resource lib = graph.getSingleObject(oldDocument, inverse);
@@ -81,7 +81,7 @@ public class DocumentVersionUtils {
                if (!graph.getSingleType(document2, doc.Document).equals(graph.getSingleType(document1, doc.Document)))
                        return;
                if (!versionRel.equals(doc.HasNewerVersion) && !(versionRel.equals(doc.HasOlderVersion)))
-                       throw new IllegalArgumentException("Unknow version relation + " + graph.getPossibleURI(versionRel));
+                       throw new IllegalArgumentException("Unknow version relation + " + graph.getPossibleURI(versionRel)); //$NON-NLS-1$
                
                Resource versionRelInv = graph.getInverse(versionRel);
                // toSet must not be part of the document's version history
@@ -112,7 +112,7 @@ public class DocumentVersionUtils {
                if (lib != null) {
                        Resource relation = graph.getPossibleObject(lib, doc.HasLibraryRelation);
                        String type= graph.getPossibleRelatedValue(lib, doc.HasVersionType);
-                       if ("TREE".equals(type) && relation != null) {
+                       if ("TREE".equals(type) && relation != null) { //$NON-NLS-1$
                                if (versionRel.equals(doc.HasOlderVersion)) {
                                        graph.deny(document2, graph.getInverse(relation));
                                        graph.claim(document1,relation,document2);
@@ -136,14 +136,14 @@ public class DocumentVersionUtils {
        public static void unsetVersion(WriteGraph graph, Resource document1, Resource document2, Resource versionRel) throws DatabaseException {
                DocumentResource doc = DocumentResource.getInstance(graph);
                if (!versionRel.equals(doc.HasNewerVersion) && !(versionRel.equals(doc.HasOlderVersion)))
-                       throw new IllegalArgumentException("Unknow version relation + " + graph.getPossibleURI(versionRel));
+                       throw new IllegalArgumentException("Unknow version relation + " + graph.getPossibleURI(versionRel)); //$NON-NLS-1$
                
                graph.deny(document1, versionRel,document2);
                Resource lib = getLib(graph, document1);
                if (lib != null) {
                        Resource relation = graph.getPossibleObject(lib, doc.HasLibraryRelation);
                        String type= graph.getPossibleRelatedValue(lib, doc.HasVersionType);
-                       if ("TREE".equals(type) && relation != null) {
+                       if ("TREE".equals(type) && relation != null) { //$NON-NLS-1$
                                if (versionRel.equals(doc.HasOlderVersion)) {
                                        graph.deny(document1, relation);
                                        graph.claim(lib,relation,document2);