Author: scabanovich
Date: 2009-04-09 10:45:09 -0400 (Thu, 09 Apr 2009)
New Revision: 14638
Added:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkCellEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TabbedJavaChoicerFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/FormAttributeData.java
Log:
JBIDE-4140
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml 2009-04-09 14:21:04
UTC (rev 14637)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml 2009-04-09 14:45:09
UTC (rev 14638)
@@ -72,7 +72,7 @@
</attributeEditor>
<attributeEditor
class="org.jboss.tools.common.model.ui.attribute.editor.MutableComboBoxEditor"
id="MutableCombo">
</attributeEditor>
- <attributeEditor
class="org.jboss.tools.common.model.ui.attribute.editor.JavaChoicerEditor"
id="AccessibleJava">
+ <attributeEditor
class="org.jboss.tools.common.model.ui.attribute.editor.JavaEclipseChoicerEditor"
id="AccessibleJava">
</attributeEditor>
<attributeEditor
class="org.jboss.tools.common.model.ui.attribute.editor.StringEditor"
id="AccessibleJava2">
</attributeEditor>
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerEditor.java 2009-04-09
14:21:04 UTC (rev 14637)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerEditor.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -17,6 +17,7 @@
import org.jboss.tools.common.model.ui.widgets.IWidgetSettings;
+@Deprecated
public class JavaChoicerEditor extends ValueEditor {
protected DialogCellEditorEx cellEditor;
Added:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.model.ui.attribute.editor;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
+
+import org.jboss.tools.common.meta.key.WizardKeys;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.IValueProvider;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultValueAdapter;
+import org.jboss.tools.common.model.ui.widgets.IWidgetSettings;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+
+public class JavaEclipseChoicerEditor extends ValueEditor {
+
+ protected JavaHyperlinkCellEditor cellEditor;
+ //protected JavaChoicerFieldEditor fieldEditor;
+ protected JavaHyperlinkLineFieldEditor fieldEditor;
+
+ public JavaEclipseChoicerEditor() {}
+
+ public JavaEclipseChoicerEditor(IWidgetSettings settings) {
+ super(settings);
+ }
+
+ public void dispose() {
+ super.dispose();
+ if (cellEditor!=null) cellEditor.dispose();
+ cellEditor = null;
+ if (fieldEditor!=null) fieldEditor.dispose();
+ fieldEditor = null;
+ }
+
+ public boolean isGreedyEditor() {
+ return true;
+ }
+
+ protected CellEditor createCellEditor(Composite parent) {
+// cellEditor = new DialogCellEditorEx(parent, SWT.NONE);
+ cellEditor = new JavaHyperlinkCellEditor(parent, SWT.NONE);
+ cellEditor.setPropertyEditor(this);
+ return cellEditor;
+ }
+
+ protected ExtendedFieldEditor createFieldEditor(Composite parent) {
+ //fieldEditor = new JavaChoicerFieldEditor();
+ fieldEditor = new JavaHyperlinkLineFieldEditor(settings);
+ //fieldEditor.setLabelText(getLabelText());
+ return fieldEditor;
+ }
+
+ public String getChangeButtonName() {
+ return JFaceResources.getString("openBrowse");
+ }
+
+ public boolean callsExternal() {
+ return true;
+ }
+
+ public Object callExternal(Shell shell) {
+ IJavaProject jp = null;
+ DefaultValueAdapter adapter = (DefaultValueAdapter)getInput();
+ XModelObject o = adapter.getModelObject();
+ if(o != null) {
+ IProject p = EclipseResourceUtil.getProject(o);
+ if(p != null) {
+ jp = EclipseResourceUtil.getJavaProject(p);
+ }
+ }
+ String title = "Select " + getAttributeName();
+ if(adapter != null && adapter.getAttribute() != null) {
+ String key = "" + adapter.getAttribute().getModelEntity().getName() +
"." + adapter.getAttribute().getName().replace(' ', '_') +
".edit";
+ String t = WizardKeys.getLabelText(key);
+ if(t != null) {
+ title = t;
+ } else {
+ title = "Select " +
WizardKeys.getAttributeDisplayName(adapter.getAttribute(), true);
+ }
+ }
+
+ FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(
+ shell,
+ false,
+ ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow(),
+ SearchEngine.createJavaSearchScope(jp != null ? new IJavaElement[]{jp} : new
IJavaElement[0]),
+ IJavaSearchConstants.TYPE);
+ dialog.setTitle(title);
+ IValueProvider valueProvider =
(IValueProvider)adapter.getAdapter(IValueProvider.class);
+ String v = valueProvider.getStringValue(true);
+ dialog.setInitialPattern(v);
+ int status = dialog.open();
+ if(status == FilteredItemsSelectionDialog.OK) {
+ Object result = dialog.getFirstResult();
+ if(result instanceof IType) {
+ return ((IType)result).getFullyQualifiedName('.');
+ }
+ }
+ return null;
+ }
+
+}
Property changes on:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerFieldEditor.java 2009-04-09
14:21:04 UTC (rev 14637)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerFieldEditor.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -28,8 +28,8 @@
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.core.search.TypeNameMatch;
-import org.eclipse.jdt.internal.ui.dialogs.TypeInfoViewer;
-import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionComponent;
+//import org.eclipse.jdt.internal.ui.dialogs.TypeInfoViewer;
+//import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionComponent;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
@@ -47,12 +47,13 @@
import org.jboss.tools.common.model.ui.widgets.IWidgetSettings;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+@Deprecated
public class JavaEclipseChoicerFieldEditor extends ExtendedFieldEditor implements
IFieldEditor, IPropertyFieldEditor, PropertyChangeListener {
protected IPropertyEditor propertyEditor;
protected IValueChangeListener valueChangeListener;
protected IValueProvider valueProvider;
- protected TypeSelectionComponent tc;
+// protected TypeSelectionComponent tc;
protected String filter;
protected String javaProjectName;
@@ -75,9 +76,9 @@
}
protected void doStore() {
- if(tc != null && tc.getSelection() != null && tc.getSelection().length
> 0) {
- valueProvider.setValue(tc.getSelection()[0].getFullyQualifiedName());
- }
+// if(tc != null && tc.getSelection() != null &&
tc.getSelection().length > 0) {
+// valueProvider.setValue(tc.getSelection()[0].getFullyQualifiedName());
+// }
}
public int getNumberOfControls() {
@@ -108,10 +109,10 @@
return SearchEngine.createJavaSearchScope(elements);
}
- private class TitleLabel implements TypeSelectionComponent.ITitleLabel {
- public void setText(String text) {
- }
- }
+// private class TitleLabel implements TypeSelectionComponent.ITitleLabel {
+// public void setText(String text) {
+// }
+// }
protected Control getControl(Composite parent) {
IJavaSearchScope scope = getScope();
@@ -123,9 +124,9 @@
filter = "java.lang.Object";
}
- tc = new TypeSelectionComponent(parent, 0, message, false, scope,
0/*IJavaSearchConstants.CLASS + IJavaSearchConstants.INTERFACE*/,
Signature.getSimpleName(filter), new TitleLabel(), null);
- Composite composite = tc;
- tc.triggerSearch();
+// tc = new TypeSelectionComponent(parent, 0, message, false, scope,
0/*IJavaSearchConstants.CLASS + IJavaSearchConstants.INTERFACE*/,
Signature.getSimpleName(filter), new TitleLabel(), null);
+ Composite composite = null; //tc;
+// tc.triggerSearch();
GridLayout layout = new GridLayout(1, false);
composite.setLayout(layout);
@@ -134,14 +135,14 @@
layout.marginHeight = 10;
layout.marginWidth = 10;
- tc.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- if(hasFocus(tc)) handle(tc.getSelection());
- }
- public void widgetSelected(SelectionEvent e) {
- if(hasFocus(tc)) handle(tc.getSelection());
- }
- });
+// tc.addSelectionListener(new SelectionListener() {
+// public void widgetDefaultSelected(SelectionEvent e) {
+// if(hasFocus(tc)) handle(tc.getSelection());
+// }
+// public void widgetSelected(SelectionEvent e) {
+// if(hasFocus(tc)) handle(tc.getSelection());
+// }
+// });
Table table = getTable();
if(table != null) {
@@ -157,19 +158,19 @@
}
Table getTable() {
- try {
- Field f = TypeSelectionComponent.class.getDeclaredField("fViewer");
- if(f == null) return null;
- f.setAccessible(true);
- TypeInfoViewer v = (TypeInfoViewer)f.get(tc);
- return v == null ? null : v.getTable();
- } catch (NoSuchFieldException ee) {
-
- } catch (IllegalArgumentException e2) {
-
- } catch (IllegalAccessException e3) {
-
- }
+// try {
+// Field f = TypeSelectionComponent.class.getDeclaredField("fViewer");
+// if(f == null) return null;
+// f.setAccessible(true);
+// TypeInfoViewer v = (TypeInfoViewer)f.get(tc);
+// return v == null ? null : v.getTable();
+// } catch (NoSuchFieldException ee) {
+//
+// } catch (IllegalArgumentException e2) {
+//
+// } catch (IllegalAccessException e3) {
+//
+// }
return null;
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkCellEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkCellEditor.java 2009-04-09
14:21:04 UTC (rev 14637)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkCellEditor.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -121,4 +121,10 @@
return classExists = (javaAdapter.getJavaElement() != null);
}
+ public Object callExternal(Shell shell) {
+ if(propertyEditor instanceof JavaEclipseChoicerEditor) {
+ return ((JavaEclipseChoicerEditor)propertyEditor).callExternal(shell);
+ }
+ return null;
+ }
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java 2009-04-09
14:21:04 UTC (rev 14637)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -22,9 +22,13 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog;
+import org.eclipse.jdt.internal.ui.dialogs.OpenTypeSelectionDialog;
import
org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.action.Action;
@@ -32,8 +36,11 @@
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.plugin.ModelPlugin;
@@ -283,4 +290,11 @@
return SearchEngine.createJavaSearchScope(elements);
}
+ public Object callExternal(Shell shell) {
+ if(propertyEditor instanceof JavaEclipseChoicerEditor) {
+ return ((JavaEclipseChoicerEditor)propertyEditor).callExternal(shell);
+ }
+ return null;
+ }
+
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java 2009-04-09
14:21:04 UTC (rev 14637)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -202,6 +202,10 @@
protected String changePressed() {
if (propertyEditor!=null) {
+ if(((PropertyEditor)propertyEditor).callsExternal()) {
+ Object result = ((PropertyEditor)propertyEditor).callExternal(getShell());
+ return result != null ? result.toString() : null;
+ }
editorDialog = new
PropertyEditorDialog(ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(),
propertyEditor);
//editorDialog.create();
//ExtendedFieldEditor fieldEditor = propertyEditor.getFieldEditor(null);
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TabbedJavaChoicerFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TabbedJavaChoicerFieldEditor.java 2009-04-09
14:21:04 UTC (rev 14637)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TabbedJavaChoicerFieldEditor.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -26,6 +26,7 @@
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.widgets.IWidgetSettings;
+@Deprecated
public class TabbedJavaChoicerFieldEditor extends ExtendedFieldEditor implements
IPropertyFieldEditor {
private static final String LAST_CHOICER =
"TabbedJavaChoicerFieldEditor.LastChoicer";
@@ -44,13 +45,13 @@
public TabbedJavaChoicerFieldEditor(IWidgetSettings settings) {
super(settings);
classicEditor = new JavaChoicerFieldEditor(settings);
- eclipseEditor = new JavaEclipseChoicerFieldEditor(settings);
+// eclipseEditor = new JavaEclipseChoicerFieldEditor(settings);
favoritesEditor = new JavaFavoritesFieldEditor(settings);
}
public void setOwnerDialog(PropertyEditorDialog dialog) {
classicEditor.setOwnerDialog(dialog);
- eclipseEditor.setOwnerDialog(dialog);
+// eclipseEditor.setOwnerDialog(dialog);
favoritesEditor.setOwnerDialog(dialog);
}
@@ -97,9 +98,9 @@
gd.heightHint = WINDOW_HEIGHT;
tabbedPane.setLayoutData(gd);
// eclipse
- TabItem eclipseChooser = new TabItem(tabbedPane, SWT.NONE);
- eclipseChooser.setControl(createEclipseChooser(tabbedPane));
- eclipseChooser.setText(EditorMessages.getString("TabbedJavaChoicerFieldEditor.Tab2.Label"));
+// TabItem eclipseChooser = new TabItem(tabbedPane, SWT.NONE);
+// eclipseChooser.setControl(createEclipseChooser(tabbedPane));
+// eclipseChooser.setText(EditorMessages.getString("TabbedJavaChoicerFieldEditor.Tab2.Label"));
// classic
TabItem classicChooser = new TabItem(tabbedPane, SWT.NONE);
classicChooser.setControl(createClassicChooser(tabbedPane));
@@ -135,9 +136,9 @@
protected Control createClassicChooser(Composite parent) {
return classicEditor.getControls(parent)[0];
}
- protected Control createEclipseChooser(Composite parent) {
- return eclipseEditor.getControls(parent)[0];
- }
+// protected Control createEclipseChooser(Composite parent) {
+// return eclipseEditor.getControls(parent)[0];
+// }
protected Control createFavoritesChooser(Composite parent) {
return favoritesEditor.getControls(parent)[0];
}
@@ -146,7 +147,7 @@
public void setPropertyEditor(IPropertyEditor propertyEditor) {
this.propertyEditor = propertyEditor;
classicEditor.setPropertyEditor(propertyEditor);
- eclipseEditor.setPropertyEditor(propertyEditor);
+// eclipseEditor.setPropertyEditor(propertyEditor);
favoritesEditor.setPropertyEditor(propertyEditor);
}
@@ -161,7 +162,7 @@
public void setEnabled(boolean enabled){
super.setEnabled(enabled);
if (classicEditor!=null) classicEditor.setEnabled(enabled);
- if (eclipseEditor!=null) eclipseEditor.setEnabled(enabled);
+// if (eclipseEditor!=null) eclipseEditor.setEnabled(enabled);
if (favoritesEditor!=null) favoritesEditor.setEnabled(enabled);
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java 2009-04-09
14:21:04 UTC (rev 14637)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -33,6 +33,7 @@
import org.jboss.tools.common.model.ui.attribute.editor.IFieldEditor;
import org.jboss.tools.common.model.ui.attribute.editor.IPropertyEditor;
import org.jboss.tools.common.model.ui.attribute.editor.IPropertyFieldEditor;
+import org.jboss.tools.common.model.ui.attribute.editor.JavaEclipseChoicerEditor;
import org.jboss.tools.common.model.ui.attribute.editor.TableStructuredEditor;
import org.jboss.tools.common.model.ui.widgets.IWidgetSettings;
@@ -118,7 +119,8 @@
for(int i=0; i<attributes.length; i++) {
IPropertyEditor editor = support.getPropertyEditorByName(attributes[i].getName());
if(editor != null) {
- if(attributes[i].getWraperClassName()!=null) {
+ if(attributes[i].getWraperClassName()!=null
+ && !(editor instanceof JavaEclipseChoicerEditor)) {
try {
Class wraperClass = Class.forName(attributes[i].getWraperClassName());
Constructor wraperConstructor = wraperClass.getConstructor(new
Class[]{IWidgetSettings.class});
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/FormAttributeData.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/FormAttributeData.java 2009-04-09
14:21:04 UTC (rev 14637)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/FormAttributeData.java 2009-04-09
14:45:09 UTC (rev 14638)
@@ -28,6 +28,7 @@
public FormAttributeData(String name, ILayoutDataFactory layoutDataFactory, String
wraperClassName, int width, String displayname) {
this.name = name;
+ if(layoutDataFactory == null) layoutDataFactory = LayoutDataFactory.getInstance();
this.layoutDataFactory = layoutDataFactory;
this.wraperClassName = wraperClassName;
this.width = width;