Search in sources :

Example 1 with GroupEditDialog

use of com.cubrid.common.ui.common.dialog.GroupEditDialog in project cubrid-manager by CUBRID.

the class GroupPropertyAction method run.

/**
	 * Filter
	 */
public void run() {
    Object[] selected = this.getSelectedObj();
    if (selected == null || selected.length == 0) {
        return;
    }
    if (!(selected[0] instanceof CubridGroupNode)) {
        return;
    }
    CubridNavigatorView cubridNavigatorView = CubridNavigatorView.getNavigatorView(navigatorViewId);
    if (cubridNavigatorView == null) {
        return;
    }
    TreeViewer tv = cubridNavigatorView.getViewer();
    CubridGroupNode group = (CubridGroupNode) selected[0];
    GroupEditDialog dialog = new GroupEditDialog(shell, cubridNavigatorView.getGroupNodeManager(), cubridNavigatorView.getGroupNodeManager().getAllGroupNodes(), group);
    if (dialog.open() == Dialog.OK) {
        Object[] objs = tv.getExpandedElements();
        cubridNavigatorView.setShowGroup(true);
        if (objs != null) {
            tv.setExpandedElements(objs);
        }
    }
}
Also used : GroupEditDialog(com.cubrid.common.ui.common.dialog.GroupEditDialog) CubridGroupNode(com.cubrid.common.ui.spi.model.CubridGroupNode) CubridNavigatorView(com.cubrid.common.ui.common.navigator.CubridNavigatorView) TreeViewer(org.eclipse.jface.viewers.TreeViewer)

Aggregations

GroupEditDialog (com.cubrid.common.ui.common.dialog.GroupEditDialog)1 CubridNavigatorView (com.cubrid.common.ui.common.navigator.CubridNavigatorView)1 CubridGroupNode (com.cubrid.common.ui.spi.model.CubridGroupNode)1 TreeViewer (org.eclipse.jface.viewers.TreeViewer)1