Example usage for org.eclipse.jface.dialogs MessageDialogWithToggle openInformation

List of usage examples for org.eclipse.jface.dialogs MessageDialogWithToggle openInformation

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs MessageDialogWithToggle openInformation.

Prototype

public static void openInformation(Shell parent, String title, String message) 

Source Link

Document

Convenience method to open a standard information dialog.

Usage

From source file:org.jboss.tools.maven.conversion.ui.handlers.ConvertToMavenDependencyHandler.java

License:Open Source License

@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {

    final IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);

    ISelection selection = HandlerUtil.getCurrentSelection(event);

    Set<IClasspathEntry> entries = getSelectedClasspathEntries(selection);

    if (entries == null || entries.isEmpty()) {
        MessageDialogWithToggle.openInformation(window.getShell(), "Convert to Maven Dependency",
                "Nothing to convert");
        return null;
    }//  w  w  w .  ja va 2 s .  c  o m

    ConvertToMavenDependencyWizard wizard = new ConvertToMavenDependencyWizard(null, //project,
            null);

    WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
    dialog.open();
    return null;
}

From source file:org.talend.dataprofiler.core.ui.editor.composite.AbstractColumnDropTree.java

License:Open Source License

/**
 * DOC msjian Comment method "openNoIndicatorOptionsMessageDialog".
 * /*from   w w  w.j  a  va2s  .c  o m*/
 * @param shell
 */
public void openNoIndicatorOptionsMessageDialog(Shell shell) {
    MessageDialogWithToggle.openInformation(shell,
            DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.information"), //$NON-NLS-1$
            DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.nooption")); //$NON-NLS-1$ 
}

From source file:org.talend.dataprofiler.core.ui.editor.composite.IndicatorsComp.java

License:Open Source License

public boolean openIndicatorOptionDialog(Shell shell, TreeItem indicatorItem) {
    if (isDirty()) {
        masterPage.doSave(null);/*from   w  w w.  ja v  a 2 s  .c  o m*/
    }

    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 {
        MessageDialogWithToggle.openInformation(shell,
                DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.information"), //$NON-NLS-1$
                DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.nooption")); //$NON-NLS-1$ 
    }
    return false;
}

From source file:org.talend.dataprofiler.core.ui.pref.EditorPreferencePage.java

License:Open Source License

@Override
public boolean performOk() {
    if (unfoldAllSectionsButton.getSelection()) {
        setCurrentFolding(UNFOLD_ALL_SECTIONS);
    } else if (foldAllSectionsButton.getSelection()) {
        setCurrentFolding(FOLD_ALL_SECTIONS);
    } else if (unfoldFirstSectionButton.getSelection()) {
        setCurrentFolding(UNFOLD_FIRST_SECTION);
    } else {//from ww w  . jav a  2 s  .  c o m
        setCurrentFolding(UNFOLD_SELECT_SECTION);
    }

    savePreferenceValues();

    // ADD yyi 2010-07-07 for 13964
    hideGraphicsSectionForAnaSettingsPage.store();
    hideGraphicsForAnaResultPage.store();
    // ~ 13964

    // MOD xqliu 2010-03-10 feature 10834
    if (checkPageSize(this.pageSizeText.getText()) && checkPageSize(this.dqruleSizeText.getText())) {
        InstanceScope.INSTANCE.getNode(CorePlugin.PLUGIN_ID).put(ANALYZED_ITEMS_PER_PAGE,
                pageSizeText.getText());
        InstanceScope.INSTANCE.getNode(CorePlugin.PLUGIN_ID).put(DQ_RULES_PER_PAGE, dqruleSizeText.getText());
        try {
            InstanceScope.INSTANCE.getNode(CorePlugin.PLUGIN_ID).flush();
        } catch (BackingStoreException e) {
            log.error(e);
        }
        return super.performOk();
    } else {
        String msg = DefaultMessagesImpl.getString("PerformancePreferencePage.pageSizeMsg");//$NON-NLS-1$
        if (!checkPageSize(this.dqruleSizeText.getText())) {
            msg = DefaultMessagesImpl.getString("PerformancePreferencePage.dqruleSizeMsg");//$NON-NLS-1$
        }
        MessageDialogWithToggle.openInformation(getShell(),
                DefaultMessagesImpl.getString("PerformancePreferencePage.information"), //$NON-NLS-1$
                msg);
        return false;
    }
    // ~10834

}