Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » generalization
generalization [message #49498] Sun, 17 September 2006 22:28 Go to next message
Eugene   is currently offline Eugene Friend
Messages: 26
Registered: July 2009
Junior Member
Hi.
Having created simple gmf editor for UML.ecore i've got trouble
setting generalizations. For two classes A and B where A extends B my
editor generates following uml2 file

<?xml version="1.0" encoding="UTF-8"?>
<uml:Package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML">
<packagedElement xsi:type="uml:Class" name="A">
<generalization general="#//B"/>
</packagedElement>
<packagedElement xsi:type="uml:Class" name="B"/>
</uml:Package>

And then UML Model editor fails to open it with this exception:

org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference '//B'. (platform:/resource/test1/test1.uml, 4, 37)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1001)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1066)

From the perspective of my editor this looks like generalization is lost
when diagram is being closed/opened.

Domain meta information properties of the corresponding Link mapping in my
gmfmap file are:

Containment feauture: EReference generalization
Element: EClass Generalization
Source Feature: not set
Target Feature: EReference general

Any help is highly appreciated as well as some explanation of what all
those Source/Target Features and their values
(general/source/target/specific, etc.) are.


wbr, eugen.
Re: generalization [message #49826 is a reply to message #49498] Mon, 18 September 2006 12:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: khussey.ca.ibm.com

Eugen,

I looks like your editor is using the wrong resource implementation to
serialize your model - the resource implemenation in UML2 makes use of
UUIDs, but it appears that your resource does not.

Kenn

"
Re: generalization [message #50374 is a reply to message #49826] Mon, 18 September 2006 21:08 Go to previous messageGo to next message
Eugene   is currently offline Eugene Friend
Messages: 26
Registered: July 2009
Junior Member
Thank you for your answers. But i still can't find 'Invariant
Prefix' property anywhere to get sources generated properly... could you
please give some more hints where to look for it?

wbr,eugen.


В письме Mon, 18 Sep 2006 08:13:49 -0400, Kenn Hussey
написал:

> Eugen,
>
> I looks like your editor is using the wrong resource implementation to
> serialize your model - the resource implemenation in UML2 makes use of
> UUIDs, but it appears that your resource does not.
>
> Kenn
>
> "Бушуев" <jnbu@yahoo.com> wrote in message
> news:pan.2006.09.17.22.28.04.201811@yahoo.com...
>> Hi.
>> Having created simple gmf editor for UML.ecore i've got trouble
>> setting generalizations. For two classes A and B where A extends B my
>> editor generates following uml2 file
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <uml:Package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML">
>> <packagedElement xsi:type="uml:Class" name="A">
>> <generalization general="#//B"/>
>> </packagedElement>
>> <packagedElement xsi:type="uml:Class" name="B"/>
>> </uml:Package>
>>
>> And then UML Model editor fails to open it with this exception:
>>
>> org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved
>> reference '//B'. (platform:/resource/test1/test1.uml, 4, 37)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1001)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1066)
>>
>> From the perspective of my editor this looks like generalization is lost
>> when diagram is being closed/opened.
>>
>> Domain meta information properties of the corresponding Link mapping in my
>> gmfmap file are:
>>
>> Containment feauture: EReference generalization
>> Element: EClass Generalization
>> Source Feature: not set
>> Target Feature: EReference general
>>
>> Any help is highly appreciated as well as some explanation of what all
>> those Source/Target Features and their values
>> (general/source/target/specific, etc.) are.
>>
>>
>> wbr, eugen.
Re: generalization [message #50876 is a reply to message #50374] Tue, 19 September 2006 11:56 Go to previous message
Eclipse UserFriend
Originally posted by: khussey.ca.ibm.com

Eugen,

The 'Invariant Prefix' generator model property will only be available for
UML2 generator models, i.e. models for which you have taken advantage of
some of the UML2-specific options when importing your UML model. One way to
ensure this it to press the 'Process All' button in the importer.

Once you have a UML2 generator model, the property will show up in the
Properties view when you have the generator model (root) element selected.

Kenn

"
Previous Topic:Error during Code generation: "A resource exists with a different case"
Next Topic:gmf-v-gef
Goto Forum:
  


Current Time: Fri Dec 27 02:47:56 GMT 2024

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

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

Back to the top