@Override public void undo() { EList currentList = (EList) (style.eGet(styleFeature)); command.undo(); if (needsCreate) { view.getStyles().remove(style); } }
@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(); }