Search in sources :

Example 1 with CreateHiveOfHCAction

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

the class CreateHiveOfHCActionProvider 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) {
        if (HadoopClusterUtils.getDefault().hideAction(node)) {
            return;
        }
        // ~20051
        IAction action = null;
        if (node instanceof HadoopClusterConnectionRepNode || node instanceof HiveOfHCFolderRepNode) {
            action = new CreateHiveOfHCAction(node);
            menu.add(action);
        }
    }
}
Also used : HiveOfHCFolderRepNode(org.talend.dq.nodes.hadoopcluster.HiveOfHCFolderRepNode) AbstractSvnRepositoryService(org.talend.dataprofiler.core.service.AbstractSvnRepositoryService) IAction(org.eclipse.jface.action.IAction) CreateHiveOfHCAction(org.talend.dataprofiler.core.ui.action.actions.CreateHiveOfHCAction) RepositoryNode(org.talend.repository.model.RepositoryNode) HadoopClusterConnectionRepNode(org.talend.dq.nodes.hadoopcluster.HadoopClusterConnectionRepNode)

Example 2 with CreateHiveOfHCAction

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

the class TOPRepositoryService method createHive.

/*
     * (non-Javadoc)
     * 
     * @see org.talend.core.ITDQRepositoryService#createHive(org.talend.repository.model.RepositoryNode)
     */
public ConnectionItem createHive(RepositoryNode currentNode) {
    // to open the wizard: create hive
    CreateHiveOfHCAction createHive = new CreateHiveOfHCAction(currentNode.getParent().getParent());
    createHive.run();
    return createHive.getConnectionItem();
}
Also used : CreateHiveOfHCAction(org.talend.dataprofiler.core.ui.action.actions.CreateHiveOfHCAction)

Aggregations

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