Search in sources :

Example 1 with UnGroupWidgetsAction

use of org.csstudio.display.builder.editor.undo.UnGroupWidgetsAction in project org.csstudio.display.builder by kasemir.

the class RemoveGroupAction method run.

@Override
public void run() {
    editor.getWidgetSelectionHandler().clear();
    // Group's children list will be empty, create copy to select la
    final List<Widget> widgets = new ArrayList<>(group.runtimeChildren().getValue());
    final UndoableActionManager undo = editor.getUndoableActionManager();
    undo.execute(new UnGroupWidgetsAction(group));
    editor.getWidgetSelectionHandler().setSelection(widgets);
}
Also used : UnGroupWidgetsAction(org.csstudio.display.builder.editor.undo.UnGroupWidgetsAction) UndoableActionManager(org.csstudio.display.builder.util.undo.UndoableActionManager) GroupWidget(org.csstudio.display.builder.model.widgets.GroupWidget) Widget(org.csstudio.display.builder.model.Widget) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 UnGroupWidgetsAction (org.csstudio.display.builder.editor.undo.UnGroupWidgetsAction)1 Widget (org.csstudio.display.builder.model.Widget)1 GroupWidget (org.csstudio.display.builder.model.widgets.GroupWidget)1 UndoableActionManager (org.csstudio.display.builder.util.undo.UndoableActionManager)1