Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » PropertyColumnLabelProvider and list of referenced objects
PropertyColumnLabelProvider and list of referenced objects [message #419918] Fri, 13 June 2008 10:45 Go to next message
Matthias Schoettle is currently offline Matthias SchoettleFriend
Messages: 44
Registered: July 2009
Member
I have a class A which contains one attribute and a list of class B.
Class B has a reference to Class C. Now I have another class which
contains a list of A's which is set as input to the TableViewer.

The first column should show the simple attribute of A which is no
problem. But I want to display all B's in their own columns as well.
Unfortunately only the first B of the list is displayed in every column.

Can this be achieved anyhow? I tried the approach explained in my
previous topic (see
http://www.eclipse.org/newsportal/article.php?id=32818&g roup=eclipse.tools.emf#32818)
but it didn't work.

Matthias
Re: PropertyColumnLabelProvider and list of referenced objects [message #419923 is a reply to message #419918] Fri, 13 June 2008 11:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Matthias,

Comments below.

Matthias Schoettle wrote:
> I have a class A which contains one attribute and a list of class B.
> Class B has a reference to Class C. Now I have another class which
> contains a list of A's which is set as input to the TableViewer.
>
> The first column should show the simple attribute of A which is no
> problem. But I want to display all B's in their own columns as well.
> Unfortunately only the first B of the list is displayed in every column.
>
> Can this be achieved anyhow? I tried the approach explained in my
> previous topic (see
> http://www.eclipse.org/newsportal/article.php?id=32818&g roup=eclipse.tools.emf#32818)
>
> but it didn't work.
I recently answered a question that's perhaps related pointing at
TreeNodeItemProvider's getPropertyDescriptor's specialized code that
creates decorated property descriptors.

I'm not quite sure how this will work, since there can be a variable
number of Bs and hence a variable number of properties yet you generally
have a fixed number of columns. You'll need to do something to ensure
that the property IDs are unique...

>
> Matthias
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: PropertyColumnLabelProvider and list of referenced objects [message #419926 is a reply to message #419923] Fri, 13 June 2008 13:33 Go to previous message
Matthias Schoettle is currently offline Matthias SchoettleFriend
Messages: 44
Registered: July 2009
Member
Ed,

Please see comments below.

Ed Merks wrote:
> Matthias,
>
> Comments below.
>
> Matthias Schoettle wrote:
>> I have a class A which contains one attribute and a list of class B.
>> Class B has a reference to Class C. Now I have another class which
>> contains a list of A's which is set as input to the TableViewer.
>>
>> The first column should show the simple attribute of A which is no
>> problem. But I want to display all B's in their own columns as well.
>> Unfortunately only the first B of the list is displayed in every column.
>>
>> Can this be achieved anyhow? I tried the approach explained in my
>> previous topic (see
>> http://www.eclipse.org/newsportal/article.php?id=32818&g roup=eclipse.tools.emf#32818)
>>
>> but it didn't work.
> I recently answered a question that's perhaps related pointing at
> TreeNodeItemProvider's getPropertyDescriptor's specialized code that
> creates decorated property descriptors.

Yes, that's exactly what I tried to use. I get the property I want but
the same value is shown in every column (i.e. of the first B of the
list). (it's difficult though as I can't call a.getList because this
would return property descriptors for the list, EContainment... I think)

> I'm not quite sure how this will work, since there can be a variable
> number of Bs and hence a variable number of properties yet you generally
> have a fixed number of columns.

I create one column for each B so this should not be a problem.

> You'll need to do something to ensure
> that the property IDs are unique...

Is this possible anyhow? The problem is that all have the same property ID.

>
>>
>> Matthias
>>
>>
Previous Topic:[CDO] loading old resources after modifying the model
Next Topic:[CDO] Dynamic models
Goto Forum:
  


Current Time: Thu Mar 28 10:50:54 GMT 2024

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

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

Back to the top