Search in sources :

Example 11 with DFTableRepNode

use of org.talend.dq.nodes.DFTableRepNode in project tdq-studio-se by Talend.

the class ColumnsSelectionDialog method selectionChanged.

public void selectionChanged(SelectionChangedEvent event) {
    // MOD klliu 2011-01-27 15750 todo 31
    RepositoryNode selectedObj = (RepositoryNode) ((IStructuredSelection) event.getSelection()).getFirstElement();
    if (selectedObj != null) {
        if (selectedObj.hasChildren()) {
            this.selectedTreeRepoNode = selectedObj;
            this.setOutput(selectedObj);
            Boolean allCheckFlag = this.getTreeViewer().getChecked(selectedObj);
            List<?> repositoryNodeList = (List<?>) modelElementCheckedMap.get(selectedObj);
            if (repositoryNodeList != null) {
                this.getTableViewer().setCheckedElements(repositoryNodeList.toArray());
            } else // MOD klliu check Table/View node is select
            if (selectedObj instanceof DBTableRepNode || selectedObj instanceof DBViewRepNode || selectedObj instanceof DFTableRepNode) {
                if (allCheckFlag) {
                    this.getTableViewer().setCheckedElements(selectedObj.getChildren().get(0).getChildren().toArray());
                }
            }
        // ~
        }
    }
}
Also used : DBTableRepNode(org.talend.dq.nodes.DBTableRepNode) DFTableRepNode(org.talend.dq.nodes.DFTableRepNode) ArrayList(java.util.ArrayList) List(java.util.List) RepositoryNode(org.talend.repository.model.RepositoryNode) DQDBFolderRepositoryNode(org.talend.dq.nodes.DQDBFolderRepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) DBViewRepNode(org.talend.dq.nodes.DBViewRepNode)

Aggregations

DBTableRepNode (org.talend.dq.nodes.DBTableRepNode)11 DBViewRepNode (org.talend.dq.nodes.DBViewRepNode)11 DFTableRepNode (org.talend.dq.nodes.DFTableRepNode)11 IRepositoryNode (org.talend.repository.model.IRepositoryNode)9 ArrayList (java.util.ArrayList)7 RepositoryNode (org.talend.repository.model.RepositoryNode)6 DBColumnRepNode (org.talend.dq.nodes.DBColumnRepNode)5 DFColumnRepNode (org.talend.dq.nodes.DFColumnRepNode)5 List (java.util.List)3 TreeSelection (org.eclipse.jface.viewers.TreeSelection)3 AnalysisRepNode (org.talend.dq.nodes.AnalysisRepNode)3 DFConnectionRepNode (org.talend.dq.nodes.DFConnectionRepNode)3 DQDBFolderRepositoryNode (org.talend.dq.nodes.DQDBFolderRepositoryNode)3 PatternRepNode (org.talend.dq.nodes.PatternRepNode)3 ReportRepNode (org.talend.dq.nodes.ReportRepNode)3 RuleRepNode (org.talend.dq.nodes.RuleRepNode)3 Test (org.junit.Test)2 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)2 ContextRepNode (org.talend.dq.nodes.ContextRepNode)2 SysIndicatorDefinitionRepNode (org.talend.dq.nodes.SysIndicatorDefinitionRepNode)2