Search in sources :

Example 6 with ReportFileRepNode

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

the class LocalRepositoryObjectCRUD method isForbidNode.

/**
 * check whether the node is forbidden to drag.
 *
 * @param sourceNode
 * @return
 */
private boolean isForbidNode(IRepositoryNode sourceNode) {
    ENodeType type = sourceNode.getType();
    // MOD xqliu 2012-05-22 TDQ-4831 allow user to drag Jrxml file
    boolean flag = (type != null && type == ENodeType.SYSTEM_FOLDER) || sourceNode instanceof ReportFileRepNode || sourceNode instanceof ReportAnalysisRepNode;
    // ~ TDQ-4831
    if (!flag) {
        RepositoryNode parent = sourceNode.getParent();
        if (parent != null) {
            flag = parent instanceof AnalysisRepNode || parent instanceof ReportRepNode || (parent instanceof AnalysisSubFolderRepNode && ((AnalysisSubFolderRepNode) parent).getObject() == null);
        }
    }
    return flag;
}
Also used : ReportFileRepNode(org.talend.dq.nodes.ReportFileRepNode) ReportAnalysisRepNode(org.talend.dq.nodes.ReportAnalysisRepNode) AnalysisRepNode(org.talend.dq.nodes.AnalysisRepNode) ReportRepNode(org.talend.dq.nodes.ReportRepNode) ENodeType(org.talend.repository.model.IRepositoryNode.ENodeType) DQRepositoryNode(org.talend.dq.nodes.DQRepositoryNode) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) ReportAnalysisRepNode(org.talend.dq.nodes.ReportAnalysisRepNode) AnalysisSubFolderRepNode(org.talend.dq.nodes.AnalysisSubFolderRepNode)

Aggregations

ReportFileRepNode (org.talend.dq.nodes.ReportFileRepNode)6 DQRepositoryNode (org.talend.dq.nodes.DQRepositoryNode)4 IRepositoryNode (org.talend.repository.model.IRepositoryNode)4 AnalysisRepNode (org.talend.dq.nodes.AnalysisRepNode)3 PartInitException (org.eclipse.ui.PartInitException)2 PersistenceException (org.talend.commons.exception.PersistenceException)2 ReportAnalysisRepNode (org.talend.dq.nodes.ReportAnalysisRepNode)2 ReportRepNode (org.talend.dq.nodes.ReportRepNode)2 RepositoryNode (org.talend.repository.model.RepositoryNode)2 ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 IFile (org.eclipse.core.resources.IFile)1 IProject (org.eclipse.core.resources.IProject)1 IPath (org.eclipse.core.runtime.IPath)1 IMenuListener (org.eclipse.jface.action.IMenuListener)1 IMenuManager (org.eclipse.jface.action.IMenuManager)1 MenuManager (org.eclipse.jface.action.MenuManager)1 ColumnViewer (org.eclipse.jface.viewers.ColumnViewer)1 ISelection (org.eclipse.jface.viewers.ISelection)1 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)1