/** * The field editor preference page implementation of this * <code>PreferencePage</code> method saves all field editors by * calling <code>FieldEditor.store</code>. Note that this method * does not save the preference store itself; it just stores the * values back into the preference store. * * @see FieldEditor#store() */ public boolean performOk() { Iterator<FieldEditor> i = fieldEditors.iterator(); while (i.hasNext()) { FieldEditor pe = i.next(); pe.store(); //this method is protected so have no access to it in this package //pe.setPresentsDefaultValue(false); } return true; }
/** * The field editor preference page implementation of this * <code>PreferencePage</code> method saves all field editors by * calling <code>FieldEditor.store</code>. Note that this method * does not save the preference store itself; it just stores the * values back into the preference store. * * @see FieldEditor#store() */ @Override public boolean performOk() { if (fields != null) { Iterator<FieldEditor> e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = e.next(); pe.store(); pe.setPresentsDefaultValue(false); } } return true; }
/** * The field editor preference page implementation of this * <code>PreferencePage</code> method saves all field editors by * calling <code>FieldEditor.store</code>. Note that this method * does not save the preference store itself; it just stores the * values back into the preference store. * * @see FieldEditor#store() */ public boolean performOk() { if (fields != null) { Iterator e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = (FieldEditor) e.next(); pe.store(); pe.setPresentsDefaultValue(false); } } return true; }
/** * The field editor preference page implementation of this * <code>PreferencePage</code> method saves all field editors by * calling <code>FieldEditor.store</code>. Note that this method * does not save the preference store itself; it just stores the * values back into the preference store. * * @see FieldEditor#store() */ @Override public boolean performOk() { if (fields != null) { Iterator<FieldEditor> e = fields.iterator(); while (e.hasNext()) { FieldEditor pe = e.next(); pe.store(); pe.setPresentsDefaultValue(false); } } return true; }
public void performApply(ILaunchConfigurationWorkingCopy config) { config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText().trim()); config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_ALLOW_TERMINATE, fAllowTerminateButton.getSelection()); config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_CONNECTOR, getSelectedConnector().getIdentifier()); mapResources(config); Map attrMap = new HashMap(fFieldEditorMap.size()); Iterator keys = fFieldEditorMap.keySet().iterator(); while (keys.hasNext()) { String key = (String)keys.next(); FieldEditor editor = (FieldEditor)fFieldEditorMap.get(key); if (!editor.isValid()) { return; } Connector.Argument arg = (Connector.Argument)fArgumentMap.get(key); editor.store(); if (arg instanceof Connector.StringArgument || arg instanceof Connector.SelectedArgument) { attrMap.put(key, editor.getPreferenceStore().getString(key)); } else if (arg instanceof Connector.BooleanArgument) { attrMap.put(key, Boolean.valueOf(editor.getPreferenceStore().getBoolean(key)).toString()); } else if (arg instanceof Connector.IntegerArgument) { attrMap.put(key, new Integer(editor.getPreferenceStore().getInt(key)).toString()); } } config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, attrMap); }
@Override public boolean performOk() { //save field editors for(int i = 0; i < fFieldEditors.size(); i++) { fFieldEditors.get(i).store(); } Preferences.setBoolean(DebugPlugin.getUniqueIdentifier(), DebugPlugin.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, fDeleteConfigs.getSelection(), null); //save table String types = IInternalDebugCoreConstants.EMPTY_STRING; TableItem[] items = fTable.getItems(); ILaunchConfigurationType type; for(int i = 0; i < items.length; i++) { if(items[i].getChecked()) { type = (ILaunchConfigurationType)items[i].getData(); types += type.getIdentifier()+","; //$NON-NLS-1$ } } getPreferenceStore().setValue(IInternalDebugUIConstants.PREF_FILTER_TYPE_LIST, types); return super.performOk(); } }
workspaceName.store();
@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); }