Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Quick fix with linked-mode editing?
Quick fix with linked-mode editing? [message #978155] Fri, 09 November 2012 22:03
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1497
Registered: July 2009
Senior Member
In my latest experiments I tried to implement a quick fix with the following ambitious characteristics:

* react to a linking error (i.e., create a missing model element)
- potentially use more information from the context of the error
* insert a skeleton of the new element
* some details of the new element will need editing
- either select from existing model elements for cross references
- or choose some new names
* some details of the new element will be in the positions of cross references, but it should be allowed to enter fresh names (yet unresolved, to be fixed by the next quick fix invocation).

Some of these are readily implementable using Xtext's infrastrature for semantic modifications. Other characteristics better match what can be done with template proposals (completion).

However, I've hit some limitations when trying to put it all together:
- semantic modifications cannot insert references to not-yet-existing elements
- I couldn't see how to get linked mode working from a quick fix
- when trying to programmatically trigger a template proposal from a quick fix provider I fail to see how I could get access to some required references like the current ITextViewer etc.

Instead of combining quick fix and template also a concept of placeholder model elements could be useful which could then be handled by the framework (using linked mode for user input).

Has anyone tried s.t. along these lines?

Previous Topic:XText builder run takes many minutes on eclipse start
Next Topic:Xtext and left recursive
Goto Forum:

Current Time: Fri Aug 18 03:17:31 GMT 2017

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

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