Search in sources :

Example 66 with MessageDialogWithToggle

use of org.eclipse.jface.dialogs.MessageDialogWithToggle in project jbosstools-openshift by jbosstools.

the class DialogProvider method message.

@Override
public int message(String title, int type, String message, Consumer<String> callback, LinkedHashMap<String, Integer> buttonLabelToIdMap, int defaultButton, String preferencesKey) {
    boolean show = isShowDialog(preferencesKey);
    if (!show) {
        return IDialogProvider.NO_ID;
    }
    final int[] answer = new int[1];
    Display.getDefault().syncExec(() -> {
        MessageDialogWithToggle dialog = new LinkTextMessageDialogWithToggle(Display.getDefault().getActiveShell(), title, null, message, type | SWT.SHEET, buttonLabelToIdMap, defaultButton, MSG_DONT_REMIND_AGAIN, !show, callback);
        dialog.setPrefStore(OpenShiftUIActivator.getDefault().getPreferenceStore());
        dialog.setPrefKey(preferencesKey);
        answer[0] = dialog.open();
    });
    return answer[0];
}
Also used : MessageDialogWithToggle(org.eclipse.jface.dialogs.MessageDialogWithToggle)

Aggregations

MessageDialogWithToggle (org.eclipse.jface.dialogs.MessageDialogWithToggle)66 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)16 TableItem (org.eclipse.swt.widgets.TableItem)8 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)6 Point (org.pentaho.di.core.gui.Point)6 ArrayList (java.util.ArrayList)5 Shell (org.eclipse.swt.widgets.Shell)5 IOException (java.io.IOException)4 IProject (org.eclipse.core.resources.IProject)4 File (java.io.File)3 Display (org.eclipse.swt.widgets.Display)3 MessageBox (org.eclipse.swt.widgets.MessageBox)3 BackingStoreException (org.osgi.service.prefs.BackingStoreException)3 QueryEditorPart (com.cubrid.common.ui.query.editor.QueryEditorPart)2 JobFamily (com.cubrid.common.ui.spi.progress.JobFamily)2 List (java.util.List)2 Job (org.eclipse.core.runtime.jobs.Job)2 IPerspectiveDescriptor (org.eclipse.ui.IPerspectiveDescriptor)2 ConnectionContainer (org.knime.core.node.workflow.ConnectionContainer)2 WorkflowManager (org.knime.core.node.workflow.WorkflowManager)2