]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/report/templates/custom/SCLCustomizableContent.java
Externalize org.simantics.document.linking.ui
[simantics/platform.git] / bundles / org.simantics.document.linking.ui / src / org / simantics / document / linking / report / templates / custom / SCLCustomizableContent.java
index 09fb371948deb5e592b2b1dc5ed5a47f4c08a3fc..126591a5344140b0509f24678f61e3d9af31ab21 100644 (file)
@@ -32,11 +32,11 @@ public class SCLCustomizableContent implements CustomizableContent {
        public SCLCustomizableContent(String label) {
                session = new CommandSession(SCLOsgi.MODULE_REPOSITORY, null);
                
-               sclCode = new String[]{"import \"Simantics/Ontologies\"",
-                                      "nameOfResource r = match possibleRelatedValue r L0.HasName with\n"+
-                               "    Just name -> name\n"+
-                               "    Nothing -> \"no name\"",
-                               "nameOfResource res"};                          
+               sclCode = new String[]{"import \"Simantics/Ontologies\"", //$NON-NLS-1$
+                                      "nameOfResource r = match possibleRelatedValue r L0.HasName with\n"+ //$NON-NLS-1$
+                               "    Just name -> name\n"+ //$NON-NLS-1$
+                               "    Nothing -> \"no name\"", //$NON-NLS-1$
+                               "nameOfResource res"};                           //$NON-NLS-1$
        }
        
        @Override
@@ -48,7 +48,7 @@ public class SCLCustomizableContent implements CustomizableContent {
        public String getContent(ReadGraph graph, Resource resource, Map<Object, Object> context)
                        throws DatabaseException {
                
-               session.setVariable("res", Types.con("Simantics/DB", "Resource"), resource);
+               session.setVariable("res", Types.con("Simantics/DB", "Resource"), resource); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                final StringBuilder responseBuilder = new StringBuilder();
                final StringBuilder errorBuilder = new StringBuilder();
                for (String code : sclCode) {
@@ -69,7 +69,7 @@ public class SCLCustomizableContent implements CustomizableContent {
                 }
             });
                        if(errorBuilder.length() > 0)
-                           throw new DatabaseException("Error executing SCL \"" + code + "\" " + errorBuilder.toString().trim());
+                           throw new DatabaseException("Error executing SCL \"" + code + "\" " + errorBuilder.toString().trim()); //$NON-NLS-1$ //$NON-NLS-2$
                }
                return responseBuilder.toString().trim();
        }