Skip to main content



      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 12:54 Go to next message
Eclipse UserFriend
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 08:37 Go to previous messageGo to next message
Eclipse UserFriend
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,
Re: Determining the order [message #1827907 is a reply to message #1827893] Tue, 26 May 2020 13:11 Go to previous messageGo to next message
Eclipse UserFriend
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 14:05 Go to previous message
Eclipse UserFriend
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,
Previous Topic:Auto completion in Sirius interpreter does not work
Next Topic:Domain Model Migration and Sirius
Goto Forum:
  


Current Time: Sun Jun 15 18:33:22 EDT 2025

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

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

Back to the top