本文整理匯總了Java中org.eclipse.jface.dialogs.MessageDialogWithToggle.ALWAYS屬性的典型用法代碼示例。如果您正苦於以下問題:Java MessageDialogWithToggle.ALWAYS屬性的具體用法?Java MessageDialogWithToggle.ALWAYS怎麽用?Java MessageDialogWithToggle.ALWAYS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.jface.dialogs.MessageDialogWithToggle
的用法示例。
在下文中一共展示了MessageDialogWithToggle.ALWAYS屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: openIgnoreMessageDialogConfirm
/**
* openIgnoreMessageDialogConfirm
*
* @param shell
* @param title
* @param message
* @param store
* @param key
* Key to store the show/hide this message. Message will be hidden if true
* @return int
*/
public static int openIgnoreMessageDialogConfirm(Shell shell, String title, String message, IPreferenceStore store,
String key)
{
String value = store.getString(key);
if (!shouldShowDialog(key))
{
return value == MessageDialogWithToggle.ALWAYS ? IDialogConstants.YES_ID : IDialogConstants.NO_ID;
}
MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(shell, title, message,
Messages.DialogUtils_doNotShowMessageAgain, false, store, key);
if (dialog.getToggleState())
{
setShouldShowDialog(key, false);
store.putValue(key, dialog.getReturnCode() == IDialogConstants.YES_ID ? MessageDialogWithToggle.ALWAYS
: MessageDialogWithToggle.NEVER);
}
return dialog.getReturnCode();
}
示例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: 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;
}
示例5: needRemoveInvaildBindings
public static boolean needRemoveInvaildBindings(
CrosstabReportItemHandle handle )
{
String preferenceData = PreferenceFactory.getInstance( )
.getPreferences( CrosstabPlugin.getDefault( ) )
.getString( CrosstabPlugin.PREFERENCE_AUTO_DEL_BINDINGS );
if ( preferenceData == null
|| preferenceData.length( ) == 0
|| preferenceData.equals( MessageDialogWithToggle.PROMPT ) )
{
MessageDialogWithToggle msgDlg = MessageDialogWithToggle.openYesNoQuestion( UIUtil.getDefaultShell( ),
Messages.getString( "DeleteBindingDialog.Title" ), //$NON-NLS-1$
Messages.getString( "DeleteBindingDialog.Message" ), //$NON-NLS-1$
Messages.getString( "DeleteBindingDialog.ToggleMessage" ), //$NON-NLS-1$
false,
null,
null );
if ( msgDlg.getToggleState( ) )
{
String value = "";
if ( msgDlg.getReturnCode( ) == IDialogConstants.YES_ID )
{
value = MessageDialogWithToggle.ALWAYS;
}
else if ( msgDlg.getReturnCode( ) == IDialogConstants.NO_ID )
{
value = MessageDialogWithToggle.NEVER;
}
PreferenceFactory.getInstance( )
.getPreferences( CrosstabPlugin.getDefault( ) )
.setValue( CrosstabPlugin.PREFERENCE_AUTO_DEL_BINDINGS,
value );
}
if ( msgDlg.getReturnCode( ) == IDialogConstants.YES_ID )
{
return true;
// removeInvalidBindings( handle );
}
else if ( msgDlg.getReturnCode( ) == IDialogConstants.NO_ID )
{
return false;
// dothing
}
}
else if ( preferenceData != null
&& preferenceData.equals( MessageDialogWithToggle.ALWAYS ) )
{
return true;
// removeInvalidBindings( handle );
}
return false;
// removeInvalidBindings(handle);
}