Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » MTL query result don't match when tested in Sirius Interpreter(The mtl query used in the Sirius Project displayed some weird bugs/behavior)
MTL query result don't match when tested in Sirius Interpreter [message #1858599] Mon, 10 April 2023 23:12 Go to next message
Qalbun Salim is currently offline Qalbun SalimFriend
Messages: 2
Registered: April 2023
Junior Member
Hi, I'm trying to extend an IFML Editor Project based on https://github.com/ifml/ifml-editor by adding new components. However, it has a weird behavior when I clone the github repo and try to run the sirius plugin project (IFMLEditorDesign) in my Eclipse Modeling Tools. In the src/templates/helper.mtl file at IFMLEditorDesign project, it has this mtl query that is used in the .odesign file:
index.php/fa/43106/0/

I test this query by using the Sirius Interpreter window like this
index.php/fa/43107/0/
The query returned false, but when I use it like this:
index.php/fa/43108/0/
It returns true! I think both of them should return true since it is really a ViewComponent.

There is also another weird behavior that I have encountered. I don't know if it is related, but I cannot access the attributes of the ViewContainer Diagram in the Sirius Interpreter.
index.php/fa/43109/0/
The metamodel definition in the .ecore file is like this:
index.php/fa/43110/0/
This is also the reason why the ViewContainer label is displayed as invalid in the diagram because it used one of the queries in the helper.mtl file:
[query public getViewContainerLabel(vc : ViewContainer) : String = 
		if (vc.isLandmark and vc.isDefault and not vc.isXOR) 
		then '[L][D]'
		else 
			if(vc.isLandmark and not vc.isDefault and not vc.isXOR)
			then '[L]'
			else
				if(not vc.isLandmark and vc.isDefault and not vc.isXOR)
				then '[D]'
				else 
					if(vc.isLandmark and not vc.isDefault and vc.isXOR)
					then '[L][XOR]'
					else
						if(not vc.isLandmark and vc.isDefault and vc.isXOR)
						then '[D][XOR]'
						else
							if(vc.isLandmark and vc.isDefault and vc.isXOR)
							then '[L][D][XOR]'
							else
								if(not vc.isLandmark and not vc.isDefault and vc.isXOR)
								then '[XOR]'
								else
									''
								endif
							endif
						endif
					endif
				endif
			endif
		endif
/]


Am I doing something wrong? I haven't made any changes to the original project yet. These bugs appear when I try to run the project after cloning it from GitHub.

Thanks in advance
Re: MTL query result don't match when tested in Sirius Interpreter [message #1858918 is a reply to message #1858599] Mon, 01 May 2023 12:33 Go to previous message
Qalbun Salim is currently offline Qalbun SalimFriend
Messages: 2
Registered: April 2023
Junior Member
Firstly, I'm really grateful and want to say thanks to everyone who has read this post. Just want to make sure, Is there anything that I can clarify or is there a statement that is particularly confusing about my above question? or do I post in the wrong newsgroup? Sorry for my inexperience as this is the first time I'm posting to Eclipse Forums. Any feedback would be very appreciated, thanks :)
Previous Topic:Sirius Desktop: Direct Edit Label on Linux
Next Topic:Saving AQL queries for use in Sirius model
Goto Forum:
  


Current Time: Tue Oct 15 07:33:48 GMT 2024

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

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

Back to the top