@Override
  public void run() {
    if (!(definition instanceof SubModelPaletteItemDefinition)) return;
    if (definition != null) {
      try {
        final SubModelPaletteItemDefinition item = (SubModelPaletteItemDefinition) definition;
        final String name = item.getName();

        final IProject pass = ModelUtils.getPasserelleProject();
        final IFile file = pass.getFile(name + ".moml");

        final IPasserelleMultiPageEditor ed =
            (IPasserelleMultiPageEditor)
                EclipseUtils.openEditor(file, PasserelleModelMultiPageEditor.ID);
        ed.setPasserelleEditorActive();

      } catch (Exception e) {
        logger.error("Cannot edit submodel!", e);
      }
    }
  }
 protected boolean checkEnabled() {
   if (!(definition instanceof SubModelPaletteItemDefinition)) return false;
   SubModelPaletteItemDefinition item = (SubModelPaletteItemDefinition) definition;
   return item.getPath() != null && item.getWorkSpace() != null;
 }