Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Possibility to extend EOL-editor with content assist
Possibility to extend EOL-editor with content assist [message #1557241] Sat, 10 January 2015 21:07 Go to next message
Johan Ekberg is currently offline Johan EkbergFriend
Messages: 3
Registered: November 2014
Junior Member
Hi!

I'm trying to use EOL as a scripting language to my meta-model. To get the best user-experience I would like to extend the content-assist function so that it is aware of the model I work on. I understand that it is not possible to do this as a generic
EOL feature but I wounder if it is possible in some way to extend the content assist
Mechanism in the editor with your own "assistance" function? If not I guess the best way is to specialize the editor one step further.

/Johan
Re: Possibility to extend EOL-editor with content assist [message #1557274 is a reply to message #1557241] Sat, 10 January 2015 21:32 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Johan,

Are you thinking of precise context-aware content assistance, or simply a context-independent list of class/property names of your metamodel?

Cheers,
Dimitris
Re: Possibility to extend EOL-editor with content assist [message #1560695 is a reply to message #1557274] Mon, 12 January 2015 19:15 Go to previous messageGo to next message
Johan Ekberg is currently offline Johan EkbergFriend
Messages: 3
Registered: November 2014
Junior Member
I'm not 100% sure how to name it but for a starter
I would like my users to get a class-completion when
declaring a variable. I have like hundreds of types and
it is hard for the user to know what they are called. So I would
like the content assist suggest Library and Librarian when the
users has typed Lib.

The second part (probably much harder to solve) is to also
know the property/method of a variable. I.e. When typing
Library.b there should pop up a list with "books" for instance.

Do you think that this is solvable? I can see that all the information
need is in the ERegistry view already so it is more how to get that information
into the editor. To help a little bit I think it is OK to specify the namespace
of the model that you want to use as content-assist as a preference to
the editor.

Best regards
Johan
Re: Possibility to extend EOL-editor with content assist [message #1564746 is a reply to message #1560695] Thu, 15 January 2015 00:14 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Johan,

EOL supports a dedicated type of statement for declaring models - not documented as the tools don't make use of it (yet) - which looks like this:

model Source driver EMF {nsUri="http://library"};


To get some model-aware content assistance, you could extend EolEditor, implement a template (i.e. completion) contributor, which should also be a module parse listener (see lines 30-32 of EolEditor.java for an example). This way you could provide context-unaware completion proposals for class/property names in your extended editor. Context-aware code completion would be much harder to get as you'd need to implement static analysis (i.e. variable resolution, type inference) for EOL - which is far from trivial.

Please let me know if you have any further questions.

Cheers,
Dimitris
Previous Topic:Which Epsilon language is best for batch, in-place refactoring?
Next Topic:ModeLink for a transformation model
Goto Forum:
  


Current Time: Sat Apr 20 02:50:07 GMT 2024

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

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

Back to the top