本文整理匯總了Java中org.eclipse.jface.dialogs.MessageDialogWithToggle.PROMPT屬性的典型用法代碼示例。如果您正苦於以下問題:Java MessageDialogWithToggle.PROMPT屬性的具體用法?Java MessageDialogWithToggle.PROMPT怎麽用?Java MessageDialogWithToggle.PROMPT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.jface.dialogs.MessageDialogWithToggle
的用法示例。
在下文中一共展示了MessageDialogWithToggle.PROMPT屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: openQuestionWithIgnoreToggle
public static boolean openQuestionWithIgnoreToggle(String title, String message, String key) {
Shell shell = EditorUtils.getShell();
IPreferenceStore store = PydevPlugin.getDefault().getPreferenceStore();
String val = store.getString(key);
if (val.trim().length() == 0) {
val = MessageDialogWithToggle.PROMPT; //Initial value if not specified
}
if (!val.equals(MessageDialogWithToggle.ALWAYS)) {
MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(shell, title, message,
"Don't show this message again", false, store,
key);
if (dialog.getReturnCode() != IDialogConstants.YES_ID) {
return false;
}
}
return true;
}
示例2: performOk
@Override
public boolean performOk() {
boolean returnCode = super.performOk();
String selection = MessageDialogWithToggle.PROMPT;
if (jobRunPreferenceComposite.getAlwaysButtonSelection()) {
selection = MessageDialogWithToggle.ALWAYS;
}
Activator.getDefault().getPreferenceStore().setValue(SAVE_JOB_BEFORE_RUN_PREFRENCE, selection);
Activator.getDefault().getPreferenceStore().setValue(LOG_LEVEL_PREFERENCE,jobRunPreferenceComposite.getLoglevel());
Activator.getDefault().getPreferenceStore().setValue(Constants.CONSOLE_BUFFER_SIZE_PREFERANCE_NAME, jobRunPreferenceComposite.getConsoleBufferSize());
return returnCode;
}
示例3: okPressed
protected void okPressed()
{
IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
String val = (savePref.getSelection() ? MessageDialogWithToggle.ALWAYS : MessageDialogWithToggle.PROMPT);
store.setValue(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH, val);
super.okPressed();
}
示例4: openWarningWithIgnoreToggle
public static int openWarningWithIgnoreToggle(String title, String message, String key) {
Shell shell = EditorUtils.getShell();
IPreferenceStore store = PydevPlugin.getDefault().getPreferenceStore();
String val = store.getString(key);
if (val.trim().length() == 0) {
val = MessageDialogWithToggle.PROMPT; //Initial value if not specified
}
if (!val.equals(MessageDialogWithToggle.ALWAYS)) {
MessageDialogWithToggle.openWarning(shell, title, message, "Don't show this message again", false, store,
key);
}
return MessageDialog.OK;
}
示例5: createBuildPathTabContent
private Composite createBuildPathTabContent( Composite parent )
{
Composite pageContent = new Composite( parent, SWT.NONE );
GridData data = new GridData( GridData.FILL_HORIZONTAL
| GridData.FILL_VERTICAL
| GridData.VERTICAL_ALIGN_BEGINNING );
data.grabExcessHorizontalSpace = true;
pageContent.setLayoutData( data );
GridLayout layout = new GridLayout( );
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.numColumns = 3;
pageContent.setLayout( layout );
Group group = new Group( pageContent, SWT.NONE );
group.setText( Messages.getString( "CrosstabPreferencePage.filterLimit" ) ); //$NON-NLS-1$
group.setLayout( new GridLayout( 3, false ) );
GridData gd = new GridData( GridData.FILL_HORIZONTAL );
gd.horizontalSpan = 3;
group.setLayoutData( gd );
addTextField( group,
Messages.getString( "CrosstabPreferencePage.filterLimit.prompt" ), //$NON-NLS-1$
PREF_FILTER_LIMIT,
0,
0 );
if ( fProject == null )
{
Group promptGroup = new Group( pageContent, SWT.NONE );
promptGroup.setText( Messages.getString( "CrosstabPreferencePage.promptGroup" ) ); //$NON-NLS-1$
promptGroup.setLayout( new GridLayout( 3, false ) );
gd = new GridData( GridData.FILL_HORIZONTAL );
gd.horizontalSpan = 3;
promptGroup.setLayoutData( gd );
String[] enableDisableValues = new String[]{
ENABLED, DISABLED
};
String[] RadioValues = new String[]{
MessageDialogWithToggle.ALWAYS,
MessageDialogWithToggle.NEVER,
MessageDialogWithToggle.PROMPT
};
String[] labels = new String[]{
Messages.getString( "CrosstabPreferencePage.autoDelBindings.Text" ), //$NON-NLS-1$
Messages.getString( "CrosstabPreferencePage.autoDelBindings.Text.Always" ), //$NON-NLS-1$
Messages.getString( "CrosstabPreferencePage.autoDelBindings.Text.Never" ), //$NON-NLS-1$
Messages.getString( "CrosstabPreferencePage.autoDelBindings.Text.Prompt" ), //$NON-NLS-1$
};
addCheckBox( promptGroup,
Messages.getString( "CrosstabPreferencePage.cubePopup.Text" ), //$NON-NLS-1$
PREF_CUBE_BUILDER_WARNING,
enableDisableValues,
0 );
addRadioButton( pageContent,
labels,
PREF_AUTO_DEL_BINDINGS,
RadioValues,
0 );
}
return pageContent;
}