Java Code Examples for org.eclipse.core.runtime.Preferences#getBoolean()
The following examples show how to use
org.eclipse.core.runtime.Preferences#getBoolean() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PreferenceWrapper.java From birt with Eclipse Public License 1.0 | 5 votes |
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 ); }
Example 2
Source File: MultiPageEditorContributor.java From uima-uimaj with Apache License 2.0 | 5 votes |
/** * 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); }
Example 3
Source File: OldMechanicPreferences.java From workspacemechanic with Eclipse Public License 1.0 | 4 votes |
/** * 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); }
Example 4
Source File: NewFolderDialogOfHs.java From translationstudio8 with GNU General Public License v2.0 | votes |
/** * 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; } }); }