Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [uml2-dev] Extending UML2


Martin,

Please direct future questions like this to the newsgroup, as this mailing list is reserved for UML2 development issues.

The "discouraged reference" compiler warnings (which can be disabled) are coming from the fact that the UML2 implementation classes are marked internal, and aren't really meant to be extended.

To address the errors, you'd need to use the custom code generator provided in UML2 1.1 (there are a number of conventions in UML 2.0 that EMF doesn't handle very well by default). Note however, that only Rose (via the org.eclipse.uml2.importer.rose plug-in that can be obtained from CVS) and UML2 models are currently supported as source formats for the UML2 code generator, so you'll have to model your extension rather than just expressing it in Java.

Cheers,

Kenn Hussey

Eclipse UML2 Project Lead
Rational Software, IBM Software Group

770 Palladium Drive
Kanata, Ontario, K2V 1C8

T: (613) 599-3980  F: (613) 599-3912



Martin Blech <mblech@xxxxxxxxxxxxxxxxx>
Sent by: uml2-dev-bounces@xxxxxxxxxxx

08/30/2005 05:41 PM

Please respond to
Martin Blech and "This mailing list is used to discuss the development issues for the  UML2 project. "

To
<uml2-dev@xxxxxxxxxxx>
cc
Subject
[uml2-dev] Extending UML2





This is my first message to this mailing list, so perhaps this has been answered before. My apologies if that\'s the case.
I\'m trying to implement a UML2-like component diagram editor using GEF and org.eclipse.uml2. I say uml-like because it would include some non-uml features, more exactly the concept of responsibilities associated to components. Exploring the metamodel, I found BehavioralFeature could be a good place for Responsibility to extend from.
To extend BehavioralFeature, I did the following:
1. Associated my project to the imported (with source) uml2 project
2. Added uml2 as a dependency to plugin.xml
3. Created the following interface:
/**
* @model
*/
public interface Responsibility extends BehavioralFeature {
}
4. Imported the annotated interfaces to create an ecore model and a generator model
5. Generated the model code

Now, the whole process doesn\'t produce any error messages, but the generated code has many \"discouraged reference\" warnings and compilation errors for undefined references in the generated code. For instance, eInverseAdd() has references to an \"owner\" field and a \"basicSetOwner()\" method that are not defined anywhere. It\'s obvious that I didn\'t get something right, but I\'m having a hard time trying to figure out what it is exactly. Any ideas/suggestions on how to extend the uml2 metamodel for my purposes?
Thanks in advance,

Martin Blech

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


Back to the top