Search in sources :

Example 1 with PackageFilterAction

use of org.talend.dataprofiler.core.ui.action.actions.PackageFilterAction in project tdq-studio-se by Talend.

the class MetaDataFilterProvider method fillContextMenu.

@Override
public void fillContextMenu(IMenuManager menu) {
    // MOD mzhao user readonly role on svn repository mode.
    if (!isShowMenu()) {
        return;
    }
    TreeSelection currentSelection = ((TreeSelection) this.getContext().getSelection());
    Object firstElement = currentSelection.getFirstElement();
    if (firstElement instanceof IRepositoryNode) {
        IRepositoryNode node = (IRepositoryNode) firstElement;
        if (node instanceof DBConnectionRepNode) {
            PackageFilterAction packageFilterAction = new PackageFilterAction(node);
            menu.add(packageFilterAction);
        } else if (node instanceof DBTableRepNode || node instanceof DBViewRepNode) {
            ColumnFilterAction ecfAction = new ColumnFilterAction(node);
            menu.add(ecfAction);
        }
    }
}
Also used : DBConnectionRepNode(org.talend.dq.nodes.DBConnectionRepNode) DBTableRepNode(org.talend.dq.nodes.DBTableRepNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) TreeSelection(org.eclipse.jface.viewers.TreeSelection) ColumnFilterAction(org.talend.dataprofiler.core.ui.action.actions.ColumnFilterAction) PackageFilterAction(org.talend.dataprofiler.core.ui.action.actions.PackageFilterAction) DBViewRepNode(org.talend.dq.nodes.DBViewRepNode)

Aggregations

TreeSelection (org.eclipse.jface.viewers.TreeSelection)1 ColumnFilterAction (org.talend.dataprofiler.core.ui.action.actions.ColumnFilterAction)1 PackageFilterAction (org.talend.dataprofiler.core.ui.action.actions.PackageFilterAction)1 DBConnectionRepNode (org.talend.dq.nodes.DBConnectionRepNode)1 DBTableRepNode (org.talend.dq.nodes.DBTableRepNode)1 DBViewRepNode (org.talend.dq.nodes.DBViewRepNode)1 IRepositoryNode (org.talend.repository.model.IRepositoryNode)1