Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Options for categorised properties?
Options for categorised properties? [message #1727047] Fri, 18 March 2016 12:55 Go to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hi all,

in my xcore metamodel I assigned attributes to different categories.
These categories are also correctly contained in the generated item
provider classes in the edit plugin.

If I enable the "show categories" button in the properties view of the
Sirius diagram editor the element type is used as a single category only
though.

Is there any setting for activating the categories support? Or am I
missing something?

Thanks for your advice,

Axel
Re: Options for categorised properties? [message #1727054 is a reply to message #1727047] Fri, 18 March 2016 13:35 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Axel,

I think you talk about "Show Categories" button in the Semantic tab?
If yes, your need about the properties view does not seem related to
Sirius, but only to properties view, the fact to have categories shown
in properties view seems only configurable through this action.
Because when looking at org.eclipse.ui.views.properties.CategoriesAction
class, it calls PropertySheetViewer.showCategories()/hideCategories()
method which are not accessible by API.
But by default categories are shown because
PropertySheetViewer.isShowingCategories boolean is at true.

Best Regards.

Le 18/03/2016 13:55, Axel Guckelsberger a écrit :
> Hi all,
>
> in my xcore metamodel I assigned attributes to different categories.
> These categories are also correctly contained in the generated item
> provider classes in the edit plugin.
>
> If I enable the "show categories" button in the properties view of the
> Sirius diagram editor the element type is used as a single category only
> though.
>
> Is there any setting for activating the categories support? Or am I
> missing something?
>
> Thanks for your advice,
>
> Axel



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Options for categorised properties? [message #1727076 is a reply to message #1727054] Fri, 18 March 2016 16:09 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hi Esteban,

thanks for elaborating. I am going to debug it soon in order to find the
reason for categories not being used properly.

Regards,
Axel


Am 18.03.2016 um 14:35 schrieb Esteban Dugueperoux:
> Hi Axel,
>
> I think you talk about "Show Categories" button in the Semantic tab?
> If yes, your need about the properties view does not seem related to
> Sirius, but only to properties view, the fact to have categories shown
> in properties view seems only configurable through this action.
> Because when looking at org.eclipse.ui.views.properties.CategoriesAction
> class, it calls PropertySheetViewer.showCategories()/hideCategories()
> method which are not accessible by API.
> But by default categories are shown because
> PropertySheetViewer.isShowingCategories boolean is at true.
>
> Best Regards.
>
> Le 18/03/2016 13:55, Axel Guckelsberger a écrit :
>> Hi all,
>>
>> in my xcore metamodel I assigned attributes to different categories.
>> These categories are also correctly contained in the generated item
>> provider classes in the edit plugin.
>>
>> If I enable the "show categories" button in the properties view of the
>> Sirius diagram editor the element type is used as a single category only
>> though.
>>
>> Is there any setting for activating the categories support? Or am I
>> missing something?
>>
>> Thanks for your advice,
>>
>> Axel
>
>
>
Re: Options for categorised properties? [message #1727077 is a reply to message #1727076] Fri, 18 March 2016 16:39 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hi Esteban,

it seems like it is indeed a Sirius problem.

The PropertySheetViewer#updateCategories() method calls
childEntry.getCategory().

This leads to
org.eclipse.sirius.ui.tools.api.properties.AbstractCompositeObjectPropertySource#buildCategoryName(EObject
eObject).

There the category name is retrieved like from the label provider.

This causes that for all features/properties the eObject's name is used
as the category name. The categories defined in the genmodel are ignored.

Any ideas about this?

Axel



Am 18.03.2016 um 17:09 schrieb Axel Guckelsberger:
> Hi Esteban,
>
> thanks for elaborating. I am going to debug it soon in order to find the
> reason for categories not being used properly.
>
> Regards,
> Axel
>
>
> Am 18.03.2016 um 14:35 schrieb Esteban Dugueperoux:
>> Hi Axel,
>>
>> I think you talk about "Show Categories" button in the Semantic tab?
>> If yes, your need about the properties view does not seem related to
>> Sirius, but only to properties view, the fact to have categories shown
>> in properties view seems only configurable through this action.
>> Because when looking at org.eclipse.ui.views.properties.CategoriesAction
>> class, it calls PropertySheetViewer.showCategories()/hideCategories()
>> method which are not accessible by API.
>> But by default categories are shown because
>> PropertySheetViewer.isShowingCategories boolean is at true.
>>
>> Best Regards.
>>
>> Le 18/03/2016 13:55, Axel Guckelsberger a écrit :
>>> Hi all,
>>>
>>> in my xcore metamodel I assigned attributes to different categories.
>>> These categories are also correctly contained in the generated item
>>> provider classes in the edit plugin.
>>>
>>> If I enable the "show categories" button in the properties view of the
>>> Sirius diagram editor the element type is used as a single category only
>>> though.
>>>
>>> Is there any setting for activating the categories support? Or am I
>>> missing something?
>>>
>>> Thanks for your advice,
>>>
>>> Axel
>>
>>
>>
>
Re: Options for categorised properties? [message #1727079 is a reply to message #1727077] Fri, 18 March 2016 16:54 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Sorry, there is a typo.
The class is AbstractCompositeEObjectPropertySource.

I wonder why buildCategoryName(EObject eObject) is questioned at all
when we need the category for a feature of this object.

Axel


Am 18.03.2016 um 17:39 schrieb Axel Guckelsberger:
> Hi Esteban,
>
> it seems like it is indeed a Sirius problem.
>
> The PropertySheetViewer#updateCategories() method calls
> childEntry.getCategory().
>
> This leads to
> org.eclipse.sirius.ui.tools.api.properties.AbstractCompositeObjectPropertySource#buildCategoryName(EObject
> eObject).
>
> There the category name is retrieved like from the label provider.
>
> This causes that for all features/properties the eObject's name is used
> as the category name. The categories defined in the genmodel are ignored.
>
> Any ideas about this?
>
> Axel
Re: Options for categorised properties? [message #1727194 is a reply to message #1727079] Mon, 21 March 2016 08:32 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Axel,

You are right all concretes classes inheriting of
AbstractCompositeObjectPropertySource don't allow to customize
properties categories. This comes from the feature of "Associated
Elements Expression" in odesign for mappings, which allow to associate
more semantic elements. Using this feature to have several semantic
elements associated to a DDiagramElement in selection will make the
Semantic tab of properties view display properties of all associated
semantic elements grouped by category whose name is name of semantic
element.

If you want to use your own category, I advise you to create your own
properties view, for example using EEF [1].
Note that for future Sirius 4.0 release, the use a task to have better
integration between Sirius and EEF [2].

[1] https://eclipse.org/eef/
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=482528

Best Regards.

Le 18/03/2016 17:54, Axel Guckelsberger a écrit :
> Sorry, there is a typo.
> The class is AbstractCompositeEObjectPropertySource.
>
> I wonder why buildCategoryName(EObject eObject) is questioned at all
> when we need the category for a feature of this object.
>
> Axel
>
>
> Am 18.03.2016 um 17:39 schrieb Axel Guckelsberger:
>> Hi Esteban,
>>
>> it seems like it is indeed a Sirius problem.
>>
>> The PropertySheetViewer#updateCategories() method calls
>> childEntry.getCategory().
>>
>> This leads to
>> org.eclipse.sirius.ui.tools.api.properties.AbstractCompositeObjectPropertySource#buildCategoryName(EObject
>>
>> eObject).
>>
>> There the category name is retrieved like from the label provider.
>>
>> This causes that for all features/properties the eObject's name is used
>> as the category name. The categories defined in the genmodel are ignored.
>>
>> Any ideas about this?
>>
>> Axel
>



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Diagram extensions hiding each other?
Next Topic:Retrieve the Node of an Element
Goto Forum:
  


Current Time: Fri Mar 29 08:41:24 GMT 2024

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

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

Back to the top