/** * The field editor preference page implementation of an <code>IDialogPage</code> * method disposes of this page's controls and images. * Subclasses may override to release their own allocated SWT * resources, but must call <code>super.dispose</code>. */ public void dispose() { super.dispose(); Iterator<FieldEditor> i = fieldEditors.iterator(); while (i.hasNext()) { FieldEditor pe = i.next(); pe.setPage(null); pe.setPropertyChangeListener(null); pe.setPreferenceStore(null); } }
/** * Initializes all field editors. */ protected void initialize() { Iterator<FieldEditor> i = fieldEditors.iterator(); while (i.hasNext()) { FieldEditor pe = i.next(); pe.setPage(this); pe.setPropertyChangeListener(this); pe.setPreferenceStore(getPreferenceStore()); pe.load(); } }
/** * The field editor preference page implementation of an <code>IDialogPage</code> * method disposes of this page's controls and images. * Subclasses may override to release their own allocated SWT * resources, but must call <code>super.dispose</code>. */ @Override public void dispose() { super.dispose(); if (fields != null) { Iterator<FieldEditor> e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = e.next(); pe.setPage(null); pe.setPropertyChangeListener(null); pe.setPreferenceStore(null); } } }
/** * Initializes all field editors. */ protected void initialize() { if (fields != null) { Iterator e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = (FieldEditor) e.next(); pe.setPage(this); pe.setPropertyChangeListener(this); pe.setPreferenceStore(getPreferenceStore()); pe.load(); } } }
/** * The field editor preference page implementation of an <code>IDialogPage</code> * method disposes of this page's controls and images. * Subclasses may override to release their own allocated SWT * resources, but must call <code>super.dispose</code>. */ @Override public void dispose() { super.dispose(); if (fields != null) { Iterator<FieldEditor> e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = e.next(); pe.setPage(null); pe.setPropertyChangeListener(null); pe.setPreferenceStore(null); } } }
/** * The field editor preference page implementation of an <code>IDialogPage</code> * method disposes of this page's controls and images. * Subclasses may override to release their own allocated SWT * resources, but must call <code>super.dispose</code>. */ public void dispose() { super.dispose(); if (fields != null) { Iterator e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = (FieldEditor) e.next(); pe.setPage(null); pe.setPropertyChangeListener(null); pe.setPreferenceStore(null); } } }
/** * Initializes all field editors. */ protected void initialize() { if (fields != null) { Iterator<FieldEditor> e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = e.next(); pe.setPage(this); pe.setPropertyChangeListener(this); pe.setPreferenceStore(getPreferenceStore()); pe.load(); } } }
/** * Initializes all field editors. */ protected void initialize() { if (fields != null) { Iterator<FieldEditor> e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = e.next(); pe.setPage(this); pe.setPropertyChangeListener(this); pe.setPreferenceStore(getPreferenceStore()); pe.load(); } } }
/** * Create a composite that contains entry fields specifying the workspace name * preference. * * @param composite the Composite the group is created in. */ private void createWindowTitleGroup(Composite composite) { Composite groupComposite = new Composite(composite, SWT.LEFT); GridLayout layout = new GridLayout(); layout.numColumns = 2; groupComposite.setLayout(layout); GridData gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = true; groupComposite.setLayoutData(gd); workspaceName = new StringFieldEditor( IDEInternalPreferences.WORKSPACE_NAME, IDEWorkbenchMessages.IDEWorkspacePreference_workspaceName, groupComposite); workspaceName.setPreferenceStore(getIDEPreferenceStore()); workspaceName.load(); workspaceName.setPage(this); }
@Override public void setPreferenceStore(IPreferenceStore store) { super.setPreferenceStore(store); defaultEnc = store.getDefaultString(getPreferenceName()); updateDefaultEncoding(); }
/** * Initializes the field editors to their values * @since 3.2 */ private void initFieldEditors() { FieldEditor editor; for(int i = 0; i < fFieldEditors.size(); i++) { editor = fFieldEditors.get(i); editor.setPreferenceStore(getPreferenceStore()); editor.load(); } fDeleteConfigs.setSelection( Platform.getPreferencesService().getBoolean(DebugPlugin.getUniqueIdentifier(), DebugPlugin.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true, null)); //restore the tables' checked state String[] types = getPreferenceStore().getString(IInternalDebugUIConstants.PREF_FILTER_TYPE_LIST).split("\\,"); //$NON-NLS-1$ TableItem[] items = fTable.getItems(); ILaunchConfigurationType type; for(int i = 0; i < types.length; i++) { for(int j = 0; j < items.length; j++) { type = (ILaunchConfigurationType)items[j].getData(); if(type.getIdentifier().equals(types[i])) { items[j].setChecked(true); } } } }
@Override public final void propertyChange(PropertyChangeEvent event) { if (event.getSource() instanceof FieldEditor) { FieldEditor fe = (FieldEditor) event.getSource(); internalStore.setValue(fe.getPreferenceName(), fe.getPreferenceStore().getDefaultString(fe.getPreferenceName())); fe.setPreferenceStore(internalStore); fe.store(); } super.propertyChange(event); }
field.setPreferenceStore(store); field.loadDefault(); field.setPropertyChangeListener(this);