Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » extending the properties view
extending the properties view [message #425389] Mon, 24 November 2008 05:48 Go to next message
Jim Steel is currently offline Jim SteelFriend
Messages: 54
Registered: July 2009
Member
Hi,

I have two pieces of code.

One of them has a model, including a class called Element, and a
generated editor (albeit with lots of modifications). Through the
generated ItemProvider's getPropertyDescriptors() method, the properties
view shows a handful of properties for Element objects.

The other piece of code, among the things it does, wants to provide the
user with a bunch of additional information about Element objects.

It is important that I not clutter up the first piece of code with the
business logic I want to implement in the second.

Is there a clean way to do this, either
- by providing a category for the existing single-pane properties
view, or
- by convincing EMF to generate a tabbed properties view?

If not, I guess I can switch the item provider code over to a tabbed
properties view by hand, or perhaps add some sort of
"ElementPropertiesProvider" extension point that the second piece of
code can implement. I thought I should check for more elegant or
lightweight solutions first...

Cheers,

Jim.
Re: extending the properties view [message #425394 is a reply to message #425389] Mon, 24 November 2008 13:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31152
Registered: July 2009
Senior Member
Jim,

Comments below.


Jim Steel wrote:
>
> Hi,
>
> I have two pieces of code.
>
> One of them has a model, including a class called Element, and a
> generated editor (albeit with lots of modifications). Through the
> generated ItemProvider's getPropertyDescriptors() method, the
> properties view shows a handful of properties for Element objects.
>
> The other piece of code, among the things it does, wants to provide
> the user with a bunch of additional information about Element objects.
>
> It is important that I not clutter up the first piece of code with the
> business logic I want to implement in the second.
>
> Is there a clean way to do this, either
> - by providing a category for the existing single-pane properties
> view, or
> - by convincing EMF to generate a tabbed properties view?
EMF does support grouping of properties. The Generator for example
shows properties grouped. That's the only thing EMF supports directly.
>
> If not, I guess I can switch the item provider code over to a tabbed
> properties view by hand, or perhaps add some sort of
> "ElementPropertiesProvider" extension point that the second piece of
> code can implement. I thought I should check for more elegant or
> lightweight solutions first...
There's lots of interest in generating something better than the crude
properties view. E.g., I'm at Obeo's site in Nantes as I type and they
just finished showing me their cool model for specifying nice forms
generation... I know Cameron Bateman of Oracle is interested in this.
GMF is already doing tabbed properties view support. And itemis too is
doing something similar as part of the cool source text editors they
generate. So I expect there will be a new component soon that focuses
on this.
>
> Cheers,
>
> Jim.
Re: extending the properties view [message #425531 is a reply to message #425394] Mon, 01 December 2008 03:55 Go to previous messageGo to next message
Jim Steel is currently offline Jim SteelFriend
Messages: 54
Registered: July 2009
Member
Ed Merks wrote:
> Jim,
>
> Comments below.
>
>
> Jim Steel wrote:
>>
>> Hi,
>>
>> I have two pieces of code.
>>
>> One of them has a model, including a class called Element, and a
>> generated editor (albeit with lots of modifications). Through the
>> generated ItemProvider's getPropertyDescriptors() method, the
>> properties view shows a handful of properties for Element objects.
>>
>> The other piece of code, among the things it does, wants to provide
>> the user with a bunch of additional information about Element objects.
>>
>> It is important that I not clutter up the first piece of code with the
>> business logic I want to implement in the second.
>>
>> Is there a clean way to do this, either
>> - by providing a category for the existing single-pane properties
>> view, or
>> - by convincing EMF to generate a tabbed properties view?
> EMF does support grouping of properties. The Generator for example
> shows properties grouped. That's the only thing EMF supports directly.

Yeah, grouping isn't a problem, and helps out with organising.

My first project actually defines an extension point that allows me to
add another adapter factory, and therefore indirectly the item providers
(by creating a subclass of XItemProvider, which creates additional
propertyDescriptors, but that extension point is used elsewhere, and
because of the way the adapter factory works, multiple extensions don't
play nicely together (if two adapter factories both adapt
IItemPropertySource, only one will be called and actually provide
property descriptors). [ Its possible that the author of this system
will email me and tell me I've completely misunderstood its purpose :) ]

Anyway, I'm still looking for a way to solve my problem. I've been
looking at the ecoretools stuff for tabbed properties, but I'm having
trouble understanding how it works - the doc seems a little thin. If
someone can point me in the right direction, I'd be very appreciative.

>>
>> If not, I guess I can switch the item provider code over to a tabbed
>> properties view by hand, or perhaps add some sort of
>> "ElementPropertiesProvider" extension point that the second piece of
>> code can implement. I thought I should check for more elegant or
>> lightweight solutions first...
> There's lots of interest in generating something better than the crude
> properties view. E.g., I'm at Obeo's site in Nantes as I type and they
> just finished showing me their cool model for specifying nice forms
> generation... I know Cameron Bateman of Oracle is interested in this.
> GMF is already doing tabbed properties view support. And itemis too is
> doing something similar as part of the cool source text editors they
> generate. So I expect there will be a new component soon that focuses
> on this.

The topcased guys are also using this stuff - I assume they're based in
Toulouse, but I may be mistaken. The problem I've found with some of the
EMF/tabbedProperties examples I've seen is that the depend on using
plugin.xml extensions for declaring properties, which is much more
heavyweight than I'd like, particularly for the base properties. What
I'd like to be able to do is use the existing EMF-generated property
descriptors to drive the population of a basic properties tab
programmatically rather than through extension points - this might need
a little reflection based on the type of the property, but that's
available from the property descriptor or from the property object.

If there are a bunch of people interested in that kind of functionality,
is there a bug or a feature request lodged somewhere for having the EMF
editor generator (optionally) generate an extensible
tabbedPropertiesView-based properties view? I had a quick look, and
couldn't see one...

>>
>> Cheers,
>>
>> Jim.
Re: extending the properties view [message #425539 is a reply to message #425531] Mon, 01 December 2008 10:58 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31152
Registered: July 2009
Senior Member
Jim,

Comments below.


Jim Steel wrote:
> Ed Merks wrote:
>> Jim,
>>
>> Comments below.
>>
>>
>> Jim Steel wrote:
>>>
>>> Hi,
>>>
>>> I have two pieces of code.
>>>
>>> One of them has a model, including a class called Element, and a
>>> generated editor (albeit with lots of modifications). Through the
>>> generated ItemProvider's getPropertyDescriptors() method, the
>>> properties view shows a handful of properties for Element objects.
>>>
>>> The other piece of code, among the things it does, wants to provide
>>> the user with a bunch of additional information about Element objects.
>>>
>>> It is important that I not clutter up the first piece of code with
>>> the business logic I want to implement in the second.
>>>
>>> Is there a clean way to do this, either
>>> - by providing a category for the existing single-pane properties
>>> view, or
>>> - by convincing EMF to generate a tabbed properties view?
>> EMF does support grouping of properties. The Generator for example
>> shows properties grouped. That's the only thing EMF supports directly.
>
> Yeah, grouping isn't a problem, and helps out with organising.
>
> My first project actually defines an extension point that allows me to
> add another adapter factory, and therefore indirectly the item
> providers (by creating a subclass of XItemProvider, which creates
> additional propertyDescriptors, but that extension point is used
> elsewhere, and because of the way the adapter factory works, multiple
> extensions don't play nicely together (if two adapter factories both
> adapt IItemPropertySource, only one will be called and actually
> provide property descriptors). [ Its possible that the author of this
> system will email me and tell me I've completely misunderstood its
> purpose :) ]
:-P
>
> Anyway, I'm still looking for a way to solve my problem. I've been
> looking at the ecoretools stuff for tabbed properties, but I'm having
> trouble understanding how it works - the doc seems a little thin. If
> someone can point me in the right direction, I'd be very appreciative.
I've never worked directly with tabbed properties myself. I recall in
the past being frustrated by the plethora of plugin.xml contributions
needed to support them, but I think (though I'm not sure) that a more
content provider based mechanism was added since thing.
>
>>>
>>> If not, I guess I can switch the item provider code over to a tabbed
>>> properties view by hand, or perhaps add some sort of
>>> "ElementPropertiesProvider" extension point that the second piece of
>>> code can implement. I thought I should check for more elegant or
>>> lightweight solutions first...
>> There's lots of interest in generating something better than the
>> crude properties view. E.g., I'm at Obeo's site in Nantes as I type
>> and they just finished showing me their cool model for specifying
>> nice forms generation... I know Cameron Bateman of Oracle is
>> interested in this. GMF is already doing tabbed properties view
>> support. And itemis too is doing something similar as part of the
>> cool source text editors they generate. So I expect there will be a
>> new component soon that focuses on this.
>
> The topcased guys are also using this stuff - I assume they're based in
> Toulouse, but I may be mistaken.
Yes. As I mentioned in my blog,
http://ed-merks.blogspot.com/2008/11/modeling-pilgrimage-to- france.html,
the Obeo folks have some cool stuff to support this as well, with the
advantage that it can be used to produce forms that are reusable in
wizards, dialogs, and as properties...
> The problem I've found with some of the
> EMF/tabbedProperties examples I've seen is that the depend on using
> plugin.xml extensions for declaring properties, which is much more
> heavyweight than I'd like, particularly for the base properties.
Yes, I found that extremely frustrating and annoying, but I was under
the vague impression that there have been changes in the tabbed
properties base framework that perhaps haven't been exploited yet.
> What
> I'd like to be able to do is use the existing EMF-generated property
> descriptors to drive the population of a basic properties tab
> programmatically rather than through extension points - this might need
> a little reflection based on the type of the property, but that's
> available from the property descriptor or from the property object.
Yes, that was my primary complaint.
>
> If there are a bunch of people interested in that kind of
> functionality, is there a bug or a feature request lodged somewhere
> for having the EMF
> editor generator (optionally) generate an extensible
> tabbedPropertiesView-based properties view? I had a quick look, and
> couldn't see one...
No, and I think road map now is to create a new component in EMFT that
combines some of the efforts of Obeo and GMF to produce something far
better than what we have today. Perhaps you'd like to contact them to
get involved at an early stage? I'll send you a private note with the
contacts. If others are interested, just let me know.
>
>>>
>>> Cheers,
>>>
>>> Jim.
>
Previous Topic:[CDO] [ECF] Invoking EMF operations remotely (client - server)
Next Topic:deleting child in one class deletes this child in all classes
Goto Forum:
  


Current Time: Thu May 28 02:27:37 GMT 2020

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

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

Back to the top