Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » (no subject)
(no subject) [message #687324] Mon, 30 May 2011 14:30 Go to next message
Eclipse UserFriend
Originally posted by: <forums-noreply

Hello everyone,
I began to work on an EMF project just few days ago, and I encounter some problems.

Here is my situation: I have a simple input file example.model conforms to a MetaModel:

<?xml version="1.0" encoding="ASCII"?>
<CollegeMMDiff:DifferenceModel xmi:version="2.0" xmlns:xmi=".../XMI" xmlns:xsi=".../XMLSchema-instance" xmlns:CollegeMMDiff=".../org.openembedd.CollegeMMDiff" xmi:id="_nBd54IemEeCwk8SZVLPN7A">
<differenceElements xsi:type="CollegeMMDiff:ChangedCollege" xmi:id="_ojXxgIemEeCwk8SZVLPN7A">
<classrooms xsi:type="CollegeMMDiff:ChangedClassRoom" xmi:id="_q5IH8IemEeCwk8SZVLPN7A" location="U2-036" updatedElement="_r04lkIemEeCwk8SZVLPN7A"/>
<lessons xsi:type="CollegeMMDiff:ChangedLesson" xmi:id="_zE6doIemEeCwk8SZVLPN7A" classroom="_q5IH8IemEeCwk8SZVLPN7A"/>
</differenceElements>
<differenceElements xsi:type="CollegeMMDiff:College" xmi:id="_pTDiAIemEeCwk8SZVLPN7A">
<classrooms xmi:id="_r04lkIemEeCwk8SZVLPN7A" location="U2-039"/>
<lessons xmi:id="_zwkpwIemEeCwk8SZVLPN7A" students="_yEilwIemEeCwk8SZVLPN7A" classroom="_r04lkIemEeCwk8SZVLPN7A"/>
</differenceElements>
<differenceElements xsi:type="CollegeMMDiff:DeletedMatter" xmi:id="_wKWJ8IemEeCwk8SZVLPN7A" title="Math"/>
<differenceElements xsi:type="CollegeMMDiff:AddedMatter" xmi:id="_xIMSQIemEeCwk8SZVLPN7A" title="Italian"/>
<differenceElements xsi:type="CollegeMMDiff:AddedStudent" xmi:id="_yEilwIemEeCwk8SZVLPN7A" name="John"/>
</CollegeMMDiff:DifferenceModel>

And I want to display this model in a tree structure (in an Eclipse view previously created).
But I really don't know how to proceed, what I have to use (EMF API?)...

Does someone could enlighten me on this?

Thank you very much!
(no subject) [message #687325 is a reply to message #687324] Mon, 30 May 2011 14:35 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi ?

Interactively, Open With Sample Reflective Ecore Editor.

Programmatically, reuse the TreeViewer code from the Same Ecore Editor.

Regards

Ed Willink

On 30/05/2011 15:30, forums-noreply@eclipse.org wrote:
> Hello everyone,
> I began to work on an EMF project just few days ago, and I encounter
> some problems.
>
> Here is my situation: I have a simple input file example.model
> conforms to a MetaModel:
>
> <?xml version="1.0" encoding="ASCII"?>
> <CollegeMMDiff:DifferenceModel xmi:version="2.0" xmlns:xmi=".../XMI"
> xmlns:xsi=".../XMLSchema-instance"
> xmlns:CollegeMMDiff=".../org.openembedd.CollegeMMDiff"
> xmi:id="_nBd54IemEeCwk8SZVLPN7A">
> <differenceElements xsi:type="CollegeMMDiff:ChangedCollege"
> xmi:id="_ojXxgIemEeCwk8SZVLPN7A">
> <classrooms xsi:type="CollegeMMDiff:ChangedClassRoom"
> xmi:id="_q5IH8IemEeCwk8SZVLPN7A" location="U2-036"
> updatedElement="_r04lkIemEeCwk8SZVLPN7A"/>
> <lessons xsi:type="CollegeMMDiff:ChangedLesson"
> xmi:id="_zE6doIemEeCwk8SZVLPN7A" classroom="_q5IH8IemEeCwk8SZVLPN7A"/>
> </differenceElements>
> <differenceElements xsi:type="CollegeMMDiff:College"
> xmi:id="_pTDiAIemEeCwk8SZVLPN7A">
> <classrooms xmi:id="_r04lkIemEeCwk8SZVLPN7A" location="U2-039"/>
> <lessons xmi:id="_zwkpwIemEeCwk8SZVLPN7A"
> students="_yEilwIemEeCwk8SZVLPN7A" classroom="_r04lkIemEeCwk8SZVLPN7A"/>
> </differenceElements>
> <differenceElements xsi:type="CollegeMMDiff:DeletedMatter"
> xmi:id="_wKWJ8IemEeCwk8SZVLPN7A" title="Math"/>
> <differenceElements xsi:type="CollegeMMDiff:AddedMatter"
> xmi:id="_xIMSQIemEeCwk8SZVLPN7A" title="Italian"/>
> <differenceElements xsi:type="CollegeMMDiff:AddedStudent"
> xmi:id="_yEilwIemEeCwk8SZVLPN7A" name="John"/>
> </CollegeMMDiff:DifferenceModel>
>
> And I want to display this model in a tree structure (in an Eclipse
> view previously created).
> But I really don't know how to proceed, what I have to use (EMF API?)...
>
> Does someone could enlighten me on this?
>
> Thank you very much!
>
Previous Topic:(no subject)
Next Topic:Delegates for creating instances of data types
Goto Forum:
  


Current Time: Thu Apr 25 14:09:53 GMT 2024

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

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

Back to the top