Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Properties sort
Properties sort [message #221215] Thu, 10 August 2006 20:00 Go to next message
Eclipse UserFriend
Originally posted by: vinicius.ferraz.gmail.com

Hi, I wanna know how can I implement and set a properties sort!!

ty
Re: Properties sort [message #221222 is a reply to message #221215] Thu, 10 August 2006 15:18 Go to previous messageGo to next message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
On Thu, 10 Aug 2006 17:00:25 -0300
Vinicius Ferraz Campos <vinicius.ferraz@gmail.com> wrote:

> Hi, I wanna know how can I implement and set a properties sort!!
>

you mean sorting the entries of the PropertiesView? I think the order of that
list is defined by the method

IPropertyDescriptor [] IPropertySource#getPropertyDescriptors()

that your root class of your model should implement. I would asociate a SortAlgorithm
(Strategy pattern) to each model element.

> ty
Re: Properties sort [message #221231 is a reply to message #221222] Thu, 10 August 2006 21:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You need to subclass PropertySheetEntry and override:
computeMergedPropertyDescriptors

"Sebastian Gurin" <sgurin@montevideo.com.uy> wrote in message
news:20060810171816.6428f068@localhost.localdomain...
> On Thu, 10 Aug 2006 17:00:25 -0300
> Vinicius Ferraz Campos <vinicius.ferraz@gmail.com> wrote:
>
>> Hi, I wanna know how can I implement and set a properties sort!!
>>
>
> you mean sorting the entries of the PropertiesView? I think the order of
> that
> list is defined by the method
>
> IPropertyDescriptor [] IPropertySource#getPropertyDescriptors()
>
> that your root class of your model should implement. I would asociate a
> SortAlgorithm
> (Strategy pattern) to each model element.
>
>> ty
Re: Properties sort [message #221361 is a reply to message #221215] Fri, 11 August 2006 20:21 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
it is possible to group them

You can create a class to handle the group attribute of
the PropertyDescriptor.

------------------------------------

public class TextPropertyGroupingDescriptor extends TextPropertyDescriptor
{
public TextPropertyGroupingDescriptor(Object id, String displayName, String category)
{
super(id, displayName);
setCategory(category);
}
}
------------------------------------
Re: Properties sort [message #221379 is a reply to message #221231] Fri, 11 August 2006 20:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vinicius.ferraz.gmail.com

Randy Hudson wrote:
> You need to subclass PropertySheetEntry and override:
> computeMergedPropertyDescriptors
>
> "Sebastian Gurin" <sgurin@montevideo.com.uy> wrote in message
> news:20060810171816.6428f068@localhost.localdomain...
>> On Thu, 10 Aug 2006 17:00:25 -0300
>> Vinicius Ferraz Campos <vinicius.ferraz@gmail.com> wrote:
>>
>>> Hi, I wanna know how can I implement and set a properties sort!!
>>>
>> you mean sorting the entries of the PropertiesView? I think the order of
>> that
>> list is defined by the method
>>
>> IPropertyDescriptor [] IPropertySource#getPropertyDescriptors()
>>
>> that your root class of your model should implement. I would asociate a
>> SortAlgorithm
>> (Strategy pattern) to each model element.
>>
>>> ty
>
>

After do this class, I need to put it in the getAdapter(Class type) to
return my class? only that?
Re: Properties sort [message #221444 is a reply to message #221231] Mon, 14 August 2006 10:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vinicius.ferraz.gmail.com

Randy Hudson wrote:
> You need to subclass PropertySheetEntry and override:
> computeMergedPropertyDescriptors
>
> "Sebastian Gurin" <sgurin@montevideo.com.uy> wrote in message
> news:20060810171816.6428f068@localhost.localdomain...
>> On Thu, 10 Aug 2006 17:00:25 -0300
>> Vinicius Ferraz Campos <vinicius.ferraz@gmail.com> wrote:
>>
>>> Hi, I wanna know how can I implement and set a properties sort!!
>>>
>> you mean sorting the entries of the PropertiesView? I think the order of
>> that
>> list is defined by the method
>>
>> IPropertyDescriptor [] IPropertySource#getPropertyDescriptors()
>>
>> that your root class of your model should implement. I would asociate a
>> SortAlgorithm
>> (Strategy pattern) to each model element.
>>
>>> ty
>
>
Other thing..... computeMergedPropertyDescriptors It's a private method,
i can't override it...
Re: Properties sort [message #221524 is a reply to message #221361] Tue, 15 August 2006 14:37 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Something simple like x, y, width, height can not be sorted using groups.

"FreeGroup" <a.herz@FreeGroup.de> wrote in message
news:ebioto$80r$1@utils.eclipse.org...
> it is possible to group them
>
> You can create a class to handle the group attribute of
> the PropertyDescriptor.
>
> ------------------------------------
>
> public class TextPropertyGroupingDescriptor extends TextPropertyDescriptor
> {
> public TextPropertyGroupingDescriptor(Object id, String displayName,
> String category)
> {
> super(id, displayName);
> setCategory(category);
> }
> }
> ------------------------------------
Previous Topic:Save Problem
Next Topic:How to setup the shapes example
Goto Forum:
  


Current Time: Wed Feb 05 13:54:47 GMT 2025

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

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

Back to the top