|
|
|
Re: Property editor [message #668109 is a reply to message #668002] |
Tue, 03 May 2011 18:48 |
Konstantin Scheglov Messages: 555 Registered: July 2009 |
Senior Member |
|
|
You will need to provide your own property editor.
See org.eclipse.wb.internal.core.model.property.editor.IntegerPr opertyEditor as example. Its setEditorText() tries to parse String into Integer and show exception in other case. You can do the same.
You will need to register your property editor with ID, see for example how org.eclipse.wb.internal.core.model.property.editor.StringLis tPropertyEditor is registered in plugin.xml
<extension point="org.eclipse.wb.core.propertyEditors">
<configurableEditor id="stringList"
class="org.eclipse.wb.internal.core.model.property.editor.StringListPropertyEditor"/>
</extension>
...and used later in wbp-component.xml file
<property id="setType(java.lang.String)">
<editor id="stringList">
<parameter-list name="strings">submit</parameter-list>
<parameter-list name="strings">reset</parameter-list>
<parameter-list name="strings">button</parameter-list>
</editor>
</property>
Konstantin Scheglov,
Google, Inc.
|
|
|
Powered by
FUDForum. Page generated in 0.02765 seconds