/** * Recomputes the page's error state by calling <code>isValid</code> for * every field editor. */ protected void checkState() { boolean valid = true; invalidFieldEditor = null; // The state can only be set to true if all // field editors contain a valid value. So we must check them all Iterator<FieldEditor> i = fieldEditors.iterator(); while( i.hasNext() ){ FieldEditor editor = i.next(); valid = valid && editor.isValid(); if (!valid) { invalidFieldEditor = editor; break; } } setValid(valid); }
/** * Recomputes the page's error state by calling <code>isValid</code> for * every field editor. */ protected void checkState() { boolean valid = true; invalidFieldEditor = null; // The state can only be set to true if all // field editors contain a valid value. So we must check them all if (fields != null) { int size = fields.size(); for (int i = 0; i < size; i++) { FieldEditor editor = fields.get(i); valid = valid && editor.isValid(); if (!valid) { invalidFieldEditor = editor; break; } } } setValid(valid); }
/** * Recomputes the page's error state by calling <code>isValid</code> for * every field editor. */ protected void checkState() { boolean valid = true; invalidFieldEditor = null; // The state can only be set to true if all // field editors contain a valid value. So we must check them all if (fields != null) { int size = fields.size(); for (int i = 0; i < size; i++) { FieldEditor editor = fields.get(i); valid = valid && editor.isValid(); if (!valid) { invalidFieldEditor = editor; break; } } } setValid(valid); }
/** * Recomputes the page's error state by calling <code>isValid</code> for * every field editor. */ protected void checkState() { boolean valid = true; invalidFieldEditor = null; // The state can only be set to true if all // field editors contain a valid value. So we must check them all if (fields != null) { int size = fields.size(); for (int i = 0; i < size; i++) { FieldEditor editor = (FieldEditor) fields.get(i); valid = valid && editor.isValid(); if (!valid) { invalidFieldEditor = editor; break; } } } setValid(valid); }
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); }