コード例 #1
0
  /** @see nexcore.tool.uml.ui.project.explorer.command.UMLExplorerExtendedCommand#initialize() */
  @Override
  public void initialize() {
    if (SemanticModelHandlerRegistry.getInstance() != null) {
      semanticModelHandler =
          SemanticModelHandlerRegistry.getInstance()
              .getHandlerInstance(
                  UICoreConstant.NEXCORE_TOOL_UML_UI_PROJECT_SEMANTIC_MODEL_HANDLER);

      if (semanticModelHandler != null && selectedElementList != null) {
        semanticModelHandler.setElementList(selectedElementList);
        semanticModelHandler.setProgressMonitor(monitor);
      }
    }
  }
コード例 #2
0
  /** @see org.eclipse.emf.transaction.RecordingCommand#doExecute() */
  @Override
  protected void doExecute() {
    MergeClassDialog dialog =
        new MergeClassDialog(
            parentShell, new ProjectItemLabelProvider(), new ProjectItemTreeContentProvider(2));

    if (dialog.open() != Window.OK) {
      return;
    }

    if (dialog.getFirstResult() != null && dialog.getClassName() != null) {
      semanticModelHandler.initializeClassesMerger(
          dialog.getFirstResult(), dialog.getClassName(), dialog.isClear());
    }

    semanticModelHandler.mergeClassToClass();
  }