congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
OptionalMessageDialog
Code IndexAdd Tabnine to your IDE (free)

How to use
OptionalMessageDialog
in
org.eclipse.jdt.internal.ui.dialogs

Best Java code snippets using org.eclipse.jdt.internal.ui.dialogs.OptionalMessageDialog (Showing top 20 results out of 315)

origin: org.eclipse.jdt/org.eclipse.jdt.ui

protected void warnAboutTypeCommentDeprecation() {
  String key= IUIConstants.DIALOGSTORE_TYPECOMMENT_DEPRECATED;
  if (OptionalMessageDialog.isDialogEnabled(key)) {
    TemplateStore templates= JavaPlugin.getDefault().getTemplateStore();
    boolean isOldWorkspace= templates.findTemplate("filecomment") != null && templates.findTemplate("typecomment") != null; //$NON-NLS-1$ //$NON-NLS-2$
    if (!isOldWorkspace) {
      OptionalMessageDialog.setDialogEnabled(key, false);
    }
    String title= NewWizardMessages.NewElementWizard_typecomment_deprecated_title;
    String message= NewWizardMessages.NewElementWizard_typecomment_deprecated_message;
    OptionalMessageDialog.open(key, getShell(), title, null, message, MessageDialog.INFORMATION, new String[] { IDialogConstants.OK_LABEL }, 0);
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

/**
 * Opens the dialog but only if the user hasn't choosen to hide it.
 * Returns <code>NOT_SHOWN</code> if the dialog was not shown.
 */
public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
  if (!isDialogEnabled(id))
    return OptionalMessageDialog.NOT_SHOWN;
  
  MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex);
  return dialog.open();
}
origin: org.eclipse/org.eclipse.jdt.ui

protected Control createCustomArea(Composite parent) {
  Composite composite= new Composite(parent, SWT.NONE);
  GridLayout layout= new GridLayout();
  layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
  layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
  layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
  composite.setLayout(layout);
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  
  fHideDialogCheckBox= new Button(composite, SWT.CHECK | SWT.LEFT);
  fHideDialogCheckBox.setText(CHECKBOX_TEXT);
  fHideDialogCheckBox.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent e) {
      setDialogEnabled(fId, !((Button)e.widget).getSelection());
    }
  });
  applyDialogFont(fHideDialogCheckBox);
  return fHideDialogCheckBox;
}

origin: org.eclipse.jdt/org.eclipse.jdt.ui

if (OptionalMessageDialog.isDialogEnabled(PREF_WARN_ABOUT_EMPTY_ASSIST_CATEGORY)) {
  final Shell shell= JavaPlugin.getActiveWorkbenchShell();
  String title= JavaTextMessages.ContentAssistProcessor_all_disabled_title;
  int returnValue= dialog.open();
  if (restoreId == returnValue || settingsId == returnValue) {
    if (restoreId == returnValue) {
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void showSlowCleanUpDialog(final StringBuilder cleanUpNames) {
  if (OptionalMessageDialog.isDialogEnabled(SlowCleanUpWarningDialog.ID)) {
    Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    new SlowCleanUpWarningDialog(shell, FixMessages.CleanUpPostSaveListener_SlowCleanUpDialog_title, cleanUpNames.toString()).open();
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Sets whether the optional dialog is enabled and should be shown.
 */
public static void setDialogEnabled(String key, boolean isEnabled) {
  IDialogSettings settings= getDialogSettings();
  settings.put(key, !isEnabled);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
protected Control createContents(Composite parent) {
  Control contents= super.createContents(parent);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJavaHelpContextIds.SORT_MEMBERS_DIALOG);
  return contents;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public boolean close() {
  fDialogSettings.put(DIALOG_SETTINGS_SORT_ALL, fSortAllRadio.isSelected());
  return super.close();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

protected final void unhideAllDialogs() {
  OptionalMessageDialog.clearAllRememberedStates();
  MessageDialog.openInformation(getShell(), PreferencesMessages.JavaBasePreferencePage_do_not_hide_dialog_title, PreferencesMessages.JavaBasePreferencePage_do_not_hide_dialog_message);
}
origin: org.eclipse/org.eclipse.jdt.ui

super.createCustomArea(parent);
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

if (OptionalMessageDialog.isDialogEnabled(PREF_WARN_ABOUT_EMPTY_ASSIST_CATEGORY)) {
  final Shell shell= JavaPlugin.getActiveWorkbenchShell();
  String title= JavaTextMessages.ContentAssistProcessor_all_disabled_title;
  int returnValue= dialog.open();
  if (restoreId == returnValue || settingsId == returnValue) {
    if (restoreId == returnValue) {
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

private void showSlowCleanUpDialog(final StringBuffer cleanUpNames) {
  if (OptionalMessageDialog.isDialogEnabled(SlowCleanUpWarningDialog.ID)) {
    Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    new SlowCleanUpWarningDialog(shell, FixMessages.CleanUpPostSaveListener_SlowCleanUpDialog_title, cleanUpNames.toString()).open();
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

/**
 * Answers whether the optional dialog is enabled and should be shown.
 */
public static boolean isDialogEnabled(String key) {
  IDialogSettings settings= getDialogSettings();
  return !settings.getBoolean(key);
}

origin: org.eclipse/org.eclipse.jdt.ui

protected Control createContents(Composite parent) {
  Control contents= super.createContents(parent);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJavaHelpContextIds.SORT_MEMBERS_DIALOG);
  return contents;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public boolean close() {
  fDialogSettings.put(DIALOG_SETTINGS_SORT_ALL, fSortAllRadio.isSelected());
  return super.close();
}
origin: org.eclipse/org.eclipse.jdt.ui

protected final void unhideAllDialogs() {
  OptionalMessageDialog.clearAllRememberedStates();
  MessageDialog.openInformation(getShell(), PreferencesMessages.JavaBasePreferencePage_do_not_hide_dialog_title, PreferencesMessages.JavaBasePreferencePage_do_not_hide_dialog_message);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

super.createCustomArea(parent);
origin: org.eclipse/org.eclipse.jdt.ui

protected void warnAboutTypeCommentDeprecation() {
  String key= IUIConstants.DIALOGSTORE_TYPECOMMENT_DEPRECATED;
  if (OptionalMessageDialog.isDialogEnabled(key)) {
    TemplateStore templates= JavaPlugin.getDefault().getTemplateStore();
    boolean isOldWorkspace= templates.findTemplate("filecomment") != null && templates.findTemplate("typecomment") != null; //$NON-NLS-1$ //$NON-NLS-2$
    if (!isOldWorkspace) {
      OptionalMessageDialog.setDialogEnabled(key, false);
    }
    String title= NewWizardMessages.NewElementWizard_typecomment_deprecated_title; 
    String message= NewWizardMessages.NewElementWizard_typecomment_deprecated_message; 
    OptionalMessageDialog.open(key, getShell(), title, null, message, MessageDialog.INFORMATION, new String[] { IDialogConstants.OK_LABEL }, 0);
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
protected Control createCustomArea(Composite parent) {
  Composite composite= new Composite(parent, SWT.NONE);
  GridLayout layout= new GridLayout();
  layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
  layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
  layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
  composite.setLayout(layout);
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  fHideDialogCheckBox= new Button(composite, SWT.CHECK | SWT.LEFT);
  fHideDialogCheckBox.setText(fCheckBoxText);
  fHideDialogCheckBox.addSelectionListener(new SelectionAdapter() {
    @Override
    public void widgetSelected(SelectionEvent e) {
      setDialogEnabled(fId, !((Button)e.widget).getSelection());
    }
  });
  applyDialogFont(fHideDialogCheckBox);
  return fHideDialogCheckBox;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * Opens the dialog but only if the user hasn't chosen to hide it.
 *
 * @return the index of the pressed button or {@link SWT#DEFAULT} if the dialog got dismissed
 *         without pressing a button (e.g. via Esc) or {{@link #NOT_SHOWN} if the dialog was not
 *         shown
 */
public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex, String checkboxText) {
  if (!isDialogEnabled(id))
    return OptionalMessageDialog.NOT_SHOWN;
  MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex, checkboxText);
  return dialog.open();
}
org.eclipse.jdt.internal.ui.dialogsOptionalMessageDialog

Javadoc

This is a MessageDialog which allows the user to choose that the dialog isn't shown again the next time.

Most used methods

  • isDialogEnabled
    Answers whether the optional dialog is enabled and should be shown.
  • <init>
  • applyDialogFont
  • clearAllRememberedStates
    Clears all remembered information about hidden dialogs
  • close
  • convertHorizontalDLUsToPixels
  • convertVerticalDLUsToPixels
  • createContents
  • createCustomArea
  • getDialogSettings
    Returns this dialog
  • open
    Opens the dialog but only if the user hasn't chosen to hide it.
  • setDialogEnabled
    Sets whether the optional dialog is enabled and should be shown.
  • open,
  • setDialogEnabled,
  • getButtonLabels,
  • getReturnCode

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Path (java.nio.file)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now