Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Markers & Quick-fixes in tree editor
Markers & Quick-fixes in tree editor [message #1719737] Mon, 11 January 2016 18:04 Go to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi,
I'm trying to improve the B3 editor to add features simplifying to setting of versions for features. This is tracked in https://bugs.eclipse.org/bugs/show_bug.cgi?id=485472 and dependencies.
I've currently successfully implemented some addition rules with EMF validation, managed to invoke the validation and to turn the validation breakages into markers in the IDE. However, I'm still struggling at 2 things for which I'd welcome some help. It's been a while since I've done EMF stuff, so I'm probably "rotten" on this topic, so excuse my questions if they're trivial or if I missed an obvious answer somewhere else (I tried several requests but didn't manage to reach a link with helput code snippets)

* From a given ConstraintStatus or IMarker, how can I ask the right node in the Tree-based editor to be decorated with this warning/error? I could do it with plain JFace, but I imagine there's something higher-level for that. Isn't there?
* Form a given ConstraintStatus or Marker, what is the best way to present a quick-fix? With textual editor, quickfixes appear in the left ruler, on hover and on Ctrl-1. Is there similar "standard" approach for quick-fixes in EMF-based Tree editors? What is this? Do you have a good snippet of code showing how this can work?
Re: Markers & Quick-fixes in tree editor [message #1719861 is a reply to message #1719737] Tue, 12 January 2016 16:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Mickael,

Comments below.

On 11/01/2016 7:04 PM, Mickael Istria wrote:
> Hi,
> I'm trying to improve the B3 editor to add features simplifying to
> setting of versions for features. This is tracked in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=485472 and dependencies.
> I've currently successfully implemented some addition rules with EMF
> validation, managed to invoke the validation and to turn the
> validation breakages into markers in the IDE.
I suppose it's using the extended validation framework, not just the
basic generated from EMF core...
> However, I'm still struggling at 2 things for which I'd welcome some
> help. It's been a while since I've done EMF stuff, so I'm probably
> "rotten" on this topic, so excuse my questions if they're trivial or
> if I missed an obvious answer somewhere else (I tried several requests
> but didn't manage to reach a link with helput code snippets)
>
> * From a given ConstraintStatus or IMarker, how can I ask the right
> node in the Tree-based editor to be decorated with this warning/error?
> I could do it with plain JFace, but I imagine there's something
> higher-level for that. Isn't there?
More recent versions of EMF support generating a live validator that
decorates the tree with problem indicates, e.g., you'll see that in the
Sample Ecore Editors and in Oomph's Setup Editor if you enable Live
Validation in the menu bar for those editors.
> * Form a given ConstraintStatus or Marker, what is the best way to
> present a quick-fix? With textual editor, quickfixes appear in the
> left ruler, on hover and on Ctrl-1. Is there similar "standard"
> approach for quick-fixes in EMF-based Tree editors? What is this?
No, I've not seen that implemented in tree based editors whether they be
ones based on EMF models or otherwise... I'm not sure how one would
present such access. If there are IMarkers, I assume they could support
such actions.
> Do you have a good snippet of code showing how this can work?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Java 8 and Eclipse?
Next Topic:[EMF] "@generated NOT" does not work
Goto Forum:
  


Current Time: Tue Mar 19 09:03:22 GMT 2024

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

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

Back to the top