Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] API to Generate XMl


Hi Janak,

It's not an official API but you can get access to it the same way the org.eclipse.ve.internal.java.codegen.editorpart.XMLViewPart gets it. Though the more official way to get the editdomain is to replace:

                if (part instanceof JavaVisualEditorPart) {
                        EditDomain domain = ((JavaVisualEditorPart) part).getEditDomain();

with

        org.eclipse.gef.EditDomain gefDomain = (org.eclipse.gef.EditDomain) part.getAdapter(org.eclipse.gef.EditDomain.class);
        if (domain instanceof EditDomain) {
                EditDomain domain = (EditDomain) getDomain;

where EditDomain is org.eclipse.ve.internal.cde.core.EditDomain.


Rich


"Janak Mulani" <janak.mulani@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

06/14/2006 12:30 AM

Please respond to
Discussions people developing code for the Visual Editor project <ve-dev@xxxxxxxxxxx>

To
"Discussions people developing code for the Visual Editor project" <ve-dev@xxxxxxxxxxx>
cc
Subject
RE: [ve-dev] API to Generate XMl





Hi Rich,
 
I don't mean "XML instead of Java", I mean " XML in addition to Java" ,.
 
VE should work as it works right now - i.e. it should construct the model by parsing Java code. However, if I can access and walk the EMF model i.e. I guess is the same model behind the XML viewer, then it can be easily translated to an XML dialect of choice.
 
So the question is through which API the XML viewer is accessing the EMF model? Is this API public?
 
Thanks and regards,
 
Janak
-----Original Message-----
From:
ve-dev-bounces@xxxxxxxxxxx [mailto:ve-dev-bounces@xxxxxxxxxxx]On Behalf Of Rich Kulp
Sent:
Wednesday, June 14, 2006 12:24 AM
To:
Discussions people developing code for the Visual Editor project
Subject:
Re: [ve-dev] API to Generate XMl


Hi Janak,


No we don't have that. It would have to be a new editor part. One that gets its model from the EMF XMI file instead of parsing from java code. We've always wanted to do that but we've never had time to get around to doing it. The current JavaVisualEditorPart is almost there but we would have to rip parts of it out because it no longer would be a java code editor. We would have to rip out the codegen with all of the decoders and such too.


Sorry,

Rich


"Janak Mulani" <janak.mulani@xxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

06/12/2006 03:17 PM

Please respond to
Discussions people developing code for the Visual Editor project <ve-dev@xxxxxxxxxxx>


To
"ve-Dev@Eclipse. Org" <ve-dev@xxxxxxxxxxx>
cc
Subject
[ve-dev] API to Generate XMl







Hi,

Right now VE generates Java. How can I make it generate XML?

I can see the component hierarchy and the properties in the XML view. I.e.
the EMF model is visible in the XMLView.

Is there an API available to the XML view? How can access it,  parse it and
generate my own XML?

Or

Is there an API to walk the EMF model and generate XML? Lets say, I want to
have buttons in VE like:

"Generate XML" - that will walk the EMF model and generate XML to a file.
"Execute XML" - walk the EMF model, generate XML and execute it

Thanks and regards,

Janak

_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev

_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top