List of usage examples for org.eclipse.jface.preference FieldEditor store
public void store()
From source file:mpj_express_debugger.JavaConnectTab.java
License:Open Source License
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);//w w w .ja v a2 s . com 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); }
From source file:mpj_express_debugger.JavaMPJConnectTab.java
License:Open Source License
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);//from ww w. ja v a2 s . c o m System.out.println("Conector : " + getSelectedConnector().getIdentifier()); 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(); System.out.println("Key:" + key + " <" + arg + ">"); 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); }
From source file:net.sourceforge.sqlexplorer.preferences.OverlaidPreferencePage.java
License:Open Source License
protected void addField(final FieldEditor editor) { // Make sure that FieldEditors automatically write their changes straight to the store editor.setPropertyChangeListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { editor.store(); }//from w w w . java 2 s . c om }); super.addField(editor); }
From source file:org.apache.felix.sigil.eclipse.ui.wizard.repository.RepositoryWizardPage.java
License:Apache License
public void storeFields() { for (FieldEditor e : editors) { e.store(); } }
From source file:org.apache.felix.sigil.ui.eclipse.ui.wizard.repository.RepositoryWizardPage.java
License:Apache License
public void storeFields() { getModel().setName(nameEditor.getStringValue()); for (FieldEditor e : editors) { e.store(); } }
From source file:org.bc.eclipse.hadoop.debug.JavaRetryConnectTab.java
License:Open Source License
public void performApply(ILaunchConfigurationWorkingCopy config) { config.setAttribute("relaunchTerminate", fRelaunchTerminateButton.getSelection()); //$NON-NLS-1$ 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);//from ww w . j a va 2 s. com Map<String, String> attrMap = new HashMap<String, String>(fFieldEditorMap.size()); Iterator<String> keys = fFieldEditorMap.keySet().iterator(); while (keys.hasNext()) { String key = keys.next(); FieldEditor editor = fFieldEditorMap.get(key); if (!editor.isValid()) { return; } Connector.Argument arg = 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); }
From source file:org.chromium.debug.ui.launcher.TabBase.java
License:Open Source License
private static void storeEditor(FieldEditor editor, String errorValue) { if (editor.isValid()) { editor.store(); } else {//from w ww.j av a2 s . c om editor.getPreferenceStore().setValue(editor.getPreferenceName(), errorValue); } }
From source file:org.eclipse.epsilon.common.dt.preferences.EpsilonPreferencePage.java
License:Open Source License
@Override public boolean performOk() { for (FieldEditor fieldEditor : fieldEditors) { fieldEditor.store(); }//from ww w.j av a 2s . co m return true; }
From source file:org.eclipse.jdt.debug.ui.launchConfigurations.JavaConnectTab.java
License:Open Source License
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);//from w ww . j a va 2 s.co m Map<String, String> attrMap = new HashMap<String, String>(fFieldEditorMap.size()); Iterator<String> keys = fFieldEditorMap.keySet().iterator(); while (keys.hasNext()) { String key = keys.next(); FieldEditor editor = fFieldEditorMap.get(key); if (!editor.isValid()) { return; } Connector.Argument arg = 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); }
From source file:org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup.java
License:Open Source License
/** * Store preferences of the registered fieldEditors. * //from w w w . ja v a 2s . c om * @see org.eclipse.papyrus.infra.gmfdiag.preferences.ui.AbstractGroup#addFieldEditor(FieldEditor) */ public final void storePreferences() { for (FieldEditor fe : fieldsEditor) { fe.store(); } }