// Name
String defaultName = graph.getRelatedValue(indexRoot, MOD.StructuralModel_HasDefaultComponentTypeName, Bindings.STRING);
String name = NameUtils.findFreshName(graph, defaultName, library);
- graph.claimLiteral(componentType, L0.HasName, name + "@1");
- graph.claimLiteral(componentType, L0X.HasGeneratedNamePrefix, "");
+ graph.claimLiteral(componentType, L0.HasName, name + "@1"); //$NON-NLS-1$
+ graph.claimLiteral(componentType, L0X.HasGeneratedNamePrefix, ""); //$NON-NLS-1$
// Substructure
// Resource substructureType = graph.getSingleObject(indexRoot, MOD.StructuralModel_HasComponentTypeSubstructureType);
// }
graph.addLiteral(componentType, STR.ProceduralComponentType_code, STR.ProceduralComponentType_code_Inverse,
- STR.ProceduralComponentTypeCode, "[]", Bindings.STRING);
+ STR.ProceduralComponentTypeCode, "[]", Bindings.STRING); //$NON-NLS-1$
Resource symbolDiagramType = graph.getPossibleObject(indexRoot, MOD.StructuralModel_HasSymbolDiagramType);
if(symbolDiagramType == null) symbolDiagramType = DIA.Composite;
// Symbol
- Resource symbol = new ModelingUtils(graph).createSymbol2("Symbol", symbolDiagramType);
+ Resource symbol = new ModelingUtils(graph).createSymbol2("Symbol", symbolDiagramType); //$NON-NLS-1$
graph.claim(componentType, MOD.ComponentTypeToSymbol, symbol);
graph.claim(componentType, L0.ConsistsOf, symbol);
return new Runnable() {
@Override
public void run() {
- Job job = new DatabaseJob("New User Component") {
+ Job job = new DatabaseJob(Messages.NewProceduralComponentType_NewUserComponent) {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
public void perform(WriteGraph graph) throws DatabaseException {
graph.markUndoPoint();
Resource r = NewProceduralComponentType.create(graph, library);
- Layer0Utils.addCommentMetadata(graph, "Created new Procedural Component Type " + graph.getPossibleRelatedValue2(r, Layer0.getInstance(graph).HasName, Bindings.STRING));
+ Layer0Utils.addCommentMetadata(graph, "Created new Procedural Component Type " + graph.getPossibleRelatedValue2(r, Layer0.getInstance(graph).HasName, Bindings.STRING)); //$NON-NLS-1$
}
});
return Status.OK_STATUS;
} catch (DatabaseException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to create new user component.", e);
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NewProceduralComponentType_ActivatorFailedToCreateNewUserComponent, e);
}
}
};