}
try {
-
- IModelingRules modelingRules = Simantics.getSession().syncRequest(DiagramRequests.getModelingRules(resource, null));
- if (modelingRules != null) {
- initialHints.setHint(DiagramModelHints.KEY_MODELING_RULES, modelingRules);
- }
-
- initialHints.setHint(SynchronizationHints.COPY_ADVISOR, getCopyAdvisor());
+ fillInitialDiagramHints(initialHints);
final RuntimeDiagramManager runtimeDiagramManager = RuntimeDiagramManager.create(Simantics.getSession(), resource, modelURI, RVI);
return ctx.getSceneGraph();
}
+ protected void fillInitialDiagramHints(IHintContext initialHints) throws DatabaseException {
+ IModelingRules modelingRules = Simantics.getSession().syncRequest(DiagramRequests.getModelingRules(resource, null));
+ if (modelingRules != null) {
+ initialHints.setHint(DiagramModelHints.KEY_MODELING_RULES, modelingRules);
+ }
+
+ initialHints.setHint(SynchronizationHints.COPY_ADVISOR, getCopyAdvisor());
+ }
+
protected IElementClassProvider createElementClassProvider(ReadGraph graph) throws DatabaseException {
DiagramResource dr = DiagramResource.getInstance(graph);
return ElementClassProviders.mappedProvider(