當前位置: 首頁>>代碼示例>>Java>>正文


Java MessageDialogWithToggle.PROMPT屬性代碼示例

本文整理匯總了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;
}
 
開發者ID:fabioz,項目名稱:Pydev,代碼行數:18,代碼來源:PyDialogHelpers.java

示例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;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:12,代碼來源:JobRunPreference.java

示例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();
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:7,代碼來源:SaveAndLaunchPromptDialog.java

示例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;
}
 
開發者ID:fabioz,項目名稱:Pydev,代碼行數:14,代碼來源:PyDialogHelpers.java

示例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;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:71,代碼來源:CrosstabConfigurationBlock.java


注:本文中的org.eclipse.jface.dialogs.MessageDialogWithToggle.PROMPT屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。