Search in sources :

Example 1 with CreateAnalysisOnHDFSAction

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

the class CreateAnalysisOnHDFSActionProvider method fillContextMenu.

@Override
public void fillContextMenu(IMenuManager menu) {
    if (!isShowMenu()) {
        return;
    }
    AbstractSvnRepositoryService svnReposService = GlobalServiceRegister.getDefault().getSvnRepositoryService(AbstractSvnRepositoryService.class);
    if (svnReposService != null && svnReposService.isReadonly()) {
        return;
    }
    RepositoryNode node = (RepositoryNode) getFirstRepositoryNode();
    if (node != null) {
        IAction action = null;
        if (node instanceof HDFSOfHCConnectionNode) {
            action = new CreateAnalysisOnHDFSAction(node);
            menu.add(action);
        }
    }
}
Also used : AbstractSvnRepositoryService(org.talend.dataprofiler.core.service.AbstractSvnRepositoryService) IAction(org.eclipse.jface.action.IAction) HDFSOfHCConnectionNode(org.talend.dq.nodes.hadoopcluster.HDFSOfHCConnectionNode) RepositoryNode(org.talend.repository.model.RepositoryNode) CreateAnalysisOnHDFSAction(org.talend.dataprofiler.core.ui.action.actions.CreateAnalysisOnHDFSAction)

Aggregations

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