X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.document.linking.ui%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Flinking%2Freport%2Ftemplates%2Fcustom%2FSCLCustomizableContent.java;h=126591a5344140b0509f24678f61e3d9af31ab21;hp=09fb371948deb5e592b2b1dc5ed5a47f4c08a3fc;hb=8783f9ee2b67f83160d88f43a7aef02a6b25f955;hpb=6431ba9c664c0b3c65c486397f610a514f246416 diff --git a/bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/report/templates/custom/SCLCustomizableContent.java b/bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/report/templates/custom/SCLCustomizableContent.java index 09fb37194..126591a53 100644 --- a/bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/report/templates/custom/SCLCustomizableContent.java +++ b/bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/report/templates/custom/SCLCustomizableContent.java @@ -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 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(); }