Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » auto-completion and global variables in EGL/EGX?
auto-completion and global variables in EGL/EGX? [message #1766587] Fri, 23 June 2017 10:35 Go to next message
Jonas Sorgalla is currently offline Jonas SorgallaFriend
Messages: 10
Registered: September 2015
Location: Dortmund, Germany
Junior Member
Hi folks,

I'm currently doing my first steps with Epsilon EGL and so far I'm really happy and have a great learning experience.

However, I noticed that there is no auto-completion in an .egl file for elements of my metamodel. Is there a secret way to magically add this (like the --page stuff in ATL)?

Another issue I stumbled upon is the EGX rule mechanism. Is there a best practice for transferring knowledge from one rule to another? To examplify here is a short snippet:

main.egx
rule example1 
  transform element1 : Element1 {  
  template : "ex1.egl"  
  target : "someFile.example"
}
rule example2 
  transform element2 : Element2 {  
  template : "ex2.egl"  
  target : "anotherFile.example"
}



How to access information from rule example1 (e.g. element1.name) in the template of rule example2? Is there a way to define global variables which are accessable in ex1.egl and ex2.egl?

Thanks in advance!

Jonas


Re: auto-completion and global variables in EGL/EGX? [message #1766589 is a reply to message #1766587] Fri, 23 June 2017 10:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Jonas,

It's nice to hear that you are having a pleasant experience with EGL so far!

> However, I noticed that there is no auto-completion in an .egl file for elements of my metamodel. Is there a secret way to magically add this (like the --page stuff in ATL)?

Epsilon languages are optionally and dynamically typed so there's no support for metamodel-driven code-completion I'm afraid.

> Is there a way to define global variables which are accessable in ex1.egl and ex2.egl?

You can define such variables in EGX's pre {} block and then use the "parameters" feature of EGX rules to pass them on to templates. See [1] for an example.

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/egx-parameters/
Re: auto-completion and global variables in EGL/EGX? [message #1766609 is a reply to message #1766589] Fri, 23 June 2017 12:48 Go to previous messageGo to next message
Jonas Sorgalla is currently offline Jonas SorgallaFriend
Messages: 10
Registered: September 2015
Location: Dortmund, Germany
Junior Member
Wow! Thx Dimitris for the quick and very helpful reply.
I'll try to promote the epsilon framework at our university as best I can :)!
Re: auto-completion and global variables in EGL/EGX? [message #1766610 is a reply to message #1766609] Fri, 23 June 2017 12:51 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Great! Any further questions, please give us a shout!

Cheers,
Dimitris
Previous Topic:refImmediateComposite in ETL
Next Topic:Epsilon Generation Language - Multiple Models
Goto Forum:
  


Current Time: Fri Apr 19 01:57:53 GMT 2024

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

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

Back to the top