Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Strings in PropertyEditorSupport
Strings in PropertyEditorSupport [message #617024] Wed, 02 April 2008 16:07
Eli Lato is currently offline Eli LatoFriend
Messages: 35
Registered: July 2009
Member
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
Previous Topic:How do I tell VE to discard its cache?
Next Topic:How do I make a read-only property?
Goto Forum:
  


Current Time: Sat Dec 20 05:57:53 GMT 2014

Powered by FUDForum. Page generated in 0.02421 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software