But I couldn't to cast to "Obiekt" becasue class Obiekt was defined in
org.topcased.dodokum and my code I put in another one org.topcased.sample.
And I don't know what am I doing ? create interface ? move project
org.topcased.sample to org.topcased.dodokum ? import something ?
Thx,
Jurek
On Pt Sierpnia 29 2008, 3:36 pm, SĂŠbastien GABEL wrote:
> 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.to
>> String()),
>> 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
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users