Search in sources :

Example 26 with DBConnectionRepNode

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

DBConnectionRepNode (org.talend.dq.nodes.DBConnectionRepNode)26 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)14 IRepositoryNode (org.talend.repository.model.IRepositoryNode)12 DBCatalogRepNode (org.talend.dq.nodes.DBCatalogRepNode)9 Connection (org.talend.core.model.metadata.builder.connection.Connection)8 DBSchemaRepNode (org.talend.dq.nodes.DBSchemaRepNode)8 RepositoryNode (org.talend.repository.model.RepositoryNode)8 ArrayList (java.util.ArrayList)6 DBTableRepNode (org.talend.dq.nodes.DBTableRepNode)6 DoubleClickEvent (org.eclipse.jface.viewers.DoubleClickEvent)4 IDoubleClickListener (org.eclipse.jface.viewers.IDoubleClickListener)4 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)4 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)4 PersistenceException (org.talend.commons.exception.PersistenceException)4 DBColumnRepNode (org.talend.dq.nodes.DBColumnRepNode)4 DBConnectionFolderRepNode (org.talend.dq.nodes.DBConnectionFolderRepNode)4 DFConnectionRepNode (org.talend.dq.nodes.DFConnectionRepNode)4 List (java.util.List)3 Test (org.junit.Test)3 DatabaseConnection (org.talend.core.model.metadata.builder.connection.DatabaseConnection)3