]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling/src/org/simantics/modeling/GetSymbolGroups.java
Still working for multiple readers
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / GetSymbolGroups.java
1 package org.simantics.modeling;
2
3 import java.util.Collection;
4
5 import org.simantics.db.ReadGraph;
6 import org.simantics.db.Resource;
7 import org.simantics.db.common.request.ObjectsWithType;
8 import org.simantics.db.exception.DatabaseException;
9 import org.simantics.diagram.stubs.DiagramResource;
10 import org.simantics.layer0.Layer0;
11
12 public class GetSymbolGroups {
13
14     public static Collection<Resource> getSymbolGroups(ReadGraph graph, Resource model) throws DatabaseException {
15         Layer0 L0 = Layer0.getInstance(graph);
16         DiagramResource DIA = DiagramResource.getInstance(graph);
17         Collection<Resource> results = graph.syncRequest(new ObjectsWithType(model, L0.ConsistsOf, DIA.SymbolReferenceLibrary));
18         return results;
19     }
20 }