]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/adapters/ExistingInstancesRemover.java
Added new field TypeId to dependency index for exact type searching
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / adapters / ExistingInstancesRemover.java
index 787a400f9439022a4346532bd3c6fce3471127fe..84c0f4151d5b4f0c437d301cd9f1d920208b57fa 100644 (file)
@@ -90,23 +90,6 @@ public class ExistingInstancesRemover extends AbstractRemover {
                if (indexRoot == null)
                        return Collections.emptySet();
 
-//             @SuppressWarnings("rawtypes")
-//             Function modules = graph.adapt(Layer0X.getInstance(graph).Dependencies, Function.class);
-//             @SuppressWarnings("unchecked")
-//             List<Map<String, Object>> result = (List<Map<String, Object>>) modules.apply(graph, root, "Types:\"" + IndexQueries.escape(componentTypeName) + "\"");
-//             if (result.isEmpty()) {
-//                     justRemove(graph);
-//                     return;
-//             }
-//
-//             final Set<Resource> instances = new HashSet<Resource>();
-//             for (Map<String, Object> entry : result) {
-//                     Resource c = (Resource) entry.get(Dependencies.FIELD_RESOURCE);
-//                     if (c != null && graph.hasStatement(c, L0.InstanceOf, resource)) {
-//                             instances.add(c);
-//                     }
-//             }
-
                Set<Resource> result = new THashSet<Resource>();
                Instances search = graph.adapt(type, Instances.class);
                discoverInstances(graph, type, indexRoot, search, result);