Search in sources :

Example 1 with CreateHDFSAction

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

the class CreateHDFSActionProvider method fillContextMenu.

@Override
public void fillContextMenu(IMenuManager menu) {
    // MOD mzhao user readonly role on svn repository mode.
    if (!isShowMenu()) {
        return;
    }
    // MOD mzhao user readonly role on svn repository mode.
    AbstractSvnRepositoryService svnReposService = GlobalServiceRegister.getDefault().getSvnRepositoryService(AbstractSvnRepositoryService.class);
    if (svnReposService != null && svnReposService.isReadonly()) {
        return;
    }
    // MOD gdbu 2011-4-1 bug 20051
    RepositoryNode node = (RepositoryNode) getFirstRepositoryNode();
    if (node != null) {
        // ~20051
        IAction action = null;
        if (node instanceof HadoopClusterConnectionRepNode || node instanceof HDFSOfHCFolderRepNode) {
            action = new CreateHDFSAction(node);
            menu.add(action);
        }
    }
}
Also used : HDFSOfHCFolderRepNode(org.talend.dq.nodes.hadoopcluster.HDFSOfHCFolderRepNode) AbstractSvnRepositoryService(org.talend.dataprofiler.core.service.AbstractSvnRepositoryService) IAction(org.eclipse.jface.action.IAction) CreateHDFSAction(org.talend.dataprofiler.core.ui.action.actions.CreateHDFSAction) RepositoryNode(org.talend.repository.model.RepositoryNode) HadoopClusterConnectionRepNode(org.talend.dq.nodes.hadoopcluster.HadoopClusterConnectionRepNode)

Aggregations

IAction (org.eclipse.jface.action.IAction)1 AbstractSvnRepositoryService (org.talend.dataprofiler.core.service.AbstractSvnRepositoryService)1 CreateHDFSAction (org.talend.dataprofiler.core.ui.action.actions.CreateHDFSAction)1 HDFSOfHCFolderRepNode (org.talend.dq.nodes.hadoopcluster.HDFSOfHCFolderRepNode)1 HadoopClusterConnectionRepNode (org.talend.dq.nodes.hadoopcluster.HadoopClusterConnectionRepNode)1 RepositoryNode (org.talend.repository.model.RepositoryNode)1