Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Update a viewpart when dsl is modified
Update a viewpart when dsl is modified [message #1740313] Thu, 11 August 2016 13:28 Go to next message
Dimg Cim is currently offline Dimg CimFriend
Messages: 59
Registered: December 2015
Member
Hello everybody,

I have a calculation with a list of x and y values. When I add values to the dsl, I want to update my diagram with x and y axis. How can I fill the Diagramm with the calculated values in the dsl.

Maybe it should be listen on value change in the editorpart.

Best regards.
Dim
Re: Update a viewpart when dsl is modified [message #1740316 is a reply to message #1740313] Thu, 11 August 2016 13:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
there are multiple possible ways to do such things e.g.

org.eclipse.xtext.resource.IResourceDescription.Event.Listener.descriptionsChanged(Event) for changes in the builder
org.eclipse.xtext.ui.editor.model.IXtextModelListener.modelChanged(XtextResource) (at the editors ixtextdocument)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Update a viewpart when dsl is modified [message #1740367 is a reply to message #1740316] Fri, 12 August 2016 10:07 Go to previous messageGo to next message
Dimg Cim is currently offline Dimg CimFriend
Messages: 59
Registered: December 2015
Member
Where is the builder to find?

And how to add the modelChanged Listener to the XTextEditor and on which place?

Re: Update a viewpart when dsl is modified [message #1740369 is a reply to message #1740367] Fri, 12 August 2016 10:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
You can inject clusteringbuilderstate

For the editor: I assumed you have already a Xtext editor in your hand
Then you can ask it for its document


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Update a viewpart when dsl is modified [message #1740425 is a reply to message #1740369] Fri, 12 August 2016 17:53 Go to previous message
Dimg Cim is currently offline Dimg CimFriend
Messages: 59
Registered: December 2015
Member
It works, thank you very much!
Previous Topic:New project generated from existing metamodel contains errors
Next Topic:create custom folder structure
Goto Forum:
  


Current Time: Thu Mar 28 12:33:10 GMT 2024

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

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

Back to the top