[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.mdt.uml2.uml] Re: Problem saving model with stereotypes

Richard,

Right, these are the steretype applications (dynamic Ecore is used to 
implement them)...

Kenn

"Richard Craddock" <richard.craddock@xxxxxxxxxxxxxxxxxxxxxxx> wrote in 
message news:10acb5792af5e5f044e0a2cac36f45ba$1@xxxxxxxxxxxxxxxxxx
> Kenn,
>
> This didn't quite do the trick I'm afraid...
>
> I updated your method to see what was being returned :
>
> for (Iterator allContents = UMLUtil.getAllContents(packageToSave, true,
> false); allContents.hasNext();) {
>
>   EObject eObject = (EObject) allContents.next();
>
>    if (eObject instanceof Element) {
> if (((Element) eObject).getStereotypeApplications().size() >0 ){
>      EList list = ((Element) eObject).getStereotypeApplications();
>             for (Object o : list){
> System.out.println ("Appln = "+o.getClass().getName());
>      }
> }
>        contents.addAll(((Element) eObject).getStereotypeApplications());
> }
> }
>
> In my log I can see this kind of thing :
> Appln = org.eclipse.emf.ecore.impl.DynamicEObjectImpl
> Appln = org.eclipse.emf.ecore.impl.DynamicEObjectImpl
> Appln = org.eclipse.emf.ecore.impl.DynamicEObjectImpl
> Appln = org.eclipse.emf.ecore.impl.DynamicEObjectImpl
>
> But still no stereotypes in the actual file...
>
> Thanks in advance for any more suggestions,
>
> Richard
>
>
>