コード例 #1
0
 @Override
 public void undo() {
   EList currentList = (EList) (style.eGet(styleFeature));
   command.undo();
   if (needsCreate) {
     view.getStyles().remove(style);
   }
 }
コード例 #2
0
  @Override
  public boolean prepare() {
    style = view.getNamedStyle(styleClass, styleName);

    if (needsCreate = (style == null)) {
      style = (NamedStyle) NotationFactory.eINSTANCE.create(styleClass);
      style.setName(styleName);
    }

    command = createCommand();

    //		return true;
    return command.canExecute();
  }