Strings in PropertyEditorSupport [message #617024] |
Wed, 02 April 2008 12:07 |
Eclipse User |
|
|
|
I have a simple String property named x.
I call xPropertyDescriptor.setPropertyEditorClass(XEditor.class);
XEditor is:
public class XEditor extends PropertyEditorSupport {
private static final String[] CHOICES = {"a", "b", "c"};
public String[] getTags() {
return CHOICES;
}
public String getJavaInitializationString() {
return (String)getValue();
}
}
The combo opens fine. But when I choose a,
VE generates
o.setX(a);
instead of
o.setX("a");
This doesn't compile particularly well.
How do I make it return a String?
Also, what is getJavaInitializationString?
The JavaDocs aren't helpful.
Is there more thorough documentation anywhere?
Thanks,
Eli
|
|
|
Powered by
FUDForum. Page generated in 0.03003 seconds