Hi
It's more a pure EMF question but I guess it must be something like :
.........
if (object instanceof Obiekt)
{
String myValue = ((Obiekt) object).getValue();
}
.......
I confirm you that using substring() method on EObject is not excellent ;-)
Regards
Sebastien
J.Niepostyn a écrit :
> Hello,
> from within topcased modeler I'd like to get some values from my own model.
> My model:
> - Dodokum Diagram (Property: Nazwa, Value:Obsluga)
> Obiekt (Property: Nazwa, Value:Pismo)
> + Aktor (Property: Nazwa, Value:Urzednik)
> My code:
> ResourceSet resourceSet = new ResourceSetImpl();
> Resource resource =
> resourceSet.getResource(URI.createPlatformResourceURI(selectedElement.toString()),
> true); //get model: test1.dodokum
> //contents
> TreeIterator<EObject> iterator = resource.getAllContents();
> while (iterator.hasNext()){
> EObject object = iterator.next();
> //how to get Value "Pismo" from object "Obiekt" ?
> }
> I used to substring() method for object.toString(), but this is not
> excellent ?
> Thx,
> Jurek.
>
>
> _______________________________________________
> Topcased-users mailing list
> [email protected]
> http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users
>
>
>
--
Sébastien GABEL
Software Engineer
Conseil & Services Midi-Pyrénées
Communication & Systèmes
+33 (0)5.61.39.46.16
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users