Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Custom editing widgets for properties of model elements
Custom editing widgets for properties of model elements [message #647422] Thu, 06 January 2011 08:38 Go to next message
Patrick Schmitt is currently offline Patrick SchmittFriend
Messages: 87
Registered: July 2009
Member
Hello again,
it is possible to implement other widgets for editing properties of model elements??
E.g. when I click on the value filed of the property in the property view i want to open a text editor for comfortable editing. Are there any possibilities ?

Kind regards,
Patrick
Re: Custom editing widgets for properties of model elements [message #647454 is a reply to message #647422] Thu, 06 January 2011 13:27 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 06-01-11 09:38, Patrick Schmitt wrote:
> Hello again,
> it is possible to implement other widgets for editing properties of
> model elements?? E.g. when I click on the value filed of the property in
> the property view i want to open a text editor for comfortable editing.
> Are there any possibilities ?
>

By default a PropertySource is created by the AdapterFactory which can
be fed into a PropertyView. The AdapterFactory consults generated
XXXItemProvider(s) and creates the PropertySource from
PropertyDescriptors which you can find in your XXXItemProvider
(Generated). The EStructuralFeature type and perhaps some other
attributes would determine the chosen cell-editor, and this is what you
need to overwrite. I think you need to customize the class
PropertySource which is instantiated in the AdapterFactory. Follow the
method getEditableValue(object) in PropertySource

Cheers C.


> Kind regards,
> Patrick
Re: Custom editing widgets for properties of model elements [message #647501 is a reply to message #647454] Thu, 06 January 2011 17:08 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050408030306040605040906
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

That's right. This recipe shows how:
< http://wiki.eclipse.org/EMF/Recipes#Recipe:_Create_your_own_ property_editor_in_a_generated_application>


http://wiki.eclipse.org/EMF/Recipes#Recipe:_Create_your_own_ property_editor_in_a_generated_application



Christophe Bouhier wrote:
> On 06-01-11 09:38, Patrick Schmitt wrote:
>> Hello again,
>> it is possible to implement other widgets for editing properties of
>> model elements?? E.g. when I click on the value filed of the property in
>> the property view i want to open a text editor for comfortable editing.
>> Are there any possibilities ?
>>
>
> By default a PropertySource is created by the AdapterFactory which can
> be fed into a PropertyView. The AdapterFactory consults generated
> XXXItemProvider(s) and creates the PropertySource from
> PropertyDescriptors which you can find in your XXXItemProvider
> (Generated). The EStructuralFeature type and perhaps some other
> attributes would determine the chosen cell-editor, and this is what
> you need to overwrite. I think you need to customize the class
> PropertySource which is instantiated in the AdapterFactory. Follow the
> method getEditableValue(object) in PropertySource
>
> Cheers C.
>
>
>> Kind regards,
>> Patrick
>

--------------050408030306040605040906
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
That's right.  This recipe shows how:<a
href=" http://wiki.eclipse.org/EMF/Recipes#Recipe:_Create_your_own_ property_editor_in_a_generated_application"><br>
</a>
<blockquote><a
href=" http://wiki.eclipse.org/EMF/Recipes#Recipe:_Create_your_own_ property_editor_in_a_generated_application"> http://wiki.eclipse.org/EMF/Recipes#Recipe:_Create_your_own_ property_editor_in_a_generated_application</a><br>
</blockquote>
<br>
<br>
Christophe Bouhier wrote:
<blockquote cite="mid:ig4fln$fh$1@news.eclipse.org" type="cite">On
06-01-11 09:38, Patrick Schmitt wrote:
<br>
<blockquote type="cite">Hello again,
<br>
it is possible to implement other widgets for editing properties of
<br>
model elements?? E.g. when I click on the value filed of the property
in
<br>
the property view i want to open a text editor for comfortable editing.
<br>
Are there any possibilities ?
<br>
<br>
</blockquote>
<br>
By default a PropertySource is created by the AdapterFactory which can
be fed into a PropertyView.  The AdapterFactory consults generated
XXXItemProvider(s) and creates the PropertySource from
PropertyDescriptors which you can find in your XXXItemProvider
(Generated). The EStructuralFeature type and perhaps some other
attributes would determine the chosen cell-editor, and this is what you
need to overwrite. I think you need to customize the class
PropertySource which is instantiated in the AdapterFactory. Follow the
method getEditableValue(object) in PropertySource
<br>
<br>
Cheers C.
<br>
<br>
<br>
<blockquote type="cite">Kind regards,
<br>
Patrick
<br>
</blockquote>
<br>
</blockquote>
</body>
</html>

--------------050408030306040605040906--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Chaning display name of elements in a generated Editor.
Next Topic:XSD documentation and formatting
Goto Forum:
  


Current Time: Fri Apr 26 05:43:53 GMT 2024

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

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

Back to the top