[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.emf] Re: splitting a model into several packages, using EclipseUML or Model editor
|
- From: julien@xxxxxxxxxx (julien)
- Date: Sun, 11 Jan 2004 02:56:38 +0000 (UTC)
- Newsgroups: eclipse.tools.emf
- Organization: http://news.eclipse.org
- User-agent: NewsPortal/0.25 (http://florian-amrhein.de/newsportal/)
Hi Frank,
Sorry to jump on this thread so late.
You are right that EclipseUML does support the import model from other
resources under one condition: the ecore files must locate in the project
or referenced projects. The user need to right click on the background of
diagram and select the
julien
omondo
Frank Budinsky wrote:
> Greg,
> If you want to open a bugzilla feature request to make the Ecore Model Editor
> allow one to directly specify an object in a different resource, we should be
> able to do it relatively soon.
> I may be mistaken, but I thought that EclipseUML already had support for
this.
> Maybe someone else knows for sure?
> Thanks for pointing out that this has been a road block to your understanding
> EMF.
> Frank.
> Gregory Davis wrote:
> > Ed,
> >
> > Thanks for the help. I used a modified approach to access a supertype; it
> > works with both EclipseUML and the Sample Ecore Model Editor. I agree that
> > a mechanism for establishing a reference to a different resource would be
> > useful. The lack of such a mechanism has been the root of many of my
> > difficulties learning and using EMF.
> >
> > - Greg
> >
> > The procedure below is a way to reference a supertype in an ecore model of
> > another project. In this example, the model is "myproject.ecore", and the
> > other model is in the project "myproject.asubpackage" in the resource
> > "model/asubpackage.ecore".
> >
> > 1. Within the model editor for myproject.ecore, select the class for which
> > you wish to declare a supertype (NeedSuperClass in this example).
> >
> > 2. Using the Property View, select the value entry for the ESuperType
> > property, and open the selection edit window.
> >
> > 3. The edit window will show a list of classes to create a superclass list.
> > The choices consist of the built-in EClasses, and any classes which you
have
> > already defined in your model. Select one of these classes (AvatarClass in
> > this example), and click the Add button, and OK to use this class as a
> > temporary supertype.
> >
> > 4. Close the model editor.
> >
> > 5. Open the model with the text editor, and locate the element beginning
> > with:
> > <eClassifiers xsi:type="ecore:EClass" name="NeedSuperClass"
> >
> > 6. Replace the text within this element from:
> > eSuperTypes="#//AvatarClass"
> > or:
> > eSuperTypes="http://www.eclipse.org/emf/2002/Ecore#//AvatarClass"
> > to:
> >
> >
eSuperTypes="platform:/resource/myproject.asubpackage/model/asubpackage.ecor
> > e#//ActualSuperClass"
> >
> > 7. Close the text editor.
> >
> > 8. Reopen the model with the model editor if you wish to add superclasses
> > from the external resource to any other classes in this model. The edit
box
> > will now contain all the classes from the external resource.
> >
> > 9. Delete any existing genmodel resource for this model! If you
"Reload..."
> > this model, the safeguard that obscures the Finish button until you satisfy
> > references is non-functional. The external resource references will be
> > mangled if you click Finish without correctly identifying their source.