Author: dgolovin
Date: 2007-09-21 16:45:09 -0400 (Fri, 21 Sep 2007)
New Revision: 3764
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ViewConstants.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-932
save of previously choosen values added and make combos vields uneditable, so you can only
select values from dropdown list
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-09-21
17:57:31 UTC (rev 3763)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-09-21
20:45:09 UTC (rev 3764)
@@ -108,7 +108,7 @@
.createComboEditor(
ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
"Deploy as:", Arrays.asList(new String[] { "war",
"ear" }),
- "war", false);
+ "war", true);
String lastCreatedCPName = "";
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ViewConstants.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ViewConstants.java 2007-09-21
17:57:31 UTC (rev 3763)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ViewConstants.java 2007-09-21
20:45:09 UTC (rev 3764)
@@ -20,7 +20,7 @@
public String SCOPE_AS_LABEL = "label";
public String SCOPE_AS_NODE = "node";
- public String PACKAGES_FLAT = "flat";
+ public String PACKAGES_FLAT = "editable";
public String PACKAGES_HIERARCHICAL = "hierarchical";
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java 2007-09-21
17:57:31 UTC (rev 3763)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java 2007-09-21
20:45:09 UTC (rev 3764)
@@ -24,12 +24,12 @@
List values = null;
- boolean flat = false;
+ boolean editable = false;
- public ComboFieldEditor(String name, String label, List values,Object
defaultValue,boolean flat) {
+ public ComboFieldEditor(String name, String label, List values,Object
defaultValue,boolean editableSelection) {
super(name, label, defaultValue);
this.values = Collections.unmodifiableList(values);
- this.flat = flat;
+ this.editable = editableSelection;
}
private ComboBoxField comboField;
@@ -47,7 +47,7 @@
public Control getComboControl(Composite composite) {
// TODO Auto-generated method stub
if(comboField == null) {
- comboField = new ComboBoxField(composite,values,getValue(),flat);
+ comboField = new ComboBoxField(composite,values,getValue(),editable);
comboField.addPropertyChangeListener(this);
} else if(composite!=null) {
Assert.isTrue(comboField.getControl().getParent()==composite);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java 2007-09-21
17:57:31 UTC (rev 3763)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java 2007-09-21
20:45:09 UTC (rev 3764)
@@ -112,7 +112,7 @@
* @param label
* @param values
* @param defaultValue
- * @param flat
+ * @param editable
* @param action1
* @param action2
* @param validator
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2007-09-21
17:57:31 UTC (rev 3763)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2007-09-21
20:45:09 UTC (rev 3764)
@@ -170,7 +170,7 @@
}
};
}
-
+
/**
*
*/
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java 2007-09-21
17:57:31 UTC (rev 3763)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java 2007-09-21
20:45:09 UTC (rev 3764)
@@ -28,13 +28,13 @@
ComboFieldEditor combo = null;
public TaggedComboFieldEditor(String name, String label, List values,
- Object defaultValue, boolean floatStyle) {
+ Object defaultValue, boolean editable) {
super(name, label, defaultValue==null?"":defaultValue.toString());
this.values = Collections.unmodifiableList(values);
- this.floatStyle = floatStyle;
+ this.floatStyle = editable;
combo = new ComboFieldEditor(
- name,label,values,getValue(),floatStyle);
+ name,label,values,getValue(),editable);
addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name,label),
combo});
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java 2007-09-21
17:57:31 UTC (rev 3763)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java 2007-09-21
20:45:09 UTC (rev 3764)
@@ -42,15 +42,16 @@
List values = new ArrayList();
public ComboBoxField(Composite parent,List values, ILabelProvider labelProvider,
- Object value, boolean floatStyle) {
- this(parent, values, value, floatStyle);
+ Object value, boolean flatStyle) {
+ this(parent, values, value, flatStyle);
comboControl.setLabelProvider(labelProvider);
}
- public ComboBoxField(Composite parent,List values, Object value, boolean floatStyle) {
+ public ComboBoxField(Composite parent,List values, Object value, boolean editable) {
this.values = values;
CCombo ccombo = new CCombo(parent, SWT.BORDER);
ccombo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ ccombo.setEditable(editable);
comboControl = new ComboViewer(ccombo);
comboControl.setContentProvider(new IStructuredContentProvider() {