ITableRidget - nested properties [message #14302] |
Wed, 15 October 2008 13:09  |
Eclipse User |
|
|
|
Having a Person object with a String("name") and a reference to another
Person object("mother"), is there currently a way to customize the Label for
the "mother" column - other then overriding toString() - for the Person
object?
I'm missing a way to "customize" the LabelProvider for a solution like it's
done in JFace-Databinding (e.g. see Snippet017TableViewerWithDerivedColumns)
or even better the possibility to provide columnPropertyNames like
"mother.name" - but that's a JFace thing :-)
Thx
|
|
|
|
Re: ITableRidget - nested properties [message #15229 is a reply to message #15162] |
Thu, 16 October 2008 05:18  |
Eclipse User |
|
|
|
bug reported, thx
"Elias Volanakis" <evolanakis@innoopract.com> schrieb im Newsbeitrag
news:gd6n17$88n$1@build.eclipse.org...
> Hi Stefan,
>
> interesting idea. Our use case for the TableRidget is quite
> straightforward and there is no special API to handle what you describe.
>
> The only other way to do this without overriding toString() is to
> implement something like getMothersName() { return mother.name } on the
> Person class.
>
> My gut feeling (I might be wrong) is that a generic solution from our side
> would either be too limited to satisfy everybody or to difficult to
> implement.
>
> However, it should be simple to provide API that would allow you to supply
> your own LabelProvider for specific columns. If you think that approach
> would be useful for you, please file a bug so we can keep track of this
> topic.
>
> Kind regards,
> Elias.
>
> Stefan Leopold wrote:
>> Having a Person object with a String("name") and a reference to another
>> Person object("mother"), is there currently a way to customize the Label
>> for
>> the "mother" column - other then overriding toString() - for the Person
>> object?
>>
>> I'm missing a way to "customize" the LabelProvider for a solution like
>> it's
>> done in JFace-Databinding (e.g. see
>> Snippet017TableViewerWithDerivedColumns)
>> or even better the possibility to provide columnPropertyNames like
>> "mother.name" - but that's a JFace thing :-)
>>
>> Thx
>>
>>
>
> --
> ---
> Elias Volanakis
> Innoopract, Inc.
> http://www.innoopract.com
|
|
|
Re: ITableRidget - nested properties [message #576329 is a reply to message #14302] |
Thu, 16 October 2008 02:29  |
Eclipse User |
|
|
|
Hi Stefan,
interesting idea. Our use case for the TableRidget is quite
straightforward and there is no special API to handle what you describe.
The only other way to do this without overriding toString() is to
implement something like getMothersName() { return mother.name } on the
Person class.
My gut feeling (I might be wrong) is that a generic solution from our
side would either be too limited to satisfy everybody or to difficult to
implement.
However, it should be simple to provide API that would allow you to
supply your own LabelProvider for specific columns. If you think that
approach would be useful for you, please file a bug so we can keep track
of this topic.
Kind regards,
Elias.
Stefan Leopold wrote:
> Having a Person object with a String("name") and a reference to another
> Person object("mother"), is there currently a way to customize the Label for
> the "mother" column - other then overriding toString() - for the Person
> object?
>
> I'm missing a way to "customize" the LabelProvider for a solution like it's
> done in JFace-Databinding (e.g. see Snippet017TableViewerWithDerivedColumns)
> or even better the possibility to provide columnPropertyNames like
> "mother.name" - but that's a JFace thing :-)
>
> Thx
>
>
--
---
Elias Volanakis
Innoopract, Inc.
http://www.innoopract.com
|
|
|
Re: ITableRidget - nested properties [message #576364 is a reply to message #15162] |
Thu, 16 October 2008 05:18  |
Eclipse User |
|
|
|
bug reported, thx
"Elias Volanakis" <evolanakis@innoopract.com> schrieb im Newsbeitrag
news:gd6n17$88n$1@build.eclipse.org...
> Hi Stefan,
>
> interesting idea. Our use case for the TableRidget is quite
> straightforward and there is no special API to handle what you describe.
>
> The only other way to do this without overriding toString() is to
> implement something like getMothersName() { return mother.name } on the
> Person class.
>
> My gut feeling (I might be wrong) is that a generic solution from our side
> would either be too limited to satisfy everybody or to difficult to
> implement.
>
> However, it should be simple to provide API that would allow you to supply
> your own LabelProvider for specific columns. If you think that approach
> would be useful for you, please file a bug so we can keep track of this
> topic.
>
> Kind regards,
> Elias.
>
> Stefan Leopold wrote:
>> Having a Person object with a String("name") and a reference to another
>> Person object("mother"), is there currently a way to customize the Label
>> for
>> the "mother" column - other then overriding toString() - for the Person
>> object?
>>
>> I'm missing a way to "customize" the LabelProvider for a solution like
>> it's
>> done in JFace-Databinding (e.g. see
>> Snippet017TableViewerWithDerivedColumns)
>> or even better the possibility to provide columnPropertyNames like
>> "mother.name" - but that's a JFace thing :-)
>>
>> Thx
>>
>>
>
> --
> ---
> Elias Volanakis
> Innoopract, Inc.
> http://www.innoopract.com
|
|
|
Powered by
FUDForum. Page generated in 0.03662 seconds