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%2FcomponentTypeEditor%2FProceduralComponentInstanceViewer.java;h=d7abea5dabb4f37e64a20d9515e080000a8bcbb6;hp=d35ea9f9328f1ffa3b254115bae7d8cb5b1cd8de;hb=47269fe0acb894f346810417d950a1ab59cdc0ea;hpb=11309f6516278203264b680235cbbe1dc2bde98e diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentInstanceViewer.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentInstanceViewer.java index d35ea9f93..d7abea5da 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentInstanceViewer.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentInstanceViewer.java @@ -46,12 +46,12 @@ public class ProceduralComponentInstanceViewer extends ResourceEditorPart { Resource inputResource = getInputResource(); Variable context = Variables.getPossibleVariable(graph, inputResource); if(context == null) - return createErrorGraph("Couldn't create variable for the resource."); + return createErrorGraph(Messages.ProceduralComponentInstanceViewer_CouldnotCreateVariableForResource); try { List proceduralDesc = Functions.getProceduralDesc(graph, context); if(proceduralDesc == null) - return createErrorGraph("Component does not have a procedural substructure."); + return createErrorGraph(Messages.ProceduralComponentInstanceViewer_NoProceduralSubstructure); return createGraph(graph, proceduralDesc); } catch(DatabaseException e) { e.printStackTrace(); @@ -97,7 +97,7 @@ public class ProceduralComponentInstanceViewer extends ResourceEditorPart { private static Graph createErrorGraph(String description) { Graph graph = new Graph(); - new Node(graph, description).setShape("rectangle"); + new Node(graph, description).setShape("rectangle"); //$NON-NLS-1$ return graph; } @@ -115,7 +115,7 @@ public class ProceduralComponentInstanceViewer extends ResourceEditorPart { Node node = connectionPoints.get(interface_.relation); if(node == null) { node = new Node(graph); - node.setShape("diamond"); + node.setShape("diamond"); //$NON-NLS-1$ node.setLabel(nameOf(g, interface_.relation)); connectionPoints.put(interface_.relation, node); } @@ -125,21 +125,21 @@ public class ProceduralComponentInstanceViewer extends ResourceEditorPart { private static Graph createGraph(ReadGraph g, List proceduralDesc) throws DatabaseException { Graph graph = new Graph(); - graph.setRankdir("LR"); + graph.setRankdir("LR"); //$NON-NLS-1$ THashMap components = new THashMap(); for(SubstructureElement element : proceduralDesc) if(element instanceof Component) { Component component = (Component)element; Record record = new Record(); - record.add(component.name + " : " + nameOf(g, component.type)); + record.add(component.name + " : " + nameOf(g, component.type)); //$NON-NLS-1$ StringBuilder b = new StringBuilder(); boolean first = true; for(Property property : component.properties) { if(first) first = false; else - b.append("\\n"); - b.append(nameOf(g, property.relation) + " = " + property.value); + b.append("\\n"); //$NON-NLS-1$ + b.append(nameOf(g, property.relation) + " = " + property.value); //$NON-NLS-1$ } record.add(b.toString()); components.put(component.name, record.toNode(graph)); @@ -155,7 +155,7 @@ public class ProceduralComponentInstanceViewer extends ResourceEditorPart { Edge edge = new Edge(cp1.first, cp2.first); if(cp1.second != null) { if(cp2.second != null) - edge.setLabel(cp1.second + "-" + cp2.second); + edge.setLabel(cp1.second + "-" + cp2.second); //$NON-NLS-1$ else edge.setLabel(cp1.second); } @@ -166,7 +166,7 @@ public class ProceduralComponentInstanceViewer extends ResourceEditorPart { } else { Node p = new Node(graph); - p.setShape("point"); + p.setShape("point"); //$NON-NLS-1$ boolean first = true; for(ConnectionPoint cp : cps) { Pair cp1 = getCp(g, graph, components, connectionPoints, cp);