Search in sources :

Example 6 with OpeningHelpWizardDialog

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

the class CreateDateAnalysisAction method getPredefinedDialog.

@Override
protected WizardDialog getPredefinedDialog() {
    AnalysisParameter parameter = new AnalysisParameter();
    parameter.setConnectionRepNode(getColumns()[0]);
    ColumnWizard wizard = (ColumnWizard) WizardFactory.createAnalysisWizard(AnalysisType.MULTIPLE_COLUMN, parameter);
    wizard.setForcePreviousAndNextButtons(true);
    TimeSliceOptionPage page = new TimeSliceOptionPage();
    wizard.setExtenalPages(new WizardPage[] { page });
    return new OpeningHelpWizardDialog(null, wizard, FormEnum.TimeSlicesForm.getHelpHref(), page);
}
Also used : AnalysisParameter(org.talend.dq.analysis.parameters.AnalysisParameter) OpeningHelpWizardDialog(org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog) ColumnWizard(org.talend.dataprofiler.core.ui.wizard.analysis.column.ColumnWizard)

Example 7 with OpeningHelpWizardDialog

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

the class AnalysisTableTreeViewer method openIndicatorOptionDialog.

/*
     * (non-Javadoc)
     * 
     * @see
     * org.talend.dataprofiler.core.ui.editor.composite.AbstractColumnDropTree#openIndicatorOptionDialog(org.eclipse
     * .swt.widgets.Shell, org.eclipse.swt.widgets.TreeItem)
     */
@Override
public boolean openIndicatorOptionDialog(Shell shell, TreeItem indicatorItem) {
    if (isDirty()) {
        masterPage.doSave(null);
    }
    TableIndicatorUnit indicatorUnit = (TableIndicatorUnit) indicatorItem.getData(INDICATOR_UNIT_KEY);
    if (FormEnum.isExsitingForm(indicatorUnit)) {
        TableIndicatorOptionsWizard wizard = new TableIndicatorOptionsWizard(indicatorUnit);
        String href = FormEnum.getFirstFormHelpHref(indicatorUnit);
        OpeningHelpWizardDialog optionDialog = new OpeningHelpWizardDialog(shell, wizard, href);
        optionDialog.create();
        if (Window.OK == optionDialog.open()) {
            setDirty(wizard.isDirty());
            return hasIndicatorParameters(indicatorUnit);
        }
    } else {
        openNoIndicatorOptionsMessageDialog(shell);
    }
    return false;
}
Also used : TableIndicatorOptionsWizard(org.talend.dataprofiler.core.ui.wizard.indicator.TableIndicatorOptionsWizard) TableIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.TableIndicatorUnit) OpeningHelpWizardDialog(org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog)

Example 8 with OpeningHelpWizardDialog

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

the class IndicatorsComp method openIndicatorOptionDialog.

public boolean openIndicatorOptionDialog(Shell shell, TreeItem indicatorItem) {
    if (isDirty()) {
        masterPage.doSave(null);
    }
    ColumnSetIndicatorUnit indicatorUnit = (ColumnSetIndicatorUnit) indicatorItem.getData(INDICATOR_KEY);
    if (indicatorUnit.isExsitingForm()) {
        IndicatorOptionsWizard wizard = new IndicatorOptionsWizard(indicatorUnit);
        String href = FormEnum.getFirstFormHelpHref(indicatorUnit);
        OpeningHelpWizardDialog optionDialog = new OpeningHelpWizardDialog(shell, wizard, href);
        if (Window.OK == optionDialog.open()) {
            masterPage.setDirty(wizard.isDirty());
            return hasIndicatorParameters(indicatorUnit.getIndicator());
        }
    } else {
        // $NON-NLS-1$
        MessageDialogWithToggle.openInformation(// $NON-NLS-1$
        shell, // $NON-NLS-1$
        DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.information"), // $NON-NLS-1$
        DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.nooption"));
    }
    return false;
}
Also used : OpeningHelpWizardDialog(org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog) IndicatorOptionsWizard(org.talend.dataprofiler.core.ui.wizard.indicator.IndicatorOptionsWizard) ColumnSetIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit)

Example 9 with OpeningHelpWizardDialog

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

the class CreatePatternAction method run.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.jface.action.Action#run()
     */
@Override
public void run() {
    if (folder.exists()) {
        PatternParameter parameter = new PatternParameter();
        FolderProvider folderProvider = new FolderProvider();
        folderProvider.setFolderResource(folder);
        parameter.setFolderProvider(folderProvider);
        CreatePatternWizard fileWizard;
        if (this.expression != null && this.lanuage != null) {
            fileWizard = (CreatePatternWizard) WizardFactory.createPatternWizard(type, parameter, expression, lanuage);
        } else {
            fileWizard = (CreatePatternWizard) WizardFactory.createPatternWizard(type, parameter);
        }
        fileWizard.setPurpose(purpose);
        IContext context = HelpSystem.getContext(HelpPlugin.getDefault().getPatternHelpContextID());
        IHelpResource[] relatedTopics = context.getRelatedTopics();
        String href = relatedTopics[0].getHref();
        switch(type) {
            case SQL_LIKE:
                href = relatedTopics[1].getHref();
                break;
            default:
                break;
        }
        WizardDialog dialog = new OpeningHelpWizardDialog(Display.getDefault().getActiveShell(), fileWizard, href);
        fileWizard.setWindowTitle(getText());
        if (WizardDialog.OK == dialog.open())
            ProxyRepositoryManager.getInstance().save();
    }
}
Also used : FolderProvider(org.talend.cwm.management.api.FolderProvider) IContext(org.eclipse.help.IContext) CreatePatternWizard(org.talend.dataprofiler.core.pattern.CreatePatternWizard) IHelpResource(org.eclipse.help.IHelpResource) OpeningHelpWizardDialog(org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog) PatternParameter(org.talend.dq.analysis.parameters.PatternParameter) OpeningHelpWizardDialog(org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 10 with OpeningHelpWizardDialog

use of org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog 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)

Aggregations

OpeningHelpWizardDialog (org.talend.dataprofiler.core.ui.utils.OpeningHelpWizardDialog)10 IContext (org.eclipse.help.IContext)5 WizardDialog (org.eclipse.jface.wizard.WizardDialog)5 IHelpResource (org.eclipse.help.IHelpResource)4 FolderProvider (org.talend.cwm.management.api.FolderProvider)3 IndicatorOptionsWizard (org.talend.dataprofiler.core.ui.wizard.indicator.IndicatorOptionsWizard)2 AnalysisParameter (org.talend.dq.analysis.parameters.AnalysisParameter)2 CoreException (org.eclipse.core.runtime.CoreException)1 DoubleClickEvent (org.eclipse.jface.viewers.DoubleClickEvent)1 IDoubleClickListener (org.eclipse.jface.viewers.IDoubleClickListener)1 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)1 Wizard (org.eclipse.jface.wizard.Wizard)1 AnalysisTypeNode (org.talend.dataprofiler.core.model.nodes.analysis.AnalysisTypeNode)1 CreatePatternWizard (org.talend.dataprofiler.core.pattern.CreatePatternWizard)1 ExportPatternsWizard (org.talend.dataprofiler.core.pattern.ExportPatternsWizard)1 ImportPatternsWizard (org.talend.dataprofiler.core.pattern.ImportPatternsWizard)1 ColumnSetIndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit)1 IndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit)1