Search in sources :

Example 31 with DBTableRepNode

use of org.talend.dq.nodes.DBTableRepNode 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

DBTableRepNode (org.talend.dq.nodes.DBTableRepNode)31 DBViewRepNode (org.talend.dq.nodes.DBViewRepNode)21 IRepositoryNode (org.talend.repository.model.IRepositoryNode)18 ArrayList (java.util.ArrayList)13 RepositoryNode (org.talend.repository.model.RepositoryNode)12 DFTableRepNode (org.talend.dq.nodes.DFTableRepNode)11 DBColumnRepNode (org.talend.dq.nodes.DBColumnRepNode)9 TreeSelection (org.eclipse.jface.viewers.TreeSelection)8 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)7 TdTable (org.talend.cwm.relational.TdTable)6 DBCatalogRepNode (org.talend.dq.nodes.DBCatalogRepNode)6 DBConnectionRepNode (org.talend.dq.nodes.DBConnectionRepNode)6 DBSchemaRepNode (org.talend.dq.nodes.DBSchemaRepNode)6 DFColumnRepNode (org.talend.dq.nodes.DFColumnRepNode)6 List (java.util.List)5 Test (org.junit.Test)5 PatternRepNode (org.talend.dq.nodes.PatternRepNode)5 SysIndicatorDefinitionRepNode (org.talend.dq.nodes.SysIndicatorDefinitionRepNode)5 TreeItem (org.eclipse.swt.widgets.TreeItem)4 DBColumnFolderRepNode (org.talend.dq.nodes.DBColumnFolderRepNode)4