Skip to main content



      Home
Home » Eclipse Projects » WindowBuilder » Property editor
Property editor [message #667896] Mon, 02 May 2011 12:17 Go to next message
Eclipse UserFriend
Hello,
i am searching the implementation of String editor(property editor).where i can find?
Re: Property editor [message #667903 is a reply to message #667896] Mon, 02 May 2011 13:37 Go to previous messageGo to next message
Eclipse UserFriend
org.eclipse.wb.internal.core.model.property.editor.string.St ringPropertyEditor in plugin org.eclipse.wb.core

[Updated on: Mon, 02 May 2011 13:37] by Moderator

Re: Property editor [message #668002 is a reply to message #667903] Tue, 03 May 2011 06:21 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

in property tab we have a string editor to enter string property.I like to add control on input string.For example we accept the string that her length equal 4.

thinks for your help

[Updated on: Tue, 03 May 2011 09:29] by Moderator

Re: Property editor [message #668109 is a reply to message #668002] Tue, 03 May 2011 14:48 Go to previous message
Eclipse UserFriend
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>

Previous Topic:SwingDesigner and custom components on the palette
Next Topic:String editor
Goto Forum:
  


Current Time: Wed Jul 23 11:16:03 EDT 2025

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

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

Back to the top