| 
| [XText] Edit model fragment [message #63258] | Mon, 27 July 2009 13:54  |  | 
| Eclipse User  |  |  |  |  | Hi, 
 I'm using a GMF Editor to display a part of my model, but when the user
 clicks a particular node, I'd like more complexity to be revealed in an
 XTextEditor type view, allowing the user fine-grained control. My question
 is:
 
 How do I go from the selected node in GMF, to loading it in the XText
 view? I gather there is some addressing mechanism I should look at for
 this? Any help would be appreciated.
 
 Thanks!
 
 Maurice
 |  |  |  | 
|  | 
|  | 
|  | 
| 
| Re: [XText] Edit model fragment [message #277008 is a reply to message #145372] | Mon, 27 July 2009 18:20   |  | 
| Eclipse User  |  |  |  |  | Hi myName, 
 please find my comments below.
 
 
 Am 27.07.2009 21:31 Uhr, schrieb myName:
 > Hi Sebastian,
 >
 > sorry to popup in every discussion but what Maurice describes is very
 > similar to what I am trying to do.
 >
 > I have been waiting for Jan publishing his code for a long time now and
 > I am running of time for my project.
 >
 I think Jan will publish the example as soon as he finds the time.
 
 > Is there somewhere more documentation to this issue?
 
 It is a very specific problem. I'm afraid there is not much
 documentation available for navigating to an EObject that has been
 instantiated by an Xtext parser.
 
 > Currently I have a grammar, and an Xtext parser, generated from it. I
 > have written a tiny class which
 > takes the Xtext parser(via an injector),
 > my model file as an InputStream,
 > and parses the input stream.
 
 Sounds reasonable.
 >
 > I have difficulties with understanding the archictecture behind the
 > Xtext parser (the structure of the AST) and I am failing to see the
 > bridge to the GMF editor.
 
 The GMF editor simply visualizes the contents of the resource which has
 been created by an xtext parser. This objects are refered to as semantic
 objects. They are linked to the AST via an EAdapter. That's basically
 the structure that the parser produces.
 
 >
 > More documentation on this would be a great help. I would be happy to
 > provide you with my information, also.
 >
 
 Hope that helps,
 Sebastian
 
 --
 Need professional support for Eclipse Modeling?
 Go visit: http://xtext.itemis.com
 
 > Thanks
 >
 > myName
 >
 > Sebastian Zarnekow schrieb:
 >> Hi Maurice,
 >>
 >> actually Jan is going to publish the code for the example that he
 >> developed in his blog.
 >> I currently do not have access to the source but you may try to reuse
 >> the
 >>  org.eclipse.xtext.ui.common.editor.hyperlinking.OpenDeclarat ionAction.
 >> It takes the uri of the EObject and a LocationInFileProvider as
 >> argument. The latter can be retrieved via google guice.
 >>
 >> Regards,
 >> Sebastian
 >>
 |  |  |  | 
| 
| Re: [XText] Edit model fragment [message #362115 is a reply to message #277008] | Tue, 28 July 2009 09:56  |  | 
| Eclipse User  |  |  |  |  | Hi myName, 
 have a look at Jan's blog to find the sources:
 http://koehnlein.blogspot.com/2009/07/source-code-for-screen cast-of-xtext-and.html
 
 Regards,
 Sebastian
 --
 Need professional support for Eclipse Modeling?
 Go visit: http://xtext.itemis.com
 
 Am 28.07.2009 0:20 Uhr, schrieb Sebastian Zarnekow:
 > Hi myName,
 >
 > please find my comments below.
 >
 >
 > Am 27.07.2009 21:31 Uhr, schrieb myName:
 >> Hi Sebastian,
 >>
 >> sorry to popup in every discussion but what Maurice describes is very
 >> similar to what I am trying to do.
 >>
 >> I have been waiting for Jan publishing his code for a long time now and
 >> I am running of time for my project.
 >>
 > I think Jan will publish the example as soon as he finds the time.
 >
 >> Is there somewhere more documentation to this issue?
 >
 > It is a very specific problem. I'm afraid there is not much
 > documentation available for navigating to an EObject that has been
 > instantiated by an Xtext parser.
 >
 >> Currently I have a grammar, and an Xtext parser, generated from it. I
 >> have written a tiny class which
 >> takes the Xtext parser(via an injector),
 >> my model file as an InputStream,
 >> and parses the input stream.
 >
 > Sounds reasonable.
 >>
 >> I have difficulties with understanding the archictecture behind the
 >> Xtext parser (the structure of the AST) and I am failing to see the
 >> bridge to the GMF editor.
 >
 > The GMF editor simply visualizes the contents of the resource which has
 > been created by an xtext parser. This objects are refered to as semantic
 > objects. They are linked to the AST via an EAdapter. That's basically
 > the structure that the parser produces.
 >
 >>
 >> More documentation on this would be a great help. I would be happy to
 >> provide you with my information, also.
 >>
 >
 > Hope that helps,
 > Sebastian
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04612 seconds