X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2Factions%2FNewProceduralComponentType.java;h=3169275493d27f2855b845445840def6ab1eeb0e;hp=daa21c384d2cc94e48a9b02899c925e33d363e96;hb=47269fe0acb894f346810417d950a1ab59cdc0ea;hpb=11309f6516278203264b680235cbbe1dc2bde98e diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewProceduralComponentType.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewProceduralComponentType.java index daa21c384..316927549 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewProceduralComponentType.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewProceduralComponentType.java @@ -63,8 +63,8 @@ public class NewProceduralComponentType implements ActionFactory { // 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); @@ -83,13 +83,13 @@ public class NewProceduralComponentType implements ActionFactory { // } 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); @@ -107,7 +107,7 @@ public class NewProceduralComponentType implements ActionFactory { 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 { @@ -116,12 +116,12 @@ public class NewProceduralComponentType implements ActionFactory { 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); } } };