API to compose the figures in GMF? [message #69535] |
Wed, 25 October 2006 14:03  |
Eclipse User |
|
|
|
Originally posted by: agathay.yahoo.com
From my understanding, GMF can generate an editor from EMF model. I have two
questions, would be grateful if anyone can shine some lights.
1. Is there API that I can compose the relation in a graph beforehand if I
already how the components are connected, and ask GMF to take that input and
draw it out?
2. After GMF generated the editor and user composes the graph, in what
format can the graph has saved? From GEF shape example, it is saved in
binary form. Can it be saved in XML format possible? Is there any example
for this?
Thanks,
Agatha
|
|
|
|
Re: API to compose the figures in GMF? [message #70492 is a reply to message #69831] |
Thu, 26 October 2006 20:53   |
Eclipse User |
|
|
|
Originally posted by: agathay.yahoo.com
Hi Alex,
When I access the Callisto Webinar, it seems the dialog is saved as mmd file
which looks to be a binary file.. Are you sure it is saved as XMI format?
For Q #1, does it means I should compose GMF input in XMI format on the fly?
I am unsure what you mean by writing custom code to ensure it is compatible
with gmf.runtime.notation and draw in optimal position. Are you suggesting a
program or an XMI file?
I though it is similiar to generate ecore_diagram from ecore.. So Eclipse
can provide API on how to compose the GMF input. Are there schema or DTD
file that I should follow when compose the XMI file?
BTW, I hit an error in the mindmap example, I have started another thread on
that.
Thanks!!
"Alex Shatalin" <vano@borland.com> wrote in message
news:cd695fb31257c8c8c70ee7694581@news.eclipse.org...
> Hello Agatha,
>
>> 1. Is there API that I can compose the relation in a graph beforehand
>> if I already how the components are connected, and ask GMF to take
>> that input and draw it out?
> AFAIU you are talking either about layouting the diagram or composing
> non-synchronized diagram contents. Both cases are available. In both cases
> you have to write some custom code. API you are talking about is
> EMF-compatible notation model (org.eclipse.gmf.runtime.notation.* or
> org.eclipse.gmf.runtime.notation/model/notation.ecore). You can change the
> diagram contents and positions/other properties of diagram nodes/links by
> calling this API. To create new diagram node/link it's better to call
> ViewService.createNode/createEdge/createDiagram
>
>> 2. After GMF generated the editor and user composes the graph, in what
>> format can the graph has saved? From GEF shape example, it is saved in
>> binary form. Can it be saved in XML format possible? Is there any
>> example for this?
> Just play with any of GMF tutorials:
> http://wiki.eclipse.org/index.php/Graphical_Modeling_Framewo rk#Tutorials.
> Diagram contents will be saved into the XMI file produced by EMF. You can
> load this file (using EMF API) and easily access Notation model instances.
>
> -----------------
> Alex Shatalin
>
>
|
|
|
|
|
Re: API to compose the figures in GMF? [message #71182 is a reply to message #71084] |
Fri, 27 October 2006 18:54   |
Eclipse User |
|
|
|
Originally posted by: agathay.yahoo.com
Hi Alex,
I finally get mindmap to work, and yep it is saved as *.mindmap_diagram so
you are right that it is in XMI format.
So, now I only leave you with question #2...
>You do not need schema. There is an open API in GMF ang you can create
>corresponging XMI file just by using java + standard serialization to the
>XMI.
Which API, can you elaborate? Would be helpful if you can give an example..
Many Thanks!
"Agatha" <agathay@yahoo.com> wrote in message
news:ehtloe$shq$1@utils.eclipse.org...
> Hi Alex,
>
> The Callisto Webinar I refer to is
> http://adobedev.adobe.acrobat.com/p17835008/ which is at the bottom of GMF
> tutorial. The dialog is saved as mmd file which seems to be a binary
> file..
>
>> You do not need schema. There is an open API in GMF ang you can create
>> corresponging XMI file just by using java + standard serialization to the
>> XMI.
> Which API, can you elaborate? Would be helpful if you give an example..
>
> Thanks!
> Agatha
>
>
> "Alex Shatalin" <vano@borland.com> wrote in message
> news:ehsjd2$oll$1@utils.eclipse.org...
>> Hello Agatha,
>>
>>> When I access the Callisto Webinar, it seems the dialog is saved as
>>> mmd file which looks to be a binary file.. Are you sure it is saved as
>>> XMI format?
>> AFAIK get from the web
>> (http://birtworld.blogspot.com/2006/05/callisto-webinar.html) Callisto
>> Webinar was mostly about BIRT, DTP, RCP. We are working in GMF project...
>> No way to design dialogs in GMF.
>>
>>> For Q #1, does it means I should compose GMF input in XMI format on
>>> the fly?
>>> I am unsure what you mean by writing custom code to ensure it is
>>> compatible
>>> with gmf.runtime.notation and draw in optimal position. Are you
>>> suggesting a
>>> program or an XMI file?
>> I'm suggesting to write a code in java (simple action, similar to the
>> generated one for doiagram initialization).
>>
>>> I though it is similiar to generate ecore_diagram from ecore.. So
>>> Eclipse can provide API on how to compose the GMF input. Are there
>>> schema
>> or
>>> DTD file that I should follow when compose the XMI file?
>> You do not need schema. There is an open API in GMF ang you can create
>> corresponging XMI file just by using java + standard serialization to the
>> XMI.
>>
>> -----------------
>> Alex Shatalin
>>
>>
>
>
|
|
|
Re: API to compose the figures in GMF? [message #71241 is a reply to message #71182] |
Sat, 28 October 2006 13:15  |
Eclipse User |
|
|
|
Hello Agatha,
> Which API, can you elaborate? Would be helpful if you can give an
> example..
If we are talking about diagram information (position/size of the nodes,
links bending points, colors, ..) this information is available in Notation
model: org.eclipse.gmf.runtime.notation plugin, package with the same name.
Take a look on View, Node, Diagram, Edge interfaces in this package.
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.09054 seconds