Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Sync EVL validation result with text editor
Sync EVL validation result with text editor [message #1001239] Wed, 16 January 2013 04:54 Go to next message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi,

I have implemented an Eclipse editor to view text for a model. I have a model to store the information where which model element is represented in the text. Now I want to create annotations for the markers created through EVL. I could find no tutorial on how to do this.

I am looking for a way to get notifyed of marker changes and create the annotations by hand then. Is a resource listener the right thing for this job?

Thanks,

Ralph
Re: Sync EVL validation result with text editor [message #1001517 is a reply to message #1001239] Wed, 16 January 2013 16:28 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 795
Registered: July 2009
Senior Member
Hi Ralph,

I'm not sure I can fully grasp what you're trying to do. Could you perhaps elaborate a bit more?

Cheers,
Dimitris
Re: Sync EVL validation result with text editor [message #1001720 is a reply to message #1001517] Thu, 17 January 2013 04:24 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi Dimitris,

I have the follwoing use case:

I do have a GMF model which is validated by an EVL skript. The markers etc. are attached to the resource which the GMF model editor displays. So in this editor everything is fine. Additionally to this graphical editing option I offer textual editing of certain parts of the model to the user. For this purpose a custom syntax can be defined on the model at runtime. A user can then click a button to see the same model in textual and graphical views side by side at the same time. Both the textual and model editor update each other while editing one of them. At the moment the validation results are only shown in the graphical editor as this editor has the model as resource. The textual editor is not connected to any resource etc. It is having a custom editor input that is generated out of the graphical model. All changes that are done are directly written to the model on save of the text editor. Now I want to show the results of the EVL evaluation in the textual model editor too. Hence, I assume that I need to somehow listen to the model resource for changes of markers and put annotations for these markers to my textual editor by hand. Is this right? Is putting a resource listener on the workspace the best way to do it?

Thank you very much!

Ralph
Re: Sync EVL validation result with text editor [message #1002074 is a reply to message #1001720] Thu, 17 January 2013 17:04 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 795
Registered: July 2009
Senior Member
Hi Ralph,

Off the top of my head I can't see another way. Either a workspace listener or a builder would probably do the trick.

Cheers,
Dimitris
Re: Sync EVL validation result with text editor [message #1002722 is a reply to message #1002074] Sat, 19 January 2013 03:07 Go to previous message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi Dimitris,

I implemented the ResourceListener and it works fine. It gets invoked each time the markers change.

Ralph
Previous Topic:How to run EVL 'fix' when using eunit?
Next Topic:Enumeration question and translation issue
Goto Forum:
  


Current Time: Sat Jul 26 09:27:49 EDT 2014

Powered by FUDForum. Page generated in 0.07282 seconds