List of usage examples for org.eclipse.jface.preference IPreferenceStore TRUE
String TRUE
To view the source code for org.eclipse.jface.preference IPreferenceStore TRUE.
Click Source Link
true
("true"
). From source file:org.eclipse.dltk.ui.preferences.NewScriptProjectPreferencePage.java
License:Open Source License
protected Control createContents(Composite parent) { initializeDialogUnits(parent);/* ww w .jav a 2s. c o m*/ Composite result = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = 0; layout.verticalSpacing = convertVerticalDLUsToPixels(10); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2; result.setLayout(layout); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; Group sourceFolderGroup = new Group(result, SWT.NONE); layout = new GridLayout(); layout.numColumns = 2; sourceFolderGroup.setLayout(layout); sourceFolderGroup.setLayoutData(gd); sourceFolderGroup.setText(PreferencesMessages.NewScriptProjectPreferencePage_sourcefolder_label); int indent = 0; fProjectAsSourceFolder = addRadioButton(sourceFolderGroup, PreferencesMessages.NewScriptProjectPreferencePage_sourcefolder_project, SRCBIN_FOLDERS_IN_NEWPROJ, IPreferenceStore.FALSE, indent); fProjectAsSourceFolder.addSelectionListener(fSelectionListener); fFoldersAsSourceFolder = addRadioButton(sourceFolderGroup, PreferencesMessages.NewScriptProjectPreferencePage_sourcefolder_folder, SRCBIN_FOLDERS_IN_NEWPROJ, IPreferenceStore.TRUE, indent); fFoldersAsSourceFolder.addSelectionListener(fSelectionListener); indent = convertWidthInCharsToPixels(4); fSrcFolderNameLabel = new Label(sourceFolderGroup, SWT.NONE); fSrcFolderNameLabel.setText(PreferencesMessages.NewScriptProjectPreferencePage_folders_src); fSrcFolderNameText = addTextControl(sourceFolderGroup, fSrcFolderNameLabel, SRC_SRCNAME, indent); fSrcFolderNameText.addModifyListener(fModifyListener); // String[] InterpreterEnvironmentNames= // getInterpreterEnvironmentNames(); // if (InterpreterEnvironmentNames.length > 0) { // Label InterpreterEnvironmentSelectionLabel= new Label(result, // SWT.NONE); // InterpreterEnvironmentSelectionLabel.setText(PreferencesMessages.NewScriptProjectPreferencePage_InterpreterEnvironmentlibrary_label); // InterpreterEnvironmentSelectionLabel.setLayoutData(new GridData()); // // int index= // getPreferenceStore().getInt(CLASSPATH_InterpreterEnvironmentLIBRARY_INDEX); // fInterpreterEnvironmentCombo= new Combo(result, SWT.READ_ONLY); // fInterpreterEnvironmentCombo.setItems(InterpreterEnvironmentNames); // fInterpreterEnvironmentCombo.select(index); // fInterpreterEnvironmentCombo.setLayoutData(new // GridData(GridData.HORIZONTAL_ALIGN_FILL)); // } validateFolders(); Dialog.applyDialogFont(result); return result; }
From source file:org.eclipse.jdt.text.tests.performance.ScrollVerticalRulerTest.java
License:Open Source License
protected void setUp() throws Exception { super.setUp(); PreferenceConstants.getPreferenceStore().putValue(PreferenceConstants.SPELLING_PROBLEMS_THRESHOLD, new Integer(100000).toString()); boolean isInstalled = EditorsUI.getSpellingService().getSpellingEngineDescriptors().length > 0; assertTrue("No spelling engine installed", isInstalled); IPreferenceStore store = EditorsUI.getPreferenceStore(); store.putValue(SpellingService.PREFERENCE_SPELLING_ENABLED, IPreferenceStore.TRUE); IEclipsePreferences editorsNode = InstanceScope.INSTANCE.getNode(EditorsUI.PLUGIN_ID); MarkerAnnotationPreferences markerAnnotationPreferences = EditorsPlugin.getDefault() .getMarkerAnnotationPreferences(); Iterator iterator = markerAnnotationPreferences.getAnnotationPreferences().iterator(); while (iterator.hasNext()) { AnnotationPreference pref = (AnnotationPreference) iterator.next(); String preferenceKey = pref.getVerticalRulerPreferenceKey(); if ("spellingIndicationInVerticalRuler".equals(preferenceKey)) { editorsNode.putBoolean(preferenceKey, true); String textPreferenceKey = pref.getTextPreferenceKey(); editorsNode.putBoolean(textPreferenceKey, false); }//from w w w .j a va 2 s. co m } }
From source file:org.eclipse.jdt.text.tests.performance.SpellCheckingTest.java
License:Open Source License
protected void setUp() throws Exception { super.setUp(); setWarmUpRuns(WARM_UP_RUNS);//from w ww. j a v a 2s . c om setMeasuredRuns(MEASURED_RUNS); PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.SPELLING_PROBLEMS_THRESHOLD, Integer.MAX_VALUE); EditorsUI.getPreferenceStore().putValue(SpellingService.PREFERENCE_SPELLING_ENABLED, IPreferenceStore.TRUE); fSpellingContext = new SpellingContext(); fSpellingContext .setContentType(Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT)); IFile file = ResourceTestHelper.findFile(FILE); ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager(); try { manager.connect(file.getFullPath(), LocationKind.IFILE, null); ITextFileBuffer fileBuffer = manager.getTextFileBuffer(file.getFullPath(), LocationKind.IFILE); fDocument = fileBuffer.getDocument(); } catch (CoreException e) { throw e; } finally { manager.disconnect(file.getFullPath(), LocationKind.IFILE, null); } }
From source file:org.eclipse.m2m.internal.qvt.oml.editor.ui.colorer.QVTColorManager.java
License:Open Source License
private void adaptToEnablementChange(Highlighting highlighting, PropertyChangeEvent event) { if (highlighting == null) { return;// w w w .j av a 2 s . c o m } Object value = event.getNewValue(); boolean eventValue; if (value instanceof Boolean) eventValue = ((Boolean) value).booleanValue(); else if (IPreferenceStore.TRUE.equals(value)) eventValue = true; else eventValue = false; highlighting.setEnabled(eventValue); }
From source file:org.eclipse.m2m.internal.qvt.oml.editor.ui.colorer.QVTColorManager.java
License:Open Source License
private void adaptToTextStyleChange(ColorDescriptor descriptor, PropertyChangeEvent event, int styleAttribute) { if (descriptor.getTextAttribute() == null) { return;//from ww w . j av a 2 s . com } boolean eventValue = false; Object value = event.getNewValue(); if (value instanceof Boolean) eventValue = ((Boolean) value).booleanValue(); else if (IPreferenceStore.TRUE.equals(value)) eventValue = true; TextAttribute oldAttr = descriptor.getTextAttribute(); boolean activeValue = (oldAttr.getStyle() & styleAttribute) == styleAttribute; if (activeValue != eventValue) descriptor.setTextAttribute(new TextAttribute(oldAttr.getForeground(), oldAttr.getBackground(), eventValue ? oldAttr.getStyle() | styleAttribute : oldAttr.getStyle() & ~styleAttribute)); }
From source file:org.eclipse.osee.framework.ui.skynet.HTMLTransferFormatter.java
License:Open Source License
private static boolean isWordTagWrapEnabled() { String wrapKey = getPreferenceStore().getString(PreferenceConstants.WORDWRAP_KEY); return IPreferenceStore.TRUE.equals(wrapKey); }
From source file:org.eclipse.osee.framework.ui.skynet.OseePreferencePage.java
License:Open Source License
private void setupWordWrapChkButton() { IPreferenceStore prefStore = getPreferenceStore(); wordWrapChkBox.setSelection(prefStore.getString(PreferenceConstants.WORDWRAP_KEY) != null && prefStore.getString(PreferenceConstants.WORDWRAP_KEY).equals(IPreferenceStore.TRUE)); }
From source file:org.eclipse.osee.framework.ui.skynet.OseePreferencePage.java
License:Open Source License
@Override public boolean performOk() { getPreferenceStore().setValue(CorePreferences.INETADDRESS_KEY, ""); for (InetAddress address : networkButtons.keySet()) { if (networkButtons.get(address).getSelection()) { getPreferenceStore().setValue(CorePreferences.INETADDRESS_KEY, address.getHostAddress()); break; }/*from w ww . ja v a 2 s. c om*/ } getPreferenceStore().setValue(HttpUrlBuilderClient.USE_CONNECTED_SERVER_URL_FOR_PERM_LINKS, connectedUrlCheckBox.getSelection()); getPreferenceStore().putValue(PreferenceConstants.WORDWRAP_KEY, wordWrapChkBox.getSelection() ? IPreferenceStore.TRUE : IPreferenceStore.FALSE); return super.performOk(); }
From source file:org.eclipse.php.internal.ui.preferences.PHPProjectLayoutPreferencePage.java
License:Open Source License
protected Control createPreferenceContent(Composite parent) { initializeDialogUnits(parent);//from w w w . j a v a2 s .c om Composite result = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = 0; layout.verticalSpacing = convertVerticalDLUsToPixels(10); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2; result.setLayout(layout); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; Group sourceFolderGroup = new Group(result, SWT.NONE); layout = new GridLayout(); layout.numColumns = 2; sourceFolderGroup.setLayout(layout); sourceFolderGroup.setLayoutData(gd); sourceFolderGroup.setText(PreferencesMessages.NewPHPProjectPreferencePage_sourcefolder_label); int indent = 0; fProjectAsSourceFolder = addRadioButton(sourceFolderGroup, PreferencesMessages.NewPHPProjectPreferencePage_sourcefolder_project, SRCBIN_FOLDERS_IN_NEWPROJ, IPreferenceStore.FALSE, indent); fProjectAsSourceFolder.addSelectionListener(fSelectionListener); fFoldersAsSourceFolder = addRadioButton(sourceFolderGroup, PreferencesMessages.NewPHPProjectPreferencePage_sourcefolder_folder, SRCBIN_FOLDERS_IN_NEWPROJ, IPreferenceStore.TRUE, indent); fFoldersAsSourceFolder.addSelectionListener(fSelectionListener); indent = convertWidthInCharsToPixels(4); fSrcFolderNameLabel = new Label(sourceFolderGroup, SWT.NONE); fSrcFolderNameLabel.setText(PreferencesMessages.NewPHPProjectPreferencePage_folders_src); fSrcFolderNameText = addTextControl(sourceFolderGroup, fSrcFolderNameLabel, SRCBIN_SRCNAME, indent); fSrcFolderNameText.addModifyListener(fModifyListener); fBinFolderNameLabel = new Label(sourceFolderGroup, SWT.NONE); fBinFolderNameLabel.setText(PreferencesMessages.NewPHPProjectPreferencePage_folders_public); fBinFolderNameText = addTextControl(sourceFolderGroup, fBinFolderNameLabel, SRCBIN_BINNAME, indent); fBinFolderNameText.addModifyListener(fModifyListener); validateFolders(); return result; }
From source file:org.eclipse.wst.jsdt.internal.ui.preferences.NewJavaProjectPreferencePage.java
License:Open Source License
protected Control createContents(Composite parent) { initializeDialogUnits(parent);//w w w . j ava2 s . co m Composite result = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = 0; layout.verticalSpacing = convertVerticalDLUsToPixels(10); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2; result.setLayout(layout); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; Group sourceFolderGroup = new Group(result, SWT.NONE); layout = new GridLayout(); layout.numColumns = 2; sourceFolderGroup.setLayout(layout); sourceFolderGroup.setLayoutData(gd); sourceFolderGroup.setText(PreferencesMessages.NewJavaProjectPreferencePage_sourcefolder_label); int indent = 0; fProjectAsSourceFolder = addRadioButton(sourceFolderGroup, PreferencesMessages.NewJavaProjectPreferencePage_sourcefolder_project, SRCBIN_FOLDERS_IN_NEWPROJ, IPreferenceStore.FALSE, indent); fProjectAsSourceFolder.addSelectionListener(fSelectionListener); fFoldersAsSourceFolder = addRadioButton(sourceFolderGroup, PreferencesMessages.NewJavaProjectPreferencePage_sourcefolder_folder, SRCBIN_FOLDERS_IN_NEWPROJ, IPreferenceStore.TRUE, indent); fFoldersAsSourceFolder.addSelectionListener(fSelectionListener); indent = convertWidthInCharsToPixels(4); fSrcFolderNameLabel = new Label(sourceFolderGroup, SWT.NONE); fSrcFolderNameLabel.setText(PreferencesMessages.NewJavaProjectPreferencePage_folders_src); fSrcFolderNameText = addTextControl(sourceFolderGroup, fSrcFolderNameLabel, SRCBIN_SRCNAME, indent); fSrcFolderNameText.addModifyListener(fModifyListener); //fBinFolderNameLabel= new Label(sourceFolderGroup, SWT.NONE); //fBinFolderNameLabel.setText(PreferencesMessages.NewJavaProjectPreferencePage_folders_bin); //fBinFolderNameText= addTextControl(sourceFolderGroup, fBinFolderNameLabel, SRCBIN_BINNAME, indent); //fBinFolderNameText.addModifyListener(fModifyListener); // String[] jreNames= getJRENames(); // if (jreNames.length > 0) { // Label jreSelectionLabel= new Label(result, SWT.NONE); // jreSelectionLabel.setText(PreferencesMessages.NewJavaProjectPreferencePage_jrelibrary_label); // jreSelectionLabel.setLayoutData(new GridData()); // // int index= getPreferenceStore().getInt(CLASSPATH_JRELIBRARY_INDEX); // fJRECombo= new Combo(result, SWT.READ_ONLY); // fJRECombo.setItems(jreNames); // fJRECombo.select(index); // fJRECombo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); // } validateFolders(); Dialog.applyDialogFont(result); return result; }