]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/handlers/e4/SyncCurrentTypicalInstanceWithTemplate.java
Rid TypicalPropertyTester of database read transactions
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / handlers / e4 / SyncCurrentTypicalInstanceWithTemplate.java
index 714e72eb6c05b7ee19637ff533bc2f6630c5a3ac..fb6b31382579bebdd62181170fbaa80092a1d30c 100644 (file)
@@ -46,8 +46,7 @@ public class SyncCurrentTypicalInstanceWithTemplate {
         if (DatabaseJob.inProgress())
             return false;
         if (activeEditor.getEditorInput() instanceof IResourceEditorInput) {
-            IResourceEditorInput input = (IResourceEditorInput) activeEditor.getEditorInput();
-            return TypicalPropertyTester.isTypicalInstanceEditor(Simantics.getSession(), input.getResource());
+            return TypicalPropertyTester.isTypicalInstanceEditor(activeEditor);
         } else {
             return false;
         }