import java.lang.reflect.Array;
import java.net.URL;
import java.nio.charset.Charset;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.TreeMap;
+import java.util.TreeSet;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicReference;
Class<?> clazz = o.getClass();
if(o instanceof Connection) {
Connection c = (Connection)o;
- ArrayList<String> result = new ArrayList<String>();
+ TreeSet<String> rvis = new TreeSet<>();
for(VariableConnectionPointDescriptor v : c.getConnectionPointDescriptors(graph, null)) {
- result.add(v.getRelativeRVI(graph, base));
+ rvis.add(v.getRelativeRVI(graph, base));
}
- return "c " + result.toString(); //$NON-NLS-1$
+ return "c " + rvis.toString(); //$NON-NLS-1$
} else if (clazz.isArray()) {
if(int[].class == clazz) {
return Arrays.toString((int[])o);
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
+import java.util.TreeSet;
import org.simantics.databoard.Bindings;
import org.simantics.db.ReadGraph;
if(property.getClassifications(graph).contains(StructuralResource2.URIs.ConnectionRelation)) {
dump.append(property.getName(graph));
Connection c = property.getValue(graph);
+ TreeSet<String> rvis = new TreeSet<>();
for(VariableConnectionPointDescriptor desc : c.getConnectionPointDescriptors(graph, null)) {
+ rvis.add(desc.getRelativeRVI(graph, v));
+ }
+ for(String rvi : rvis) {
dump.append(" ");
- dump.append(desc.getRelativeRVI(graph, v));
+ dump.append(rvi);
}
dump.append("\n");
}