Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Hawk » How to force hawk to follow package structure
How to force hawk to follow package structure [message #1841003] Fri, 30 April 2021 07:37 Go to next message
jo ber is currently offline jo berFriend
Messages: 92
Registered: August 2018
Member
Hi

I'm using hawk as a source model in a transformation. I facing a difference between how 'plain' epsilon source model works and hawk as source model.

The example in attachment shows illustrates my problem. The rule definition:
rule aRule transform s: IN!company::Company to t : OUT!companyTab::CompanyTab {
	t.col1 = s.name + "_transformed_" + s.isHeadquarter;
} 

works fine in plain epsilon, but not with hawk. If change 's: IN!company::Company' to 's: IN!Company' it works in both cases. Now, the first FQN complies with the model definition, hence I would expect to also work in hawk. Maybe I'm missing something...

Thank you for your help and kind regards
Re: How to force hawk to follow package structure [message #1841093 is a reply to message #1841003] Mon, 03 May 2021 17:07 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 589
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Jo,

Yes, when using the `A::B` notation, Hawk currently only allows straight metamodel URIs to be used for `A` (for instance, `https://www.home.org/companyTab::CompanyTab` would work).

I'll see if we can make it so `packageName::type` also works.

Best,
Antonio
Re: How to force hawk to follow package structure [message #1841094 is a reply to message #1841093] Mon, 03 May 2021 17:15 Go to previous messageGo to next message
jo ber is currently offline jo berFriend
Messages: 92
Registered: August 2018
Member
Hi Antonio

Thank you for the answer.

Kind regards.
Re: How to force hawk to follow package structure [message #1841095 is a reply to message #1841094] Mon, 03 May 2021 17:30 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 589
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Jo,

No problem. I've got a merge request with the enhancement ready:

https://gitlab.eclipse.org/eclipse/hawk/hawk/-/merge_requests/8

Once it passes all tests, I'll merge it. It should be available within a few hours :-).

Best,
Antonio
Re: How to force hawk to follow package structure [message #1841112 is a reply to message #1841095] Tue, 04 May 2021 08:59 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 589
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Jo,

packageName::typeName should work now on the latest interim version of Hawk (2.2.0-SNAPSHOT from Maven).

Best,
Antonio
Re: How to force hawk to follow package structure [message #1841150 is a reply to message #1841112] Wed, 05 May 2021 06:00 Go to previous message
jo ber is currently offline jo berFriend
Messages: 92
Registered: August 2018
Member
Hi Antonio

Just tested with 2.2.0-SNAPSHOT and this problem is solved. Thank you.
Previous Topic:How to convert GraphNodeWrapper to EObject
Goto Forum:
  


Current Time: Sat Nov 11 05:57:59 GMT 2023

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

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

Back to the top