List of usage examples for org.eclipse.jface.preference FieldEditor store
public void store()
From source file:org.eclipse.titan.designer.properties.pages.FieldEditorPropertyPage.java
License:Open Source License
/** * 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.//from w w w . j a v a 2s. c o m * * @see FieldEditor#store() */ @Override public boolean performOk() { if (editors != null) { Iterator<FieldEditor> e = editors.iterator(); while (e.hasNext()) { FieldEditor pe = e.next(); pe.store(); pe.getPreferenceStore().setToDefault(pe.getPreferenceName()); } } super.performOk(); return true; }
From source file:org.eclipse.titanium.preferences.pages.GraphMetricsPage.java
License:Open Source License
@Override public boolean performOk() { for (final FieldEditor editor : editors) { editor.store(); }/* w w w . j a va 2s . c om*/ return super.performOk(); }
From source file:org.eclipse.titanium.preferences.pages.MetricsViewPreferencePage.java
License:Open Source License
@Override public boolean performOk() { for (final FieldEditor e : editors) { e.store(); }//from w ww .ja va 2 s . co m return super.performOk(); }
From source file:org.eclipse.wb.core.controls.jface.preference.FieldLayoutPreferencePage.java
License:Open Source License
/** * 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. * //from w w w . ja v a 2 s. c o m * @see FieldEditor#store() */ @Override public boolean performOk() { for (FieldEditor fieldEditor : fields) { fieldEditor.store(); } return true; }
From source file:org.eclipse.wb.swt.FieldLayoutPreferencePage.java
License:Open Source License
/** * 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()// w ww .j a v a 2 s. c om */ public boolean performOk() { if (m_fields != null) { Iterator<FieldEditor> I = m_fields.iterator(); while (I.hasNext()) { FieldEditor editor = I.next(); editor.store(); } } return true; }
From source file:org.eclipse.wst.jsdt.debug.internal.ui.launching.JavaScriptConnectTab.java
License:Open Source License
public void performApply(ILaunchConfigurationWorkingCopy configuration) { Connector connector = getSelectedConnector(); if (connector != null) { configuration.setAttribute(ILaunchConstants.CONNECTOR_ID, connector.id()); Entry entry = null;//from w w w . jav a 2 s . c o m FieldEditor editor = null; String key = null; HashMap argmap = new HashMap(); Argument argument = null; for (Iterator iter = this.editormap.entrySet().iterator(); iter.hasNext();) { entry = (Entry) iter.next(); editor = (FieldEditor) entry.getValue(); if (!editor.isValid()) { return; } key = (String) entry.getKey(); argument = (Argument) connector.defaultArguments().get(key); if (argument == null) { continue; } editor.store(); if (argument instanceof StringArgument || argument instanceof SelectedArgument) { argmap.put(key, editor.getPreferenceStore().getString(key)); } else if (argument instanceof BooleanArgument) { argmap.put(key, Boolean.valueOf(editor.getPreferenceStore().getBoolean(key)).toString()); } else if (argument instanceof IntegerArgument) { argmap.put(key, new Integer(editor.getPreferenceStore().getInt(key)).toString()); } } configuration.setAttribute(ILaunchConstants.ARGUMENT_MAP, argmap); } else { configuration.removeAttribute(ILaunchConstants.ARGUMENT_MAP); configuration.removeAttribute(ILaunchConstants.CONNECTOR_ID); } }
From source file:org.limy.eclipse.common.jface.AbstractLimyPreferencePage.java
License:Open Source License
@Override public boolean performOk() { for (Iterator<FieldEditor> it = fields.iterator(); it.hasNext();) { FieldEditor editor = it.next(); editor.store(); }// ww w. j a va 2s.c o m return super.performOk(); }
From source file:org.rubypeople.rdt.debug.ui.launchConfigurations.RubyConnectTab.java
License:Open Source License
public void performApply(ILaunchConfigurationWorkingCopy config) { config.setAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText().trim()); config.setAttribute(IRubyLaunchConfigurationConstants.ATTR_VM_CONNECTOR, getSelectedConnector().getIdentifier()); mapResources(config);//from w w w .ja v a 2 s. c o m Map<String, Object> attrMap = new HashMap<String, Object>(fFieldEditorMap.size()); Iterator<String> keys = fFieldEditorMap.keySet().iterator(); while (keys.hasNext()) { String key = keys.next(); FieldEditor editor = (FieldEditor) fFieldEditorMap.get(key); if (!editor.isValid()) { return; } Object arg = (Object) fArgumentMap.get(key); editor.store(); if (arg instanceof String) { // || 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 Integer) { attrMap.put(key, new Integer(editor.getPreferenceStore().getInt(key)).toString()); } } config.setAttribute(IRubyLaunchConfigurationConstants.ATTR_CONNECT_MAP, attrMap); }
From source file:org.talend.designer.esb.runcontainer.preferences.FieldLayoutPreferencePage.java
License:Open Source License
/** * 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()//www.ja v a 2s.c o m */ @Override public boolean performOk() { if (m_fields != null) { Iterator<FieldEditor> I = m_fields.iterator(); while (I.hasNext()) { FieldEditor editor = I.next(); editor.store(); } } return true; }
From source file:org.universaal.tools.packaging.tool.preferences.GroupFieldEditor.java
License:Apache License
@Override protected void doStore() { if (members != null) { for (FieldEditor editor : members) { editor.store(); }//from w ww .j av a 2 s. co m } }