public class DontAskAgainDialogs extends Object
IDialogSettings of your language UIPlugin.| Modifier and Type | Field and Description |
|---|---|
static String |
DONT_ASK_AGAIN_DIALOG_PREFIX
A section id that holds the "don't ask me again" dialog settings.
|
| Constructor and Description |
|---|
DontAskAgainDialogs() |
| Modifier and Type | Method and Description |
|---|---|
int |
askUser(String question,
String dialogTitle,
String storeKey,
org.eclipse.swt.widgets.Shell shell)
Opens a
MessageDialogWithToggle and stores the answer, if use activate the corresponding checkbox. |
void |
forgetAllUserDecisions()
Rewrites the
DONT_ASK_AGAIN_DIALOG_PREFIX section in IDialogSettings for the current language.All the user decisions will be reseted. |
String |
getUserDecision(String key)
Returns the stored user answer to the question identified with the passed key.
|
public static final String DONT_ASK_AGAIN_DIALOG_PREFIX
Value is of type String and is one of
MessageDialogWithToggle.ALWAYS,
MessageDialogWithToggle.NEVER or (default)
MessageDialogWithToggle.PROMPT.
public String getUserDecision(String key)
key - unique identifier . Represents the key to use when storing or reading the setting.String and is one of
MessageDialogWithToggle.ALWAYS,
MessageDialogWithToggle.NEVER or (default)
MessageDialogWithToggle.PROMPT. Never nullpublic int askUser(String question, String dialogTitle, String storeKey, org.eclipse.swt.widgets.Shell shell)
MessageDialogWithToggle and stores the answer, if use activate the corresponding checkbox.question - The question to ask.dialogTitle - TitlestoreKey - the key used to store the decision in IDialogSettings, also used to read them
getUserDecision(String)shell - the parent Shell of the dialogIDialogConstants.YES_ID, IDialogConstants.NO_ID or
IDialogConstants.CANCEL_IDpublic void forgetAllUserDecisions()
DONT_ASK_AGAIN_DIALOG_PREFIX section in IDialogSettings for the current language.Copyright © 2016. All Rights Reserved.