org.eclipse.core.runtime.Preferences#getBoolean ( )源码实例Demo

下面列出了org.eclipse.core.runtime.Preferences#getBoolean ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: birt   文件: PreferenceWrapper.java
public boolean getBoolean( String name )
{
	if ( this.preferenceType == SPECIAL_TYPE && project != null )
	{
		Preferences preference = prefs.getReportPreference( project );
		if ( preference != null && preference.contains( name ) )
			return preference.getBoolean( name );
	}
	return prefsStore.getBoolean( name );
}
 
源代码2 项目: uima-uimaj   文件: MultiPageEditorContributor.java
/**
 * Gets the uima pref boolean.
 *
 * @param key the key
 * @param defaultValue the default value
 * @return the uima pref boolean
 */
private static boolean getUimaPrefBoolean(String key, boolean defaultValue) {
  TAEConfiguratorPlugin plugin = TAEConfiguratorPlugin.getDefault();
  Preferences prefs = plugin.getPluginPreferences();
  boolean isDefault = prefs.isDefault(key);
  if (isDefault)
    prefs.setDefault(key, defaultValue);
  return prefs.getBoolean(key);
}
 
/**
 * Return {@code true} if the notification popup should be shown when
 * tasks fail.
 */
public static boolean isShowPopup() {
  Preferences prefs = getPreferences();
  return prefs.getBoolean(IMechanicPreferences.SHOW_POPUP_PREF);
}
 
源代码4 项目: translationstudio8   文件: NewFolderDialogOfHs.java
/**
		 * Creates the widget for advanced options.
		 *  
		 * @param parent the parent composite
		 */
		protected void createAdvancedControls(Composite parent) {
			Preferences preferences = ResourcesPlugin.getPlugin()
					.getPluginPreferences();

			if (preferences.getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING) == false
					&& isValidContainer()) {
				linkedResourceParent = new Composite(parent, SWT.NONE);
				linkedResourceParent.setFont(parent.getFont());
				linkedResourceParent.setLayoutData(new GridData(
						GridData.FILL_HORIZONTAL));
				GridLayout layout = new GridLayout();
				layout.marginHeight = 0;
				layout.marginWidth = 0;
				linkedResourceParent.setLayout(layout);

				advancedButton = new Button(linkedResourceParent, SWT.PUSH);
				advancedButton.setFont(linkedResourceParent.getFont());
				advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
				setButtonLayoutData(advancedButton);
				GridData data = (GridData) advancedButton.getLayoutData();
				data.horizontalAlignment = GridData.BEGINNING;
				advancedButton.setLayoutData(data);
				advancedButton.addSelectionListener(new SelectionAdapter() {
					public void widgetSelected(SelectionEvent e) {
						handleAdvancedButtonSelect();
					}
				});
			}
			linkedResourceGroup = new CreateLinkedResourceGroup(IResource.FOLDER,
					new Listener() {
						public void handleEvent(Event e) {
							validateLinkedResource();
							firstLinkCheck = false;
						}
					}, new CreateLinkedResourceGroup.IStringValue() {
						public void setValue(String string) {
							folderNameField.setText(string);
						}

						public String getValue() {
							return folderNameField.getText();
						}

						public IResource getResource() {
							return container;
						}
					});
		}