Search in sources :

Example 1 with ExportForExchangeWizard

use of org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard in project tdq-studio-se by Talend.

the class ExportPatternsAction method run.

@Override
public void run() {
    Wizard wizard = isForExchange ? new ExportForExchangeWizard(folder.getFullPath().toString()) : new ExportPatternsWizard(node, isForExchange);
    WizardDialog dialog = null;
    // MOD hcheng 2009-07-07,for 8122.Add an help file in the "Export patterns for Talend exchange wizard".
    if (isForExchange) {
        IContext context = HelpSystem.getContext(HelpPlugin.getDefault().getPatternHelpContextID());
        IHelpResource[] relatedTopics = context.getRelatedTopics();
        String href = relatedTopics[3].getHref();
        dialog = new OpeningHelpWizardDialog(null, wizard, href);
    } else {
        // MOD yyi 2009-08-20,for 8689.Add help in "export pattern" wizard.
        IContext context = HelpSystem.getContext(HelpPlugin.getDefault().getPatternHelpContextID());
        IHelpResource[] relatedTopics = context.getRelatedTopics();
        String href = relatedTopics[4].getHref();
        dialog = new OpeningHelpWizardDialog(null, wizard, href);
    }
    wizard.setWindowTitle(getText());
    if (WizardDialog.OK == dialog.open()) {
        try {
            folder.refreshLocal(IResource.DEPTH_INFINITE, null);
        } catch (CoreException e) {
            log.error(e, e);
        }
    }
}
Also used : ExportPatternsWizard(org.talend.dataprofiler.core.pattern.ExportPatternsWizard) IContext(org.eclipse.help.IContext) CoreException(org.eclipse.core.runtime.CoreException) ExportForExchangeWizard(org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard) IHelpResource(org.eclipse.help.IHelpResource) OpeningHelpWizardDialog(org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog) Wizard(org.eclipse.jface.wizard.Wizard) ExportPatternsWizard(org.talend.dataprofiler.core.pattern.ExportPatternsWizard) ExportForExchangeWizard(org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard) OpeningHelpWizardDialog(org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 2 with ExportForExchangeWizard

use of org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard in project tdq-studio-se by Talend.

the class ExportParserRuleAction method run.

@Override
public void run() {
    Wizard wizard = isForExchange ? new ExportForExchangeWizard(WorkbenchUtils.getFolder((RepositoryNode) parserRuleFolder).getFullPath().toString()) : new ExportParserRuleWizard(parserRuleFolder, isForExchange);
    WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
    wizard.setWindowTitle(getText());
    if (WizardDialog.OK == dialog.open()) {
        try {
            IFolder folder = WorkbenchUtils.getFolder((RepositoryNode) parserRuleFolder);
            folder.refreshLocal(IResource.DEPTH_INFINITE, null);
        } catch (CoreException e) {
            log.error(e, e);
        }
    }
}
Also used : ExportParserRuleWizard(org.talend.dataprofiler.core.ui.wizard.parserrule.ExportParserRuleWizard) CoreException(org.eclipse.core.runtime.CoreException) ExportForExchangeWizard(org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard) Wizard(org.eclipse.jface.wizard.Wizard) ExportForExchangeWizard(org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard) ExportParserRuleWizard(org.talend.dataprofiler.core.ui.wizard.parserrule.ExportParserRuleWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog) IFolder(org.eclipse.core.resources.IFolder)

Aggregations

CoreException (org.eclipse.core.runtime.CoreException)2 Wizard (org.eclipse.jface.wizard.Wizard)2 WizardDialog (org.eclipse.jface.wizard.WizardDialog)2 ExportForExchangeWizard (org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard)2 IFolder (org.eclipse.core.resources.IFolder)1 IContext (org.eclipse.help.IContext)1 IHelpResource (org.eclipse.help.IHelpResource)1 ExportPatternsWizard (org.talend.dataprofiler.core.pattern.ExportPatternsWizard)1 OpeningHelpWizardDialog (org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog)1 ExportParserRuleWizard (org.talend.dataprofiler.core.ui.wizard.parserrule.ExportParserRuleWizard)1