Search in sources :

Example 1 with ESBWizard

use of org.talend.repository.services.ui.ESBWizard in project tesb-studio-se by Talend.

the class CreateESBAction method doRun.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.jface.action.Action#run()
     */
@Override
protected void doRun() {
    RepositoryNode beanNode = getCurrentRepositoryNode();
    if (isToolbar()) {
        if (beanNode != null && beanNode.getContentType() != ESBRepositoryNodeType.SERVICES) {
            beanNode = null;
        }
        if (beanNode == null) {
            beanNode = getRepositoryNodeForDefault(ESBRepositoryNodeType.SERVICES);
        }
    }
    ISelection selection;
    IWorkbenchPage activePage = getActivePage();
    if (activePage == null) {
        selection = getSelection();
    } else {
        selection = getRepositorySelection();
    }
    if (selection.isEmpty()) {
        return;
    }
    ESBWizard beanWizard = new ESBWizard(PlatformUI.getWorkbench(), true, selection);
    WizardDialog dlg = new WizardDialog(Display.getCurrent().getActiveShell(), beanWizard);
    dlg.open();
}
Also used : ISelection(org.eclipse.jface.viewers.ISelection) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) ESBWizard(org.talend.repository.services.ui.ESBWizard) ProjectRepositoryNode(org.talend.core.repository.model.ProjectRepositoryNode) RepositoryNode(org.talend.repository.model.RepositoryNode) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Aggregations

ISelection (org.eclipse.jface.viewers.ISelection)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 ProjectRepositoryNode (org.talend.core.repository.model.ProjectRepositoryNode)1 RepositoryNode (org.talend.repository.model.RepositoryNode)1 ESBWizard (org.talend.repository.services.ui.ESBWizard)1