private void initializeFields() { Iterator e= fCheckBoxes.keySet().iterator(); while (e.hasNext()) { Button b= (Button) e.next(); String key= (String) fCheckBoxes.get(b); b.setSelection(fOverlayStore.getBoolean(key)); } if (fFilters != null) fFilters.setText(fOverlayStore.getString(PATH_FILTER)); editor.load(); }
/** * Restores the widget state from the preference store, called after all of the widgets have been created and triggers * a selection changed event from the tree viewer */ protected void initializeControls() { if(fTree.getItemCount() > 0) { TreeItem item = fTree.getItem(0); fTreeViewer.setSelection(new StructuredSelection(item.getData())); fTreeViewer.expandToLevel(item.getData(), 1); } //load the group selections fSwitchLaunch.load(); fSwitchSuspend.load(); }
/** * Creates a composite that contains buttons for selecting the preference * opening new project selections. */ private void createProjectPerspectiveGroup(Composite composite) { Composite projectComposite = new Composite(composite, SWT.NONE); projectComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); projectComposite.setFont(composite.getFont()); String[][] namesAndValues = { { PSPM_ALWAYS_TEXT, IDEInternalPreferences.PSPM_ALWAYS }, { PSPM_NEVER_TEXT, IDEInternalPreferences.PSPM_NEVER }, { PSPM_PROMPT_TEXT, IDEInternalPreferences.PSPM_PROMPT } }; projectSwitchField = new RadioGroupFieldEditor( IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE, PROJECT_SWITCH_PERSP_MODE_TITLE, namesAndValues.length, namesAndValues, projectComposite, true); projectSwitchField.setPreferenceStore(getIDEPreferenceStore()); projectSwitchField.setPage(this); projectSwitchField.load(); }
protected Control createCustomArea(Composite parent) { editor = new RadioGroupFieldEditor(ICompareUIConstants.PREF_NAVIGATION_END_ACTION_LOCAL, CompareMessages.NavigationEndDialog_1, 1, labelsAndValues, parent, true); editor.setPreferenceStore(CompareUIPlugin.getDefault().getPreferenceStore()); editor.fillIntoGrid(parent, 1); editor.load(); return parent; }
/** * Creates controls for the preference to open required projects when * opening a project. * @param parent The parent control */ private void createOpenPrefControls(Composite parent) { String name = IDEInternalPreferences.OPEN_REQUIRED_PROJECTS; String label = IDEWorkbenchMessages.IDEWorkspacePreference_openReferencedProjects; String[][] namesAndValues = { { IDEWorkbenchMessages.Always, IDEInternalPreferences.PSPM_ALWAYS }, { IDEWorkbenchMessages.Never, IDEInternalPreferences.PSPM_NEVER }, { IDEWorkbenchMessages.Prompt, IDEInternalPreferences.PSPM_PROMPT } }; openReferencesEditor = new RadioGroupFieldEditor(name, label, 3, namesAndValues, parent, true); openReferencesEditor.setPreferenceStore(getIDEPreferenceStore()); openReferencesEditor.setPage(this); openReferencesEditor.load(); } /**
@Override protected Control createCustomArea(Composite parent) { editor = new RadioGroupFieldEditor(ICompareUIConstants.PREF_NAVIGATION_END_ACTION_LOCAL, CompareMessages.NavigationEndDialog_1, 1, labelsAndValues, parent, true); editor.setPreferenceStore(CompareUIPlugin.getDefault().getPreferenceStore()); editor.fillIntoGrid(parent, 1); editor.load(); return parent; }