return false;
if (DatabaseJob.inProgress())
return false;
- IResourceEditorInput input = (IResourceEditorInput) activeEditor.getEditorInput();
- return TypicalPropertyTester.isTypicalInstanceEditor(Simantics.getSession(), input.getResource());
+ if (activeEditor.getEditorInput() instanceof IResourceEditorInput) {
+ IResourceEditorInput input = (IResourceEditorInput) activeEditor.getEditorInput();
+ return TypicalPropertyTester.isTypicalInstanceEditor(Simantics.getSession(), input.getResource());
+ } else {
+ return false;
+ }
}
@Execute
return false;
if (DatabaseJob.inProgress())
return false;
- IResourceEditorInput input = (IResourceEditorInput) activeEditor.getEditorInput();
- return TypicalPropertyTester.isTypicalMasterEditor(Simantics.getSession(), input.getResource());
+ if (activeEditor.getEditorInput() instanceof IResourceEditorInput) {
+ IResourceEditorInput input = (IResourceEditorInput) activeEditor.getEditorInput();
+ return TypicalPropertyTester.isTypicalMasterEditor(Simantics.getSession(), input.getResource());
+ } else {
+ return false;
+ }
}
@Execute