Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Property editor
Property editor [message #667896] Mon, 02 May 2011 16:17 Go to next message
George  is currently offline George
Messages: 34
Registered: March 2011
Member
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 17:37 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 555
Registered: July 2009
Senior Member
org.eclipse.wb.internal.core.model.property.editor.string.St ringPropertyEditor in plugin org.eclipse.wb.core

Konstantin Scheglov,
Google, Inc.

[Updated on: Mon, 02 May 2011 17:37]

Report message to a moderator

Re: Property editor [message #668002 is a reply to message #667903] Tue, 03 May 2011 10:21 Go to previous messageGo to next message
George  is currently offline George
Messages: 34
Registered: March 2011
Member
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 13:29]

Report message to a moderator

Re: Property editor [message #668109 is a reply to message #668002] Tue, 03 May 2011 18:48 Go to previous message
Konstantin Scheglov is currently offline 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.
Previous Topic:SwingDesigner and custom components on the palette
Next Topic:String editor
Goto Forum:
  


Current Time: Thu Oct 23 22:14:20 GMT 2014

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

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