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
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) {
}
});
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();
}