|
Re: [EMF Compare] EMFdiff file display [message #504718 is a reply to message #504370] |
Tue, 22 December 2009 10:31 |
|
This is a multi-part message in MIME format.
--------------020108080603020208030004
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi Randi,
Please set "[EMF Compare]" in the subject line for ease of reading ^^.
As for your question ... I do not really understand. Displaying the
emfdiff file in the compare editor is a matter of double clicking it
with EMF Compare installed, what is blocking you?
The metamodels used to construct these files are both the match.ecore
and diff.ecore models of EMF Compare.
Laurent Goubet
Obeo
Randi wrote:
> Hello,
>
>
> I want to make an application that can view an emfdiff file in a
> treestructure. Is there an xsd file from this emfdiff file or what is
> the best way to to this?Or can someone give some more information how
> this file is constructed?
>
> Thanks,
> Randi
--------------020108080603020208030004
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------020108080603020208030004--
|
|
|
|
Re: [EMF Compare] EMFdiff file display [message #504744 is a reply to message #504726] |
Tue, 22 December 2009 07:04 |
|
This is a multi-part message in MIME format.
--------------070900090207050604070201
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Randi,
Both EMF Compare and EMF are developped to be usable in a standalone
application. You can simply load the emfdiff file via the EMF facilities
once both the match and diff packages are registered in the package
registry.
Something along the lines of
ResourceSet rs = new ResourceSetImpl();
rs.getPackageRegistry().put(DiffPackage.eNS_URI, DiffPackage.eINSTANCE);
rs.getPackageRegistry().put(MatchPackage.eNS_URI, MatchPackage.eINSTANCE);
rs.getResource(<modelURI>, true);
should do the trick.
If you want to code your own parser, I can't really help on how to do
it. All I know is : if you need a DTD, as I understand it the DTD is
simply xmi, with the namespaces being the ecore, diff and match metamodels :
org.eclipse.emf.ecore/model/Ecore.ecore
org.eclipse.emf.compare.diff/model/diff.ecore
org.eclipse.emf.compare.match/model/match.ecore
Laurent Goubet
Obeo
Randi wrote:
> Hello Laurent,
>
> Well I made a standalone version for the EMFCompare where I safe a
> resultdiff file as result.xmi (I compare 2 umlmodels in xmi format) .
> Now I want to parse this diff file so I can put in a GUI as a treeview
> so all deleted nodes for eg as children from the node Deleted. Almost
> the same like in Eclipse , but as a standalone version. So I want to
> show the difference between the 2 models in a GUI I want to have
> standalone. Is there some DTD available or so from the difffile or wat
> is the best way to show a treeview of the diff file.
>
> Many thanks
>
> Randi
--------------070900090207050604070201
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------070900090207050604070201--
|
|
|
|
Re: [EMF Compare] EMFdiff file display [message #621951 is a reply to message #504726] |
Tue, 22 December 2009 12:02 |
|
This is a multi-part message in MIME format.
--------------070900090207050604070201
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Randi,
Both EMF Compare and EMF are developped to be usable in a standalone
application. You can simply load the emfdiff file via the EMF facilities
once both the match and diff packages are registered in the package
registry.
Something along the lines of
ResourceSet rs = new ResourceSetImpl();
rs.getPackageRegistry().put(DiffPackage.eNS_URI, DiffPackage.eINSTANCE);
rs.getPackageRegistry().put(MatchPackage.eNS_URI, MatchPackage.eINSTANCE);
rs.getResource(<modelURI>, true);
should do the trick.
If you want to code your own parser, I can't really help on how to do
it. All I know is : if you need a DTD, as I understand it the DTD is
simply xmi, with the namespaces being the ecore, diff and match metamodels :
org.eclipse.emf.ecore/model/Ecore.ecore
org.eclipse.emf.compare.diff/model/diff.ecore
org.eclipse.emf.compare.match/model/match.ecore
Laurent Goubet
Obeo
Randi wrote:
> Hello Laurent,
>
> Well I made a standalone version for the EMFCompare where I safe a
> resultdiff file as result.xmi (I compare 2 umlmodels in xmi format) .
> Now I want to parse this diff file so I can put in a GUI as a treeview
> so all deleted nodes for eg as children from the node Deleted. Almost
> the same like in Eclipse , but as a standalone version. So I want to
> show the difference between the 2 models in a GUI I want to have
> standalone. Is there some DTD available or so from the difffile or wat
> is the best way to show a treeview of the diff file.
>
> Many thanks
>
> Randi
--------------070900090207050604070201
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------070900090207050604070201--
|
|
|
Powered by
FUDForum. Page generated in 0.03601 seconds