Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Determining the order (Determining the order of elements in a Tree diagram)
Determining the order [message #1827852] Mon, 25 May 2020 16:54 Go to next message
Rick Veens is currently offline Rick VeensFriend
Messages: 2
Registered: May 2020
Junior Member
Hi,

Im working on an editor that is to aid in helping the creation/edition of XML documents.

Unfortunately, so i have learned, i will have to deal with EMF xsd-importer generating FeatureMap objects.

For example in my model i have a OBAFunctionControl object, which has references to a mixed type, which can be FormatPN, FormatSN.

The OBAFunctionControl will get two ELists in the java code, and a EFeatureMapEntry list, aka the featuremap.

As far as i know, there is no way for eclipse sirius to make use of the featuremap objects to determine the true order (i.e. merge the lists).

I am willing to modify the Eclipse sirius source code, in order to add support for EMF feature maps, but i do not know where to start.

I believe i need to look into org.eclipse.sirius.tree and org.eclipse.sirius.tree.ui.

I was wondering if someone with some more knowledge of the codebase could give me some directions, i am only interesting in implementing this for the tree-diagram option of sirius atm.
Re: Determining the order [message #1827893 is a reply to message #1827852] Tue, 26 May 2020 12:37 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Hi,
You can, maybe, use a java service to get the list you desire and use this service in the "Semantic Candidates Expression" of the TreeItem mapping under "OABFunctionControl". It is a proposition, I have not tested it.
Regards,


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Determining the order [message #1827907 is a reply to message #1827893] Tue, 26 May 2020 17:11 Go to previous messageGo to next message
Rick Veens is currently offline Rick VeensFriend
Messages: 2
Registered: May 2020
Junior Member
I have considered this, but how would you be able to determine the order of different types of sub-nodes (such as FormatPN, FormatSN) under some tree node?

Is it possible to mix these nodes with a semantic expression?

Re: Determining the order [message #1828493 is a reply to message #1827907] Wed, 10 June 2020 18:05 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Rick,

If you define a mapping for each type of sub nodes, you will not be able to mix sub node types under some tree node: the result will be sorted regarding the order of mappings and then the order of the semantic candidates expression evaluation for each mapping.

If you want to mix every kind of sub nodes, you might define a mapping with a domain class on a common super types, and use the semantic candidates expression to order the result as wanted.

Regards,


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Auto completion in Sirius interpreter does not work
Next Topic:Domain Model Migration and Sirius
Goto Forum:
  


Current Time: Thu Apr 25 08:11:44 GMT 2024

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

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

Back to the top