Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Combining graphical syntax with textual internal syntax
Combining graphical syntax with textual internal syntax [message #557378] Tue, 07 September 2010 08:36 Go to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I just didn't know how to exactly name the topic. So I hope that it fits
my needs best.
Recall the graphical syntax of UML class diagrams. Classes are
represented as boxes and all kinds of relations are represented as arcs
(with arrows) between them. Then the attributes and operations of the
classes follow a concrete textual syntax. For example:

+doFoo(String):Int

And everybody knows that the method's name is 'doFoo', being public,
having a parameter of type 'String' and a return value of type 'Int'. In
statemachines it is similar, e.g., with the conditions for the
transitions. So in those cases you have a graphical syntax and another
textual syntax combined internally. I'm wondering if it is possible with
Xtext to realise such functionality. I thought that I stumbled one day
in the web about a blog entry describing something like that, but I
couldn't find it anymore. Maybe one of you guys can help me where to
find it?

best regards,
Gilbert
Re: Combining graphical syntax with textual internal syntax [message #557386 is a reply to message #557378] Tue, 07 September 2010 09:02 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

see the Xtext documentation on the integration with GMF editors. There are also few threads in this forum on this topic. If you narrow down your web search also using "Jan Koehnlein" as keyword (or have a look at his blog), you might have more luck finding the entry again.

Alex
Re: Combining graphical syntax with textual internal syntax [message #557671 is a reply to message #557386] Wed, 08 September 2010 13:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

Hi Alex,
I don't think that this part of the documentation is what I'm searching
for. This documentation aims at "To illustrate how to build a GMF on top
of an XtextResource". That wasn't my initial question. I don't want a
GMF editor which is synchronized with a textual editor from Xtext. I
want a GMF editor in which I can edit, e.g., labels in a defined textual
syntax (like attributes from UML class diagrams) which is integrated in
the diagram. The reason is to save canvas space. If I could model some
concepts of a model in a textual manner within the canvas of the GMF
diagram it would be very cool. The fine difference between your
suggestion and my requirement is that I don't need two different
representations (textual and graphical) of the same model but the
textual notation integrated into the graphical notation.

best regards,
Gilbert

Alexander Nittka wrote:
> Hi,
>
> see the Xtext documentation on the integration with GMF editors. There
> are also few threads in this forum on this topic. If you narrow down
> your web search also using "Jan Koehnlein" as keyword (or have a look at
> his blog), you might have more luck finding the entry again.
>
> Alex
Re: Combining graphical syntax with textual internal syntax [message #557835 is a reply to message #557671] Thu, 09 September 2010 07:14 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

I believe this has been done by Sebastian or Jan. Check their blogs for corresponding posts. The most relevant thread I could find (quickly) in the forum is the following: http://www.eclipse.org/forums/index.php?t=msg&th=174255& amp;start=0&S=8fc8887032401991392f97b6b67a2698

Alex
Re: Combining graphical syntax with textual internal syntax [message #558162 is a reply to message #557671] Fri, 10 September 2010 11:22 Go to previous messageGo to next message
Moritz Eysholdt is currently offline Moritz EysholdtFriend
Messages: 161
Registered: July 2009
Location: Kiel, Germany
Senior Member
Hi Gilbert,

> I don't think that this part of the documentation is what I'm searching
> for. This documentation aims at "To illustrate how to build a GMF on top
> of an XtextResource". That wasn't my initial question. I don't want a
> GMF editor which is synchronized with a textual editor from Xtext. I
> want a GMF editor in which I can edit, e.g., labels in a defined textual
> syntax (like attributes from UML class diagrams) which is integrated in
> the diagram.

Please look at the GMF-Xtext-Example that ships with Xtext. You can find
it at Eclipse->New->Examples->Xtext Examples.

Besides putting a GMF-Editor on top of an Xtext Resource, the example
embeds an Xtext editor into GMF; For example, to edit properties. To my
understanding this is exactly what you are asking for.

There is also a presentation about it:
http://www.slideshare.net/meysholdt/converging-textual-and-g raphical-editors

As Alex said, the integration has originally been done by Jan Koehnlein.

cheers,
Moritz


> The reason is to save canvas space. If I could model some
> concepts of a model in a textual manner within the canvas of the GMF
> diagram it would be very cool. The fine difference between your
> suggestion and my requirement is that I don't need two different
> representations (textual and graphical) of the same model but the
> textual notation integrated into the graphical notation.
>
> best regards,
> Gilbert
>
> Alexander Nittka wrote:
>> Hi,
>>
>> see the Xtext documentation on the integration with GMF editors. There
>> are also few threads in this forum on this topic. If you narrow down
>> your web search also using "Jan Koehnlein" as keyword (or have a look at
>> his blog), you might have more luck finding the entry again.
>>
>> Alex


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Combining graphical syntax with textual internal syntax [message #558212 is a reply to message #558162] Fri, 10 September 2010 14:22 Go to previous message
Jan Reimann is currently offline Jan ReimannFriend
Messages: 140
Registered: July 2009
Senior Member
Hi Moritz,
thanks for the hint. I thought that in this example a GMF editor is only
put on top of an Xtext Resource and not this nice editor for editing
properties. This is what I'm searching. But is there a possibility to
present the properties in the GMF editor with a defined syntax after
editing them with the popup Xtext editor? Maybe that's a GMF question
and not an XText question.

best regards,
Gilbert


Moritz Eysholdt wrote:
> Hi Gilbert,
>
>> I don't think that this part of the documentation is what I'm searching
>> for. This documentation aims at "To illustrate how to build a GMF on top
>> of an XtextResource". That wasn't my initial question. I don't want a
>> GMF editor which is synchronized with a textual editor from Xtext. I
>> want a GMF editor in which I can edit, e.g., labels in a defined textual
>> syntax (like attributes from UML class diagrams) which is integrated in
>> the diagram.
>
> Please look at the GMF-Xtext-Example that ships with Xtext. You can find
> it at Eclipse->New->Examples->Xtext Examples.
>
> Besides putting a GMF-Editor on top of an Xtext Resource, the example
> embeds an Xtext editor into GMF; For example, to edit properties. To my
> understanding this is exactly what you are asking for.
>
> There is also a presentation about it:
> http://www.slideshare.net/meysholdt/converging-textual-and-g raphical-editors
>
>
> As Alex said, the integration has originally been done by Jan Koehnlein.
>
> cheers,
> Moritz
>
>
>> The reason is to save canvas space. If I could model some
>> concepts of a model in a textual manner within the canvas of the GMF
>> diagram it would be very cool. The fine difference between your
>> suggestion and my requirement is that I don't need two different
>> representations (textual and graphical) of the same model but the
>> textual notation integrated into the graphical notation.
>>
>> best regards,
>> Gilbert
>>
>> Alexander Nittka wrote:
>>> Hi,
>>>
>>> see the Xtext documentation on the integration with GMF editors. There
>>> are also few threads in this forum on this topic. If you narrow down
>>> your web search also using "Jan Koehnlein" as keyword (or have a look at
>>> his blog), you might have more luck finding the entry again.
>>>
>>> Alex
>
>
Previous Topic:Open File from archive
Next Topic:Where to do type checking?
Goto Forum:
  


Current Time: Tue Apr 23 12:28:59 GMT 2024

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

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

Back to the top