Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » annotates="//@members.14",how can get?
annotates="//@members.14",how can get? [message #142438] Tue, 30 October 2007 11:20 Go to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

hello, the view.xml following :
<?xml version="1.0" encoding="ASCII" ?>
<diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
visualInfos="//@annotations.18/@visualInfos.0
//@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
//@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
//@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
//@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
//@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
//@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
//@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
//@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
//@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
//@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
//@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
//@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
- <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.14">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition" value="SP01005016"
/>
- <visualInfos diagram="//@diagrams.0">
<keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true" />
</visualInfos>
</annotations>
- <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.3">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition" value="SP01005005"
/>
- <visualInfos diagram="//@diagrams.0">
<keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true" />
</visualInfos>
</annotations>
I hava get the model :lastModel = modelBuilder.getModelRoot(),
but
now i want know the annotates the order ,like SP01005016, members.14,
SP01005005,members.3.
i can get the value,but can not get the annotates ,the code like:

lastModel = modelBuilder.getModelRoot();
EList annotations=lastModel.getAnnotations();
for(int aIndex=0;aIndex<annotations.size();aIndex++){
AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
annotations.get(aIndex);
EMap keyedValue=annImpl.getKeyedValues();
String value=(String)
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
}
how i can annotates ? please help me!
Re: annotates="//@members.14",how can get? [message #142448 is a reply to message #142438] Tue, 30 October 2007 13:23 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
I think BeanUtilities does the trick.

Yves YANG
---
http://www.soyatec.com

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fg742j$ihc$1@build.eclipse.org...
> hello, the view.xml following :
> <?xml version="1.0" encoding="ASCII" ?>
> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
> visualInfos="//@annotations.18/@visualInfos.0
> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.14">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005016" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true"
> />
> </visualInfos>
> </annotations>
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.3">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005005" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true"
> />
> </visualInfos>
> </annotations>
> I hava get the model :lastModel = modelBuilder.getModelRoot(),
> but
> now i want know the annotates the order ,like SP01005016, members.14,
> SP01005005,members.3.
> i can get the value,but can not get the annotates ,the code like:
>
> lastModel = modelBuilder.getModelRoot();
> EList annotations=lastModel.getAnnotations();
> for(int aIndex=0;aIndex<annotations.size();aIndex++){
> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
> annotations.get(aIndex);
> EMap keyedValue=annImpl.getKeyedValues();
> String value=(String)
> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
> }
> how i can annotates ? please help me!
>
Re: annotates="//@members.14",how can get? [message #142456 is a reply to message #142438] Tue, 30 October 2007 13:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

I really don't have a good answer since I don't know VE, but I imagine
you should be casting to AnnotationEMF not AnnotationEMFImpl and I
imagine that AnnotationEMF has a getAnnotates method that will yield
which object is being annotated. I could be wrong, but that's certainly
what the serialization itself leads me to believe...

zxc wrote:
> hello, the view.xml following :
> <?xml version="1.0" encoding="ASCII" ?>
> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
> visualInfos="//@annotations.18/@visualInfos.0
> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.14">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005016" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
> value="true" />
> </visualInfos>
> </annotations>
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.3">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005005" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
> value="true" />
> </visualInfos>
> </annotations>
> I hava get the model :lastModel = modelBuilder.getModelRoot(),
> but
> now i want know the annotates the order ,like SP01005016, members.14,
> SP01005005,members.3.
> i can get the value,but can not get the annotates ,the code like:
>
> lastModel = modelBuilder.getModelRoot();
> EList annotations=lastModel.getAnnotations();
> for(int aIndex=0;aIndex<annotations.size();aIndex++){
> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
> EMap keyedValue=annImpl.getKeyedValues();
> String value=(String)
> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
> }
> how i can annotates ? please help me!
>
Re: annotates="//@members.14",how can get? [message #142465 is a reply to message #142438] Tue, 30 October 2007 13:23 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
I think BeanUtilities does the trick.

Yves YANG
---
http://www.soyatec.com

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fg742j$ihc$1@build.eclipse.org...
> hello, the view.xml following :
> <?xml version="1.0" encoding="ASCII" ?>
> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
> visualInfos="//@annotations.18/@visualInfos.0
> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.14">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005016" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true"
> />
> </visualInfos>
> </annotations>
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.3">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005005" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true"
> />
> </visualInfos>
> </annotations>
> I hava get the model :lastModel = modelBuilder.getModelRoot(),
> but
> now i want know the annotates the order ,like SP01005016, members.14,
> SP01005005,members.3.
> i can get the value,but can not get the annotates ,the code like:
>
> lastModel = modelBuilder.getModelRoot();
> EList annotations=lastModel.getAnnotations();
> for(int aIndex=0;aIndex<annotations.size();aIndex++){
> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
> annotations.get(aIndex);
> EMap keyedValue=annImpl.getKeyedValues();
> String value=(String)
> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
> }
> how i can annotates ? please help me!
>
Re: annotates="//@members.14",how can get? [message #142474 is a reply to message #142456] Wed, 31 October 2007 00:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Ed Merks,
AnnotationEMFImpl has getAnnotates method too,
i can get a JavaObjectInstance, but i don't know its order, like
<annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.3">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="SP01005005" />
why VE can know its order "SP01005005" is members.3
i want to know this annotates's order.

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg7bfa$ro7$1@build.eclipse.org...
>I really don't have a good answer since I don't know VE, but I imagine
> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
> imagine that AnnotationEMF has a getAnnotates method that will yield
> which object is being annotated. I could be wrong, but that's certainly
> what the serialization itself leads me to believe...
>
> zxc wrote:
>> hello, the view.xml following :
>> <?xml version="1.0" encoding="ASCII" ?>
>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>> visualInfos="//@annotations.18/@visualInfos.0
>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>> annotates="//@members.14">
>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>> value="SP01005016" />
>> - <visualInfos diagram="//@diagrams.0">
>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>> value="true" />
>> </visualInfos>
>> </annotations>
>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>> annotates="//@members.3">
>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>> value="SP01005005" />
>> - <visualInfos diagram="//@diagrams.0">
>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>> value="true" />
>> </visualInfos>
>> </annotations>
>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>> but
>> now i want know the annotates the order ,like SP01005016, members.14,
>> SP01005005,members.3.
>> i can get the value,but can not get the annotates ,the code like:
>>
>> lastModel = modelBuilder.getModelRoot();
>> EList annotations=lastModel.getAnnotations();
>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
>> EMap keyedValue=annImpl.getKeyedValues();
>> String value=(String)
>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>> }
>> how i can annotates ? please help me!
>>
>
Re: annotates="//@members.14",how can get? [message #142494 is a reply to message #142474] Wed, 31 October 2007 01:48 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
In the BeanUtilities class, you can read getBeanName() and getBeanName() to
access the Bean's name;

yves yang
---
http://www.soyatec.com

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fg8k20$lmp$1@build.eclipse.org...
> Ed Merks,
> AnnotationEMFImpl has getAnnotates method too,
> i can get a JavaObjectInstance, but i don't know its order, like
> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.3">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005005" />
> why VE can know its order "SP01005005" is members.3
> i want to know this annotates's order.
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fg7bfa$ro7$1@build.eclipse.org...
>>I really don't have a good answer since I don't know VE, but I imagine
>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>> imagine that AnnotationEMF has a getAnnotates method that will yield
>> which object is being annotated. I could be wrong, but that's certainly
>> what the serialization itself leads me to believe...
>>
>> zxc wrote:
>>> hello, the view.xml following :
>>> <?xml version="1.0" encoding="ASCII" ?>
>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>> visualInfos="//@annotations.18/@visualInfos.0
>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>> annotates="//@members.14">
>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>> value="SP01005016" />
>>> - <visualInfos diagram="//@diagrams.0">
>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>> value="true" />
>>> </visualInfos>
>>> </annotations>
>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>> annotates="//@members.3">
>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>> value="SP01005005" />
>>> - <visualInfos diagram="//@diagrams.0">
>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>> value="true" />
>>> </visualInfos>
>>> </annotations>
>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>> but
>>> now i want know the annotates the order ,like SP01005016, members.14,
>>> SP01005005,members.3.
>>> i can get the value,but can not get the annotates ,the code like:
>>>
>>> lastModel = modelBuilder.getModelRoot();
>>> EList annotations=lastModel.getAnnotations();
>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
>>> EMap keyedValue=annImpl.getKeyedValues();
>>> String value=(String)
>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>> }
>>> how i can annotates ? please help me!
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #142523 is a reply to message #142494] Wed, 31 October 2007 12:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Yves YANG
thank you, can you give me a simple?

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fg8mts$vcj$1@build.eclipse.org...
> In the BeanUtilities class, you can read getBeanName() and getBeanName()
> to access the Bean's name;
>
> yves yang
> ---
> http://www.soyatec.com
>
> "zxc" <caye5200@yahoo.com.cn> wrote in message
> news:fg8k20$lmp$1@build.eclipse.org...
>> Ed Merks,
>> AnnotationEMFImpl has getAnnotates method too,
>> i can get a JavaObjectInstance, but i don't know its order, like
>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>> annotates="//@members.3">
>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>> value="SP01005005" />
>> why VE can know its order "SP01005005" is members.3
>> i want to know this annotates's order.
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>I really don't have a good answer since I don't know VE, but I imagine
>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>> which object is being annotated. I could be wrong, but that's certainly
>>> what the serialization itself leads me to believe...
>>>
>>> zxc wrote:
>>>> hello, the view.xml following :
>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.14">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005016" />
>>>> - <visualInfos diagram="//@diagrams.0">
>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>> value="true" />
>>>> </visualInfos>
>>>> </annotations>
>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.3">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005005" />
>>>> - <visualInfos diagram="//@diagrams.0">
>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>> value="true" />
>>>> </visualInfos>
>>>> </annotations>
>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>> but
>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>> SP01005005,members.3.
>>>> i can get the value,but can not get the annotates ,the code like:
>>>>
>>>> lastModel = modelBuilder.getModelRoot();
>>>> EList annotations=lastModel.getAnnotations();
>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>> String value=(String)
>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>> }
>>>> how i can annotates ? please help me!
>>>>
>>>
>>
>
>
>
Re: annotates="//@members.14",how can get? [message #142534 is a reply to message #142494] Wed, 31 October 2007 12:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

yves yang,

i know the following code , can get the key value "SP01005005"
Entry keyValue = BeanUtilities.getMapEntry(annImpl,
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
(String)keyValue.getValue(),

now i want get annotates="//@members.3"
the String value "//@members.3" how i can get ?

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fg8mts$vcj$1@build.eclipse.org...
> In the BeanUtilities class, you can read getBeanName() and getBeanName()
> to access the Bean's name;
>
> yves yang
> ---
> http://www.soyatec.com
>
> "zxc" <caye5200@yahoo.com.cn> wrote in message
> news:fg8k20$lmp$1@build.eclipse.org...
>> Ed Merks,
>> AnnotationEMFImpl has getAnnotates method too,
>> i can get a JavaObjectInstance, but i don't know its order, like
>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>> annotates="//@members.3">
>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>> value="SP01005005" />
>> why VE can know its order "SP01005005" is members.3
>> i want to know this annotates's order.
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>I really don't have a good answer since I don't know VE, but I imagine
>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>> which object is being annotated. I could be wrong, but that's certainly
>>> what the serialization itself leads me to believe...
>>>
>>> zxc wrote:
>>>> hello, the view.xml following :
>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.14">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005016" />
>>>> - <visualInfos diagram="//@diagrams.0">
>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>> value="true" />
>>>> </visualInfos>
>>>> </annotations>
>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.3">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005005" />
>>>> - <visualInfos diagram="//@diagrams.0">
>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>> value="true" />
>>>> </visualInfos>
>>>> </annotations>
>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>> but
>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>> SP01005005,members.3.
>>>> i can get the value,but can not get the annotates ,the code like:
>>>>
>>>> lastModel = modelBuilder.getModelRoot();
>>>> EList annotations=lastModel.getAnnotations();
>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>> String value=(String)
>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>> }
>>>> how i can annotates ? please help me!
>>>>
>>>
>>
>
>
>
Re: annotates="//@members.14",how can get? [message #142543 is a reply to message #142534] Wed, 31 October 2007 12:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

That string value represents a reference to an object so in the
deserilized result, you will only have the object being referenced. If
the referenced object is an EObject x, then
x.eResource().getURIFragment(x) will return the string value used to
reference it.


zxc wrote:
> yves yang,
>
> i know the following code , can get the key value "SP01005005"
> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
> (String)keyValue.getValue(),
>
> now i want get annotates="//@members.3"
> the String value "//@members.3" how i can get ?
>
> "Yves YANG" <yves.yang@soyatec.com> wrote in message
> news:fg8mts$vcj$1@build.eclipse.org...
>> In the BeanUtilities class, you can read getBeanName() and
>> getBeanName() to access the Bean's name;
>>
>> yves yang
>> --- http://www.soyatec.com
>>
>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>> news:fg8k20$lmp$1@build.eclipse.org...
>>> Ed Merks,
>>> AnnotationEMFImpl has getAnnotates method too,
>>> i can get a JavaObjectInstance, but i don't know its order, like
>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>> annotates="//@members.3">
>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>> value="SP01005005" />
>>> why VE can know its order "SP01005005" is members.3
>>> i want to know this annotates's order.
>>>
>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>> I really don't have a good answer since I don't know VE, but I imagine
>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>> which object is being annotated. I could be wrong, but that's
>>>> certainly
>>>> what the serialization itself leads me to believe...
>>>>
>>>> zxc wrote:
>>>>> hello, the view.xml following :
>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.14">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005016" />
>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>> value="true" />
>>>>> </visualInfos>
>>>>> </annotations>
>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.3">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005005" />
>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>> value="true" />
>>>>> </visualInfos>
>>>>> </annotations>
>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>> but
>>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>>> SP01005005,members.3.
>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>
>>>>> lastModel = modelBuilder.getModelRoot();
>>>>> EList annotations=lastModel.getAnnotations();
>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>> annotations.get(aIndex);
>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>> String value=(String)
>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>> }
>>>>> how i can annotates ? please help me!
>>>>>
>>>>
>>>
>>
>>
>>
>
Re: annotates="//@members.14",how can get? [message #142572 is a reply to message #142543] Thu, 01 November 2007 02:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Ed Merks,
thank you ,you are right. i have other problem, thisPart can have some
components,
how can get thisPart's components

BeanSubclassCompositionImpl
beanSubclass=(BeanSubclassCompositionImpl)lastModel;
IJavaObjectInstance thisPart= beanSubclass.getThisPart();

i can get thisPart is IJavaObjectInstance , i don't get its components,
i want get component the string value "// @members.5"

- <thisPart xsi:type="usa.axxx:SS01006"
xmi:id="this" size="//@methods.6/@properties.0"
visible=//@methods.6/@properties.3
opaque="//@methods.6/@properties.1"
image="//@methods.6/@properties.2">
<layout xsi:nil="true" />
- <components component="//@members.5">
<constraint xsi:nil="true" />
</components>
</thisPart>

xingchenZhao
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg9tfg$6lc$4@build.eclipse.org...
> That string value represents a reference to an object so in the
> deserilized result, you will only have the object being referenced. If
> the referenced object is an EObject x, then
> x.eResource().getURIFragment(x) will return the string value used to
> reference it.
>
>
> zxc wrote:
>> yves yang,
>>
>> i know the following code , can get the key value "SP01005005"
>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>> (String)keyValue.getValue(),
>>
>> now i want get annotates="//@members.3"
>> the String value "//@members.3" how i can get ?
>>
>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>> news:fg8mts$vcj$1@build.eclipse.org...
>>> In the BeanUtilities class, you can read getBeanName() and
>>> getBeanName() to access the Bean's name;
>>>
>>> yves yang
>>> --- http://www.soyatec.com
>>>
>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>> Ed Merks,
>>>> AnnotationEMFImpl has getAnnotates method too,
>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.3">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005005" />
>>>> why VE can know its order "SP01005005" is members.3
>>>> i want to know this annotates's order.
>>>>
>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>> I really don't have a good answer since I don't know VE, but I imagine
>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>> which object is being annotated. I could be wrong, but that's
>>>>> certainly
>>>>> what the serialization itself leads me to believe...
>>>>>
>>>>> zxc wrote:
>>>>>> hello, the view.xml following :
>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.14">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005016" />
>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>> value="true" />
>>>>>> </visualInfos>
>>>>>> </annotations>
>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.3">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005005" />
>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>> value="true" />
>>>>>> </visualInfos>
>>>>>> </annotations>
>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>> but
>>>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>>>> SP01005005,members.3.
>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>
>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>> annotations.get(aIndex);
>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>> String value=(String)
>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>> }
>>>>>> how i can annotates ? please help me!
>>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #142579 is a reply to message #142543] Thu, 01 November 2007 03:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

- Ed Merks,
this members is Panel, its have 3 component , button, image, lable,
and its have a bounds property , these message ,how i can get by
Model?

<members xsi:type="com.ce_cube.parts.standard:CEPanel"
bounds="//@methods.0/@properties.0">
- <allocation
xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
<expression
xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
type="com.ce_cube.parts.standard.CEPanel" />
</allocation>
- <components component="//@members.0">
<constraint xsi:nil="true" />
</components>
- <components component="//@members.1">
<constraint xsi:nil="true" />
</components>
- <components component="//@members.2">
<constraint xsi:nil="true" />
</components>
</members>

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg9tfg$6lc$4@build.eclipse.org...
> That string value represents a reference to an object so in the
> deserilized result, you will only have the object being referenced. If
> the referenced object is an EObject x, then
> x.eResource().getURIFragment(x) will return the string value used to
> reference it.
>
>
> zxc wrote:
>> yves yang,
>>
>> i know the following code , can get the key value "SP01005005"
>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>> (String)keyValue.getValue(),
>>
>> now i want get annotates="//@members.3"
>> the String value "//@members.3" how i can get ?
>>
>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>> news:fg8mts$vcj$1@build.eclipse.org...
>>> In the BeanUtilities class, you can read getBeanName() and
>>> getBeanName() to access the Bean's name;
>>>
>>> yves yang
>>> --- http://www.soyatec.com
>>>
>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>> Ed Merks,
>>>> AnnotationEMFImpl has getAnnotates method too,
>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.3">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005005" />
>>>> why VE can know its order "SP01005005" is members.3
>>>> i want to know this annotates's order.
>>>>
>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>> I really don't have a good answer since I don't know VE, but I imagine
>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>> which object is being annotated. I could be wrong, but that's
>>>>> certainly
>>>>> what the serialization itself leads me to believe...
>>>>>
>>>>> zxc wrote:
>>>>>> hello, the view.xml following :
>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.14">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005016" />
>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>> value="true" />
>>>>>> </visualInfos>
>>>>>> </annotations>
>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.3">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005005" />
>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>> value="true" />
>>>>>> </visualInfos>
>>>>>> </annotations>
>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>> but
>>>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>>>> SP01005005,members.3.
>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>
>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>> annotations.get(aIndex);
>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>> String value=(String)
>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>> }
>>>>>> how i can annotates ? please help me!
>>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #142590 is a reply to message #142572] Thu, 01 November 2007 09:31 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
Call eGet("components"). You will get a lst of IJavaInstance. Afterwards,
you call eGet(JFCConstants.SF_CONSTRAINT_COMPONENT) for each element.

Yves YANG
---
http://www.soyatec.com
"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fgbdln$8tb$1@build.eclipse.org...
> Ed Merks,
> thank you ,you are right. i have other problem, thisPart can have some
> components,
> how can get thisPart's components
>
> BeanSubclassCompositionImpl
> beanSubclass=(BeanSubclassCompositionImpl)lastModel;
> IJavaObjectInstance thisPart= beanSubclass.getThisPart();
>
> i can get thisPart is IJavaObjectInstance , i don't get its components,
> i want get component the string value "// @members.5"
>
> - <thisPart xsi:type="usa.axxx:SS01006"
> xmi:id="this" size="//@methods.6/@properties.0"
> visible=//@methods.6/@properties.3
> opaque="//@methods.6/@properties.1"
> image="//@methods.6/@properties.2">
> <layout xsi:nil="true" />
> - <components component="//@members.5">
> <constraint xsi:nil="true" />
> </components>
> </thisPart>
>
> xingchenZhao
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fg9tfg$6lc$4@build.eclipse.org...
>> That string value represents a reference to an object so in the
>> deserilized result, you will only have the object being referenced. If
>> the referenced object is an EObject x, then
>> x.eResource().getURIFragment(x) will return the string value used to
>> reference it.
>>
>>
>> zxc wrote:
>>> yves yang,
>>>
>>> i know the following code , can get the key value "SP01005005"
>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>> (String)keyValue.getValue(),
>>>
>>> now i want get annotates="//@members.3"
>>> the String value "//@members.3" how i can get ?
>>>
>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>> In the BeanUtilities class, you can read getBeanName() and
>>>> getBeanName() to access the Bean's name;
>>>>
>>>> yves yang
>>>> --- http://www.soyatec.com
>>>>
>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>> Ed Merks,
>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.3">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005005" />
>>>>> why VE can know its order "SP01005005" is members.3
>>>>> i want to know this annotates's order.
>>>>>
>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>> I really don't have a good answer since I don't know VE, but I
>>>>>> imagine
>>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>>> which object is being annotated. I could be wrong, but that's
>>>>>> certainly
>>>>>> what the serialization itself leads me to believe...
>>>>>>
>>>>>> zxc wrote:
>>>>>>> hello, the view.xml following :
>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.14">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005016" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.3">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005005" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>>> but
>>>>>>> now i want know the annotates the order ,like SP01005016,
>>>>>>> members.14,
>>>>>>> SP01005005,members.3.
>>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>>
>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>> annotations.get(aIndex);
>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>> String value=(String)
>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>> }
>>>>>>> how i can annotates ? please help me!
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #142599 is a reply to message #142579] Thu, 01 November 2007 09:35 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
See my response above .

Best regards
Yves YANG
---
http://www.soyatec.com/

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fgbi7n$nbb$1@build.eclipse.org...
>- Ed Merks,
> this members is Panel, its have 3 component , button, image, lable,
> and its have a bounds property , these message ,how i can get by
> Model?
>
> <members xsi:type="com.ce_cube.parts.standard:CEPanel"
> bounds="//@methods.0/@properties.0">
> - <allocation
> xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
> <expression
> xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
> type="com.ce_cube.parts.standard.CEPanel" />
> </allocation>
> - <components component="//@members.0">
> <constraint xsi:nil="true" />
> </components>
> - <components component="//@members.1">
> <constraint xsi:nil="true" />
> </components>
> - <components component="//@members.2">
> <constraint xsi:nil="true" />
> </components>
> </members>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fg9tfg$6lc$4@build.eclipse.org...
>> That string value represents a reference to an object so in the
>> deserilized result, you will only have the object being referenced. If
>> the referenced object is an EObject x, then
>> x.eResource().getURIFragment(x) will return the string value used to
>> reference it.
>>
>>
>> zxc wrote:
>>> yves yang,
>>>
>>> i know the following code , can get the key value "SP01005005"
>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>> (String)keyValue.getValue(),
>>>
>>> now i want get annotates="//@members.3"
>>> the String value "//@members.3" how i can get ?
>>>
>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>> In the BeanUtilities class, you can read getBeanName() and
>>>> getBeanName() to access the Bean's name;
>>>>
>>>> yves yang
>>>> --- http://www.soyatec.com
>>>>
>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>> Ed Merks,
>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.3">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005005" />
>>>>> why VE can know its order "SP01005005" is members.3
>>>>> i want to know this annotates's order.
>>>>>
>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>> I really don't have a good answer since I don't know VE, but I
>>>>>> imagine
>>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>>> which object is being annotated. I could be wrong, but that's
>>>>>> certainly
>>>>>> what the serialization itself leads me to believe...
>>>>>>
>>>>>> zxc wrote:
>>>>>>> hello, the view.xml following :
>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.14">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005016" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.3">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005005" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>>> but
>>>>>>> now i want know the annotates the order ,like SP01005016,
>>>>>>> members.14,
>>>>>>> SP01005005,members.3.
>>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>>
>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>> annotations.get(aIndex);
>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>> String value=(String)
>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>> }
>>>>>>> how i can annotates ? please help me!
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #142608 is a reply to message #142590] Thu, 01 November 2007 10:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

which Object call eGet(); my code is following ,Can you write to me?
i don' t understand.the argument "JFCConstants.SF_CONSTRAINT_COMPONENT"
eGet() method not support

lastModel = modelBuilder.getModelRoot();
BeanSubclassCompositionImpl beanSubclass=
(BeanSubclassCompositionImpl)lastModel;
EList annotations=lastModel.getAnnotations();
EList components=beanSubclass.getComponents();
EList members=beanSubclass.getMembers();
EList methods=beanSubclass.getMethods();

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fgc6dj$cht$1@build.eclipse.org...
> Call eGet("components"). You will get a lst of IJavaInstance. Afterwards,
> you call eGet(JFCConstants.SF_CONSTRAINT_COMPONENT) for each element.
>
> Yves YANG
> ---
> http://www.soyatec.com
> "zxc" <caye5200@yahoo.com.cn> wrote in message
> news:fgbdln$8tb$1@build.eclipse.org...
>> Ed Merks,
>> thank you ,you are right. i have other problem, thisPart can have some
>> components,
>> how can get thisPart's components
>>
>> BeanSubclassCompositionImpl
>> beanSubclass=(BeanSubclassCompositionImpl)lastModel;
>> IJavaObjectInstance thisPart= beanSubclass.getThisPart();
>>
>> i can get thisPart is IJavaObjectInstance , i don't get its components,
>> i want get component the string value "// @members.5"
>>
>> - <thisPart xsi:type="usa.axxx:SS01006"
>> xmi:id="this" size="//@methods.6/@properties.0"
>> visible=//@methods.6/@properties.3
>> opaque="//@methods.6/@properties.1"
>> image="//@methods.6/@properties.2">
>> <layout xsi:nil="true" />
>> - <components component="//@members.5">
>> <constraint xsi:nil="true" />
>> </components>
>> </thisPart>
>>
>> xingchenZhao
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fg9tfg$6lc$4@build.eclipse.org...
>>> That string value represents a reference to an object so in the
>>> deserilized result, you will only have the object being referenced. If
>>> the referenced object is an EObject x, then
>>> x.eResource().getURIFragment(x) will return the string value used to
>>> reference it.
>>>
>>>
>>> zxc wrote:
>>>> yves yang,
>>>>
>>>> i know the following code , can get the key value "SP01005005"
>>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>>> (String)keyValue.getValue(),
>>>>
>>>> now i want get annotates="//@members.3"
>>>> the String value "//@members.3" how i can get ?
>>>>
>>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>>> In the BeanUtilities class, you can read getBeanName() and
>>>>> getBeanName() to access the Bean's name;
>>>>>
>>>>> yves yang
>>>>> --- http://www.soyatec.com
>>>>>
>>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>>> Ed Merks,
>>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.3">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005005" />
>>>>>> why VE can know its order "SP01005005" is members.3
>>>>>> i want to know this annotates's order.
>>>>>>
>>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>>> I really don't have a good answer since I don't know VE, but I
>>>>>>> imagine
>>>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>>>> which object is being annotated. I could be wrong, but that's
>>>>>>> certainly
>>>>>>> what the serialization itself leads me to believe...
>>>>>>>
>>>>>>> zxc wrote:
>>>>>>>> hello, the view.xml following :
>>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0"
>>>>>>>> />
>>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>>> annotates="//@members.14">
>>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>>> value="SP01005016" />
>>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>>> value="true" />
>>>>>>>> </visualInfos>
>>>>>>>> </annotations>
>>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>>> annotates="//@members.3">
>>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>>> value="SP01005005" />
>>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>>> value="true" />
>>>>>>>> </visualInfos>
>>>>>>>> </annotations>
>>>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>>>> but
>>>>>>>> now i want know the annotates the order ,like SP01005016,
>>>>>>>> members.14,
>>>>>>>> SP01005005,members.3.
>>>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>>>
>>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>>> annotations.get(aIndex);
>>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>>> String value=(String)
>>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>>> }
>>>>>>>> how i can annotates ? please help me!
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>
>
Re: annotates="//@members.14",how can get? [message #142636 is a reply to message #142579] Thu, 01 November 2007 11:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------060005040107090704020405
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

I think VE is making heavy use of dynamic Ecore models so this article
will give a bit of background that might help:

Discover the Eclipse Modeling Framework (EMF) and Its Dynamic
Capabilities <http://www.devx.com/Java/Article/29093/0/page/1>

In general, for an EObject x, you can do
x.eClass().getEAllStructuralFeatures(), and then for each of those, you
can do x.eGet(feature) to access all the data available for x. Of course
if there is a generate API for x, you can just cast to that interface
and call the getters...


zxc wrote:
> - Ed Merks,
> this members is Panel, its have 3 component , button, image, lable,
> and its have a bounds property , these message ,how i can get by Model?
>
> <members xsi:type="com.ce_cube.parts.standard:CEPanel"
> bounds="//@methods.0/@properties.0">
> - <allocation
> xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
> <expression
> xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
> type="com.ce_cube.parts.standard.CEPanel" />
> </allocation>
> - <components component="//@members.0">
> <constraint xsi:nil="true" />
> </components>
> - <components component="//@members.1">
> <constraint xsi:nil="true" />
> </components>
> - <components component="//@members.2">
> <constraint xsi:nil="true" />
> </components>
> </members>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fg9tfg$6lc$4@build.eclipse.org...
>> That string value represents a reference to an object so in the
>> deserilized result, you will only have the object being referenced. If
>> the referenced object is an EObject x, then
>> x.eResource().getURIFragment(x) will return the string value used to
>> reference it.
>>
>>
>> zxc wrote:
>>> yves yang,
>>>
>>> i know the following code , can get the key value "SP01005005"
>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>> (String)keyValue.getValue(),
>>>
>>> now i want get annotates="//@members.3"
>>> the String value "//@members.3" how i can get ?
>>>
>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>> In the BeanUtilities class, you can read getBeanName() and
>>>> getBeanName() to access the Bean's name;
>>>>
>>>> yves yang
>>>> --- http://www.soyatec.com
>>>>
>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>> Ed Merks,
>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.3">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005005" />
>>>>> why VE can know its order "SP01005005" is members.3
>>>>> i want to know this annotates's order.
>>>>>
>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>> I really don't have a good answer since I don't know VE, but I
>>>>>> imagine
>>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>>> which object is being annotated. I could be wrong, but that's
>>>>>> certainly
>>>>>> what the serialization itself leads me to believe...
>>>>>>
>>>>>> zxc wrote:
>>>>>>> hello, the view.xml following :
>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>>> //@annotations.0/@visualInfos.0
>>>>>>> //@annotations.25/@visualInfos.0" />
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.14">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005016" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.3">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005005" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>>> but
>>>>>>> now i want know the annotates the order ,like SP01005016,
>>>>>>> members.14,
>>>>>>> SP01005005,members.3.
>>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>>
>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>> annotations.get(aIndex);
>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>> String value=(String)
>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>>
>>>>>>> }
>>>>>>> how i can annotates ? please help me!
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>


--------------060005040107090704020405
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-2022-JP"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I think VE is making heavy use of dynamic Ecore models so this article
will give a bit of background that might help:<br>
<blockquote><a target="_out"
href="http://www.devx.com/Java/Article/29093/0/page/1">Discover the
Eclipse Modeling Framework (EMF) and Its Dynamic Capabilities</a><br>
</blockquote>
In general, for an EObject x, you can do
x.eClass().getEAllStructuralFeatures(), and then for each of those, you
can do x.eGet(feature) to access all the data available for x.&nbsp;&nbsp; Of
course if there is a generate API for x, you can just cast to that
interface and call the getters...<br>
<br>
<br>
zxc wrote:
<blockquote cite="mid:fgbi7n$nbb$1@build.eclipse.org" type="cite">- Ed
Merks,
<br>
&nbsp;&nbsp;&nbsp; this members is Panel, its have 3 component , button, image, lable,
<br>
&nbsp;&nbsp;&nbsp; and its have a bounds property , these message ,how i can get&nbsp; by
Model?
<br>
<br>
&lt;members xsi:type="com.ce_cube.parts.standard:CEPanel"
bounds=<a class="moz-txt-link-rfc2396E" href="mailto://@methods.0/@properties.0">"//@methods.0/@properties.0"</a>&gt;
<br>
- &lt;allocation
xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation "&gt;
<br>
&nbsp;&lt;expression
xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
type="com.ce_cube.parts.standard.CEPanel" /&gt;
<br>
&nbsp;&lt;/allocation&gt;
<br>
- &lt;components component=<a class="moz-txt-link-rfc2396E" href="mailto://@members.0">"//@members.0"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt;
<br>
&nbsp;&lt;/components&gt;
<br>
- &lt;components component=<a class="moz-txt-link-rfc2396E" href="mailto://@members.1">"//@members.1"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt;
<br>
&nbsp;&lt;/components&gt;
<br>
- &lt;components component=<a class="moz-txt-link-rfc2396E" href="mailto://@members.2">"//@members.2"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt;
<br>
&nbsp;&lt;/components&gt;
<br>
&nbsp;&lt;/members&gt;
<br>
<br>
"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:fg9tfg$6lc$4@build.eclipse.org">news:fg9tfg$6lc$4@build.eclipse.org</a>...
<br>
<blockquote type="cite">That string value represents a reference to
an object so in the
<br>
deserilized result, you will only have the object being referenced. If
<br>
the referenced object is an EObject x, then
<br>
x.eResource().getURIFragment(x) will return the string value used to
<br>
reference it.
<br>
<br>
<br>
zxc wrote:
<br>
<blockquote type="cite">yves yang,
<br>
<br>
i know the following code , can get the key value "SP01005005"
<br>
Entry keyValue = BeanUtilities.getMapEntry(annImpl,
<br>
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
<br>
(String)keyValue.getValue(),
<br>
<br>
now i want get annotates=<a class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>
<br>
the String value <a class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a> how i can get ?
<br>
<br>
"Yves YANG" <a class="moz-txt-link-rfc2396E" href="mailto:yves.yang@soyatec.com">&lt;yves.yang@soyatec.com&gt;</a> wrote in message
<br>
<a class="moz-txt-link-freetext" href="news:fg8mts$vcj$1@build.eclipse.org">news:fg8mts$vcj$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">In the BeanUtilities class, you can read
getBeanName() and
<br>
getBeanName() to access the Bean's name;
<br>
<br>
yves yang
<br>
--- <a class="moz-txt-link-freetext" href="http://www.soyatec.com">http://www.soyatec.com</a>
<br>
<br>
"zxc" <a class="moz-txt-link-rfc2396E" href="mailto:caye5200@yahoo.com.cn">&lt;caye5200@yahoo.com.cn&gt;</a> wrote in message
<br>
<a class="moz-txt-link-freetext" href="news:fg8k20$lmp$1@build.eclipse.org">news:fg8k20$lmp$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">Ed Merks,
<br>
AnnotationEMFImpl has getAnnotates method too,
<br>
i can get a JavaObjectInstance, but i don't know its order, like
<br>
&lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
<br>
annotates=<a class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>&gt;
<br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry"
<br>
key="org.eclipse.ve.internal.cde.core.nameincomposition"
<br>
value="SP01005005" /&gt;
<br>
why VE can know its order "SP01005005" is members.3
<br>
i want to know this annotates's order.
<br>
<br>
"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in message
<br>
<a class="moz-txt-link-freetext" href="news:fg7bfa$ro7$1@build.eclipse.org">news:fg7bfa$ro7$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">I really don't have a good answer
since I don't know VE, but I imagine
<br>
you should be casting to AnnotationEMF not AnnotationEMFImpl and I
<br>
imagine that AnnotationEMF has a getAnnotates method that will yield
<br>
which object is being annotated. I could be wrong, but that's
<br>
certainly
<br>
what the serialization itself leads me to believe...
<br>
<br>
zxc wrote:
<br>
<blockquote type="cite">hello, the view.xml following :
<br>
&lt;?xml version="1.0" encoding="ASCII" ?&gt;
<br>
&lt;diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
<br>
visualInfos="//@annotations.18/@visualInfos.0
<br>
//@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
<br>
//@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
<br>
//@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
<br>
//@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
<br>
//@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
<br>
//@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
<br>
//@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
<br>
//@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
<br>
//@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
<br>
//@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
<br>
//@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
<br>
//@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" /&gt;
<br>
- &lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
<br>
annotates=<a class="moz-txt-link-rfc2396E" href="mailto://@members.14">"//@members.14"</a>&gt;
<br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry"
<br>
key="org.eclipse.ve.internal.cde.core.nameincomposition"
<br>
value="SP01005016" /&gt;
<br>
- &lt;visualInfos diagram=<a class="moz-txt-link-rfc2396E" href="mailto://@diagrams.0">"//@diagrams.0"</a>&gt;
<br>
&lt;keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
<br>
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
<br>
value="true" /&gt;
<br>
&lt;/visualInfos&gt;
<br>
&lt;/annotations&gt;
<br>
- &lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
<br>
annotates=<a class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>&gt;
<br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry"
<br>
key="org.eclipse.ve.internal.cde.core.nameincomposition"
<br>
value="SP01005005" /&gt;
<br>
- &lt;visualInfos diagram=<a class="moz-txt-link-rfc2396E" href="mailto://@diagrams.0">"//@diagrams.0"</a>&gt;
<br>
&lt;keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
<br>
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
<br>
value="true" /&gt;
<br>
&lt;/visualInfos&gt;
<br>
&lt;/annotations&gt;
<br>
I hava get the model :lastModel = modelBuilder.getModelRoot(),
<br>
but
<br>
now i want know the annotates the order ,like SP01005016, members.14,
<br>
SP01005005,members.3.
<br>
i can get the value,but can not get the annotates ,the code like:
<br>
<br>
lastModel = modelBuilder.getModelRoot();
<br>
EList annotations=lastModel.getAnnotations();
<br>
for(int aIndex=0;aIndex&lt;annotations.size();aIndex++){
<br>
AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
<br>
annotations.get(aIndex);
<br>
EMap keyedValue=annImpl.getKeyedValues();
<br>
String value=(String)
<br>
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
<br>
}
<br>
how i can annotates ? please help me!
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>

--------------060005040107090704020405--
Re: annotates="//@members.14",how can get? [message #142685 is a reply to message #142636] Fri, 02 November 2007 02:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

This is a multi-part message in MIME format.

------=_NextPart_000_003F_01C81D3A.7B8E2140
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit

Ed Merks
Yes, your way can get members's attribute, but it not get members's
components list
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fgcefn$ftd$2@build.eclipse.org...
I think VE is making heavy use of dynamic Ecore models so this article
will give a bit of background that might help:

Discover the Eclipse Modeling Framework (EMF) and Its Dynamic
Capabilities

In general, for an EObject x, you can do
x.eClass().getEAllStructuralFeatures(), and then for each of those, you can
do x.eGet(feature) to access all the data available for x. Of course if
there is a generate API for x, you can just cast to that interface and call
the getters...


zxc wrote:
- Ed Merks,
this members is Panel, its have 3 component , button, image, lable,
and its have a bounds property , these message ,how i can get by
Model?

<members xsi:type="com.ce_cube.parts.standard:CEPanel"
bounds="//@methods.0/@properties.0">
- <allocation
xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
<expression
xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
type="com.ce_cube.parts.standard.CEPanel" />
</allocation>
- <components component="//@members.0">
<constraint xsi:nil="true" />
</components>
- <components component="//@members.1">
<constraint xsi:nil="true" />
</components>
- <components component="//@members.2">
<constraint xsi:nil="true" />
</components>
</members>

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg9tfg$6lc$4@build.eclipse.org...

That string value represents a reference to an object so in the
deserilized result, you will only have the object being referenced. If
the referenced object is an EObject x, then
x.eResource().getURIFragment(x) will return the string value used to
reference it.


zxc wrote:

yves yang,

i know the following code , can get the key value "SP01005005"
Entry keyValue = BeanUtilities.getMapEntry(annImpl,
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
(String)keyValue.getValue(),

now i want get annotates="//@members.3"
the String value "//@members.3" how i can get ?

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fg8mts$vcj$1@build.eclipse.org...

In the BeanUtilities class, you can read getBeanName() and
getBeanName() to access the Bean's name;

yves yang
--- http://www.soyatec.com

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fg8k20$lmp$1@build.eclipse.org...

Ed Merks,
AnnotationEMFImpl has getAnnotates method too,
i can get a JavaObjectInstance, but i don't know its order, like
<annotations
xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.3">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="SP01005005" />
why VE can know its order "SP01005005" is members.3
i want to know this annotates's order.

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg7bfa$ro7$1@build.eclipse.org...

I really don't have a good answer since I don't know VE, but I
imagine
you should be casting to AnnotationEMF not AnnotationEMFImpl
and I
imagine that AnnotationEMF has a getAnnotates method that will
yield
which object is being annotated. I could be wrong, but that's
certainly
what the serialization itself leads me to believe...

zxc wrote:

hello, the view.xml following :
<?xml version="1.0" encoding="ASCII" ?>
<diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
visualInfos="//@annotations.18/@visualInfos.0
//@annotations.24/@visualInfos.0
//@annotations.23/@visualInfos.0
//@annotations.8/@visualInfos.0
//@annotations.3/@visualInfos.0
//@annotations.6/@visualInfos.0
//@annotations.22/@visualInfos.0
//@annotations.19/@visualInfos.0
//@annotations.16/@visualInfos.0
//@annotations.15/@visualInfos.0
//@annotations.12/@visualInfos.0
//@annotations.10/@visualInfos.0
//@annotations.9/@visualInfos.0
//@annotations.7/@visualInfos.0
//@annotations.1/@visualInfos.0
//@annotations.21/@visualInfos.0
//@annotations.17/@visualInfos.0
//@annotations.14/@visualInfos.0
//@annotations.13/@visualInfos.0
//@annotations.11/@visualInfos.0
//@annotations.5/@visualInfos.0
//@annotations.4/@visualInfos.0
//@annotations.2/@visualInfos.0
//@annotations.0/@visualInfos.0
//@annotations.25/@visualInfos.0" />
- <annotations
xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.14">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="SP01005016" />
- <visualInfos diagram="//@diagrams.0">
<keyedValues
xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
value="true" />
</visualInfos>
</annotations>
- <annotations
xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.3">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="SP01005005" />
- <visualInfos diagram="//@diagrams.0">
<keyedValues
xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
value="true" />
</visualInfos>
</annotations>
I hava get the model :lastModel =
modelBuilder.getModelRoot(),
but
now i want know the annotates the order ,like SP01005016,
members.14,
SP01005005,members.3.
i can get the value,but can not get the annotates ,the code
like:

lastModel = modelBuilder.getModelRoot();
EList annotations=lastModel.getAnnotations();
for(int aIndex=0;aIndex<annotations.size();aIndex++){
AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
annotations.get(aIndex);
EMap keyedValue=annImpl.getKeyedValues();
String value=(String)
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
}
how i can annotates ? please help me!


















------=_NextPart_000_003F_01C81D3A.7B8E2140
Content-Type: text/html;
charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-2022-JP>
<META content=3D"MSHTML 6.00.2900.3199" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3D"MS UI Gothic" size=3D2>&nbsp; <FONT size=3D3>Ed=20
Merks</FONT></FONT></DIV>
<DIV><FONT face=3D"MS UI Gothic">&nbsp; Yes, your way can get members's =
attribute,=20
but&nbsp;it &nbsp;not get members's components list</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:fgcefn$ftd$2@build.eclipse.org">news:fgcefn$ftd$2@build.ecli=
pse.org</A>...</DIV>I=20
think VE is making heavy use of dynamic Ecore models so this article =
will give=20
a bit of background that might help:<BR>
<BLOCKQUOTE><A =
href=3D"http://www.devx.com/Java/Article/29093/0/page/1"=20
target=3D_out>Discover the Eclipse Modeling Framework (EMF) and Its =
Dynamic=20
Capabilities</A><BR></BLOCKQUOTE>In general, for an EObject x, you =
can do=20
x.eClass().getEAllStructuralFeatures(), and then for each of those, =
you can do=20
x.eGet(feature) to access all the data available for x.&nbsp;&nbsp; Of =
course=20
if there is a generate API for x, you can just cast to that interface =
and call=20
the getters...<BR><BR><BR>zxc wrote:=20
<BLOCKQUOTE cite=3Dmid:fgbi7n$nbb$1@build.eclipse.org type=3D"cite">- =
Ed Merks,=20
<BR>&nbsp;&nbsp;&nbsp; this members is Panel, its have 3 component , =
button,=20
image, lable, <BR>&nbsp;&nbsp;&nbsp; and its have a bounds property =
, these=20
message ,how i can get&nbsp; by Model? <BR><BR>&lt;members=20
xsi:type=3D"com.ce_cube.parts.standard:CEPanel" bounds=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto://@methods.0/@properties.0">"//@methods.0/@properties.0"</=
A>&gt;=20
<BR>- &lt;allocation=20
=
xsi:type=3D"org.eclipse.jem.internal.instantiation:ParseTreeAllocation "&g=
t;=20
<BR>&nbsp;&lt;expression=20
=
xsi:type=3D" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati o=
n"=20
type=3D"com.ce_cube.parts.standard.CEPanel" /&gt;=20
<BR>&nbsp;&lt;/allocation&gt; <BR>- &lt;components component=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.0">"//@members.0"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt; <BR>- =
&lt;components=20
component=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.1">"//@members.1"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt; <BR>- =
&lt;components=20
component=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.2">"//@members.2"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt;=20
<BR>&nbsp;&lt;/members&gt; <BR><BR>"Ed Merks" <A =
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> wrote =
in message=20
<A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg9tfg$6lc$4@build.eclipse.org">news:fg9tfg$6lc$4@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">That string value represents a reference =
to an=20
object so in the <BR>deserilized result, you will only have the =
object=20
being referenced. If <BR>the referenced object is an EObject x, =
then=20
<BR>x.eResource().getURIFragment(x) will return the string value =
used to=20
<BR>reference it. <BR><BR><BR>zxc wrote: <BR>
<BLOCKQUOTE type=3D"cite">yves yang, <BR><BR>i know the following =
code ,=20
can get the key value "SP01005005" <BR>Entry keyValue =3D=20
BeanUtilities.getMapEntry(annImpl,=20
<BR> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY) =

<BR>(String)keyValue.getValue(), <BR><BR>now i want get =
annotates=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A> <BR>the String =
value <A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A> how i can get ?=20
<BR><BR>"Yves YANG" <A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:yves.yang@soyatec.com">&lt;yves.yang@soyatec.com&gt;</A>=20
wrote in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg8mts$vcj$1@build.eclipse.org">news:fg8mts$vcj$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">In the BeanUtilities class, you can =
read=20
getBeanName() and <BR>getBeanName() to access the Bean's name; =

<BR><BR>yves yang <BR>--- <A class=3Dmoz-txt-link-freetext=20
href=3D"http://www.soyatec.com">http://www.soyatec.com</A> =
<BR><BR>"zxc"=20
<A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:caye5200@yahoo.com.cn">&lt;caye5200@yahoo.com.cn&gt;</A>=20
wrote in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg8k20$lmp$1@build.eclipse.org">news:fg8k20$lmp$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">Ed Merks, <BR>AnnotationEMFImpl has=20
getAnnotates method too, <BR>i can get a JavaObjectInstance, =
but i=20
don't know its order, like <BR>&lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005005" /&gt; <BR>why VE can know its order =

"SP01005005" is members.3 <BR>i want to know this =
annotates's order.=20
<BR><BR>"Ed Merks" <A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> wrote in=20
message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg7bfa$ro7$1@build.eclipse.org">news:fg7bfa$ro7$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">I really don't have a good answer =
since I=20
don't know VE, but I imagine <BR>you should be casting to=20
AnnotationEMF not AnnotationEMFImpl and I <BR>imagine that =

AnnotationEMF has a getAnnotates method that will yield =
<BR>which=20
object is being annotated. I could be wrong, but that's=20
<BR>certainly <BR>what the serialization itself leads me =
to=20
believe... <BR><BR>zxc wrote: <BR>
<BLOCKQUOTE type=3D"cite">hello, the view.xml following :=20
<BR>&lt;?xml version=3D"1.0" encoding=3D"ASCII" ?&gt;=20
<BR>&lt;diagrams =
id=3D"org.eclipse.ve.internal.cdm.primarydiagram"=20
<BR>visualInfos=3D"//@annotations.18/@visualInfos.0=20
<BR>//@annotations.24/@visualInfos.0=20
//@annotations.23/@visualInfos.0=20
<BR>//@annotations.8/@visualInfos.0=20
//@annotations.3/@visualInfos.0=20
<BR>//@annotations.6/@visualInfos.0=20
//@annotations.22/@visualInfos.0=20
<BR>//@annotations.19/@visualInfos.0=20
//@annotations.16/@visualInfos.0=20
<BR>//@annotations.15/@visualInfos.0=20
//@annotations.12/@visualInfos.0=20
<BR>//@annotations.10/@visualInfos.0=20
//@annotations.9/@visualInfos.0=20
<BR>//@annotations.7/@visualInfos.0=20
//@annotations.1/@visualInfos.0=20
<BR>//@annotations.21/@visualInfos.0=20
//@annotations.17/@visualInfos.0=20
<BR>//@annotations.14/@visualInfos.0=20
//@annotations.13/@visualInfos.0=20
<BR>//@annotations.11/@visualInfos.0=20
//@annotations.5/@visualInfos.0=20
<BR>//@annotations.4/@visualInfos.0=20
//@annotations.2/@visualInfos.0=20
<BR>//@annotations.0/@visualInfos.0=20
//@annotations.25/@visualInfos.0" /&gt; <BR>- =
&lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.14">"//@members.14"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005016" /&gt; <BR>- &lt;visualInfos =
diagram=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@diagrams.0">"//@diagrams.0"</A>&gt;=20
<BR>&lt;keyedValues=20
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
<BR>key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
<BR>value=3D"true" /&gt; <BR>&lt;/visualInfos&gt;=20
<BR>&lt;/annotations&gt; <BR>- &lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005005" /&gt; <BR>- &lt;visualInfos =
diagram=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@diagrams.0">"//@diagrams.0"</A>&gt;=20
<BR>&lt;keyedValues=20
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
<BR>key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
<BR>value=3D"true" /&gt; <BR>&lt;/visualInfos&gt;=20
<BR>&lt;/annotations&gt; <BR>I hava get the model =
:lastModel =3D=20
modelBuilder.getModelRoot(), <BR>but <BR>now i want know =
the=20
annotates the order ,like SP01005016, members.14,=20
<BR>SP01005005,members.3. <BR>i can get the value,but =
can not=20
get the annotates ,the code like: <BR><BR>lastModel =3D=20
modelBuilder.getModelRoot(); <BR>EList=20
annotations=3DlastModel.getAnnotations(); <BR>for(int=20
aIndex=3D0;aIndex&lt;annotations.size();aIndex++){=20
<BR>AnnotationEMFImpl annImpl=3D(AnnotationEMFImpl)=20
<BR>annotations.get(aIndex); <BR>EMap=20
keyedValue=3DannImpl.getKeyedValues(); <BR>String =
value=3D(String)=20
=
<BR>keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");=
=20
<BR>} <BR>how i can annotates ? please help me!=20
=
<BR><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE ><BR><BR><BR></BLOC=
KQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE ><BR></BLOCKQUOT=
E></BODY></HTML>

------=_NextPart_000_003F_01C81D3A.7B8E2140--
Re: annotates="//@members.14",how can get? [message #142697 is a reply to message #142685] Fri, 02 November 2007 09:23 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0017_01C81D3A.739EBA30
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

You cast the value to EList. And then use the iterator to get each =
element.

Yves YANG
---
http://www.soyatec.com
"zxc" <caye5200@yahoo.com.cn> wrote in message =
news:fge1o7$v8o$1@build.eclipse.org...
Ed Merks
Yes, your way can get members's attribute, but it not get members's =
components list
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:fgcefn$ftd$2@build.eclipse.org...
I think VE is making heavy use of dynamic Ecore models so this =
article will give a bit of background that might help:

Discover the Eclipse Modeling Framework (EMF) and Its Dynamic =
Capabilities

In general, for an EObject x, you can do =
x.eClass().getEAllStructuralFeatures(), and then for each of those, you =
can do x.eGet(feature) to access all the data available for x. Of =
course if there is a generate API for x, you can just cast to that =
interface and call the getters...


zxc wrote:=20
- Ed Merks,=20
this members is Panel, its have 3 component , button, image, =
lable,=20
and its have a bounds property , these message ,how i can get =
by Model?=20

<members xsi:type=3D"com.ce_cube.parts.standard:CEPanel" =
bounds=3D"//@methods.0/@properties.0">=20
- <allocation =
xsi:type=3D"org.eclipse.jem.internal.instantiation:ParseTreeAllocation "> =

<expression =
xsi:type=3D" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati o=
n" type=3D"com.ce_cube.parts.standard.CEPanel" />=20
</allocation>=20
- <components component=3D"//@members.0">=20
<constraint xsi:nil=3D"true" />=20
</components>=20
- <components component=3D"//@members.1">=20
<constraint xsi:nil=3D"true" />=20
</components>=20
- <components component=3D"//@members.2">=20
<constraint xsi:nil=3D"true" />=20
</components>=20
</members>=20

"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:fg9tfg$6lc$4@build.eclipse.org...=20

That string value represents a reference to an object so in the=20
deserilized result, you will only have the object being =
referenced. If=20
the referenced object is an EObject x, then=20
x.eResource().getURIFragment(x) will return the string value =
used to=20
reference it.=20


zxc wrote:=20

yves yang,=20

i know the following code , can get the key value "SP01005005" =

Entry keyValue =3D BeanUtilities.getMapEntry(annImpl,=20
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY) =20
(String)keyValue.getValue(),=20

now i want get annotates=3D"//@members.3"=20
the String value "//@members.3" how i can get ?=20

"Yves YANG" <yves.yang@soyatec.com> wrote in message=20
news:fg8mts$vcj$1@build.eclipse.org...=20

In the BeanUtilities class, you can read getBeanName() and=20
getBeanName() to access the Bean's name;=20

yves yang=20
--- http://www.soyatec.com=20

"zxc" <caye5200@yahoo.com.cn> wrote in message=20
news:fg8k20$lmp$1@build.eclipse.org...=20

Ed Merks,=20
AnnotationEMFImpl has getAnnotates method too,=20
i can get a JavaObjectInstance, but i don't know its =
order, like=20
<annotations =
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
annotates=3D"//@members.3">=20
<keyedValues xsi:type=3D"ecore:EStringToStringMapEntry"=20
key=3D"org.eclipse.ve.internal.cde.core.nameincomposition" =

value=3D"SP01005005" />=20
why VE can know its order "SP01005005" is members.3=20
i want to know this annotates's order.=20

"Ed Merks" <merks@ca.ibm.com> wrote in message=20
news:fg7bfa$ro7$1@build.eclipse.org...=20

I really don't have a good answer since I don't know VE, =
but I imagine=20
you should be casting to AnnotationEMF not =
AnnotationEMFImpl and I=20
imagine that AnnotationEMF has a getAnnotates method =
that will yield=20
which object is being annotated. I could be wrong, but =
that's=20
certainly=20
what the serialization itself leads me to believe...=20

zxc wrote:=20

hello, the view.xml following :=20
<?xml version=3D"1.0" encoding=3D"ASCII" ?>=20
<diagrams =
id=3D"org.eclipse.ve.internal.cdm.primarydiagram"=20
visualInfos=3D"//@annotations.18/@visualInfos.0=20
//@annotations.24/@visualInfos.0 =
//@annotations.23/@visualInfos.0=20
//@annotations.8/@visualInfos.0 =
//@annotations.3/@visualInfos.0=20
//@annotations.6/@visualInfos.0 =
//@annotations.22/@visualInfos.0=20
//@annotations.19/@visualInfos.0 =
//@annotations.16/@visualInfos.0=20
//@annotations.15/@visualInfos.0 =
//@annotations.12/@visualInfos.0=20
//@annotations.10/@visualInfos.0 =
//@annotations.9/@visualInfos.0=20
//@annotations.7/@visualInfos.0 =
//@annotations.1/@visualInfos.0=20
//@annotations.21/@visualInfos.0 =
//@annotations.17/@visualInfos.0=20
//@annotations.14/@visualInfos.0 =
//@annotations.13/@visualInfos.0=20
//@annotations.11/@visualInfos.0 =
//@annotations.5/@visualInfos.0=20
//@annotations.4/@visualInfos.0 =
//@annotations.2/@visualInfos.0=20
//@annotations.0/@visualInfos.0 =
//@annotations.25/@visualInfos.0" />=20
- <annotations =
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
annotates=3D"//@members.14">=20
<keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
key=3D"org.eclipse.ve.internal.cde.core.nameincomposition"=20
value=3D"SP01005016" />=20
- <visualInfos diagram=3D"//@diagrams.0">=20
<keyedValues =
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
value=3D"true" />=20
</visualInfos>=20
</annotations>=20
- <annotations =
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
annotates=3D"//@members.3">=20
<keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
key=3D"org.eclipse.ve.internal.cde.core.nameincomposition"=20
value=3D"SP01005005" />=20
- <visualInfos diagram=3D"//@diagrams.0">=20
<keyedValues =
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
value=3D"true" />=20
</visualInfos>=20
</annotations>=20
I hava get the model :lastModel =3D =
modelBuilder.getModelRoot(),=20
but=20
now i want know the annotates the order ,like =
SP01005016, members.14,=20
SP01005005,members.3.=20
i can get the value,but can not get the annotates ,the =
code like:=20

lastModel =3D modelBuilder.getModelRoot();=20
EList annotations=3DlastModel.getAnnotations();=20
for(int =
aIndex=3D0;aIndex<annotations.size();aIndex++){=20
AnnotationEMFImpl annImpl=3D(AnnotationEMFImpl)=20
annotations.get(aIndex);=20
EMap keyedValue=3DannImpl.getKeyedValues();=20
String value=3D(String)=20
=
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");=20
}=20
how i can annotates ? please help me!=20


















------=_NextPart_000_0017_01C81D3A.739EBA30
Content-Type: text/html;
charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-2022-JP>
<META content=3D"MSHTML 6.00.6000.16544" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>You cast the value to EList. And then =
use the=20
iterator to get each element.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Yves YANG</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://www.soyatec.com">http://www.soyatec.com</A></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"zxc" &lt;<A=20
href=3D"mailto:caye5200@yahoo.com.cn">caye5200@yahoo.com.cn</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:fge1o7$v8o$1@build.eclipse.org">news:fge1o7$v8o$1@build.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3D"MS UI Gothic" size=3D2>&nbsp; <FONT size=3D3>Ed=20
Merks</FONT></FONT></DIV>
<DIV><FONT face=3D"MS UI Gothic">&nbsp; Yes, your way can get =
members's=20
attribute, but&nbsp;it &nbsp;not get members's components =
list</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A=20
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:fgcefn$ftd$2@build.eclipse.org">news:fgcefn$ftd$2@build.ecli=
pse.org</A>...</DIV>I=20
think VE is making heavy use of dynamic Ecore models so this article =
will=20
give a bit of background that might help:<BR>
<BLOCKQUOTE><A =
href=3D"http://www.devx.com/Java/Article/29093/0/page/1"=20
target=3D_out>Discover the Eclipse Modeling Framework (EMF) and =
Its Dynamic=20
Capabilities</A><BR></BLOCKQUOTE>In general, for an EObject x, you =
can do=20
x.eClass().getEAllStructuralFeatures(), and then for each of those, =
you can=20
do x.eGet(feature) to access all the data available for =
x.&nbsp;&nbsp; Of=20
course if there is a generate API for x, you can just cast to that =
interface=20
and call the getters...<BR><BR><BR>zxc wrote:=20
<BLOCKQUOTE cite=3Dmid:fgbi7n$nbb$1@build.eclipse.org =
type=3D"cite">- Ed=20
Merks, <BR>&nbsp;&nbsp;&nbsp; this members is Panel, its have 3 =
component=20
, button, image, lable, <BR>&nbsp;&nbsp;&nbsp; and its have a =
bounds=20
property , these message ,how i can get&nbsp; by Model?=20
<BR><BR>&lt;members =
xsi:type=3D"com.ce_cube.parts.standard:CEPanel"=20
bounds=3D<A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto://@methods.0/@properties.0">"//@methods.0/@properties.0"</=
A>&gt;=20
<BR>- &lt;allocation=20
=
xsi:type=3D"org.eclipse.jem.internal.instantiation:ParseTreeAllocation "&g=
t;=20
<BR>&nbsp;&lt;expression=20
=
xsi:type=3D" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati o=
n"=20
type=3D"com.ce_cube.parts.standard.CEPanel" /&gt;=20
<BR>&nbsp;&lt;/allocation&gt; <BR>- &lt;components component=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.0">"//@members.0"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt; <BR>- =
&lt;components=20
component=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.1">"//@members.1"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt; <BR>- =
&lt;components=20
component=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.2">"//@members.2"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt;=20
<BR>&nbsp;&lt;/members&gt; <BR><BR>"Ed Merks" <A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> =
wrote in=20
message <A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg9tfg$6lc$4@build.eclipse.org">news:fg9tfg$6lc$4@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">That string value represents a reference =
to an=20
object so in the <BR>deserilized result, you will only have the =
object=20
being referenced. If <BR>the referenced object is an EObject x, =
then=20
<BR>x.eResource().getURIFragment(x) will return the string value =
used to=20
<BR>reference it. <BR><BR><BR>zxc wrote: <BR>
<BLOCKQUOTE type=3D"cite">yves yang, <BR><BR>i know the =
following code ,=20
can get the key value "SP01005005" <BR>Entry keyValue =3D=20
BeanUtilities.getMapEntry(annImpl,=20
=
<BR> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY) =20
<BR>(String)keyValue.getValue(), <BR><BR>now i want get =
annotates=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A> <BR>the String =
value <A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A> how i can get =
?=20
<BR><BR>"Yves YANG" <A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:yves.yang@soyatec.com">&lt;yves.yang@soyatec.com&gt;</A>=20
wrote in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg8mts$vcj$1@build.eclipse.org">news:fg8mts$vcj$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">In the BeanUtilities class, you can =
read=20
getBeanName() and <BR>getBeanName() to access the Bean's =
name;=20
<BR><BR>yves yang <BR>--- <A class=3Dmoz-txt-link-freetext=20
href=3D"http://www.soyatec.com">http://www.soyatec.com</A>=20
<BR><BR>"zxc" <A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:caye5200@yahoo.com.cn">&lt;caye5200@yahoo.com.cn&gt;</A>=20
wrote in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg8k20$lmp$1@build.eclipse.org">news:fg8k20$lmp$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">Ed Merks, <BR>AnnotationEMFImpl =
has=20
getAnnotates method too, <BR>i can get a =
JavaObjectInstance, but i=20
don't know its order, like <BR>&lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005005" /&gt; <BR>why VE can know its =
order=20
"SP01005005" is members.3 <BR>i want to know this =
annotates's=20
order. <BR><BR>"Ed Merks" <A class=3Dmoz-txt-link-rfc2396E =

=
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> wrote=20
in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg7bfa$ro7$1@build.eclipse.org">news:fg7bfa$ro7$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">I really don't have a good =
answer since=20
I don't know VE, but I imagine <BR>you should be casting =
to=20
AnnotationEMF not AnnotationEMFImpl and I <BR>imagine =
that=20
AnnotationEMF has a getAnnotates method that will yield=20
<BR>which object is being annotated. I could be wrong, =
but=20
that's <BR>certainly <BR>what the serialization itself =
leads me=20
to believe... <BR><BR>zxc wrote: <BR>
<BLOCKQUOTE type=3D"cite">hello, the view.xml following =
:=20
<BR>&lt;?xml version=3D"1.0" encoding=3D"ASCII" ?&gt;=20
<BR>&lt;diagrams=20
id=3D"org.eclipse.ve.internal.cdm.primarydiagram"=20
<BR>visualInfos=3D"//@annotations.18/@visualInfos.0=20
<BR>//@annotations.24/@visualInfos.0=20
//@annotations.23/@visualInfos.0=20
<BR>//@annotations.8/@visualInfos.0=20
//@annotations.3/@visualInfos.0=20
<BR>//@annotations.6/@visualInfos.0=20
//@annotations.22/@visualInfos.0=20
<BR>//@annotations.19/@visualInfos.0=20
//@annotations.16/@visualInfos.0=20
<BR>//@annotations.15/@visualInfos.0=20
//@annotations.12/@visualInfos.0=20
<BR>//@annotations.10/@visualInfos.0=20
//@annotations.9/@visualInfos.0=20
<BR>//@annotations.7/@visualInfos.0=20
//@annotations.1/@visualInfos.0=20
<BR>//@annotations.21/@visualInfos.0=20
//@annotations.17/@visualInfos.0=20
<BR>//@annotations.14/@visualInfos.0=20
//@annotations.13/@visualInfos.0=20
<BR>//@annotations.11/@visualInfos.0=20
//@annotations.5/@visualInfos.0=20
<BR>//@annotations.4/@visualInfos.0=20
//@annotations.2/@visualInfos.0=20
<BR>//@annotations.0/@visualInfos.0=20
//@annotations.25/@visualInfos.0" /&gt; <BR>- =
&lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF" =

<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.14">"//@members.14"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005016" /&gt; <BR>- &lt;visualInfos =
diagram=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@diagrams.0">"//@diagrams.0"</A>&gt;=20
<BR>&lt;keyedValues=20
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
<BR>key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
<BR>value=3D"true" /&gt; <BR>&lt;/visualInfos&gt;=20
<BR>&lt;/annotations&gt; <BR>- &lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF" =

<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005005" /&gt; <BR>- &lt;visualInfos =
diagram=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@diagrams.0">"//@diagrams.0"</A>&gt;=20
<BR>&lt;keyedValues=20
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
<BR>key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
<BR>value=3D"true" /&gt; <BR>&lt;/visualInfos&gt;=20
<BR>&lt;/annotations&gt; <BR>I hava get the model =
:lastModel =3D=20
modelBuilder.getModelRoot(), <BR>but <BR>now i want =
know the=20
annotates the order ,like SP01005016, members.14,=20
<BR>SP01005005,members.3. <BR>i can get the value,but =
can not=20
get the annotates ,the code like: <BR><BR>lastModel =
=3D=20
modelBuilder.getModelRoot(); <BR>EList=20
annotations=3DlastModel.getAnnotations(); <BR>for(int=20
aIndex=3D0;aIndex&lt;annotations.size();aIndex++){=20
<BR>AnnotationEMFImpl annImpl=3D(AnnotationEMFImpl)=20
<BR>annotations.get(aIndex); <BR>EMap=20
keyedValue=3DannImpl.getKeyedValues(); <BR>String =
value=3D(String)=20
=
<BR>keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");=
=20
<BR>} <BR>how i can annotates ? please help me!=20
=
<BR><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE ><BR><BR><BR></BLOC=
KQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE ><BR></BLOCKQUOT=
E></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0017_01C81D3A.739EBA30--
Re: annotates="//@members.14",how can get? [message #142709 is a reply to message #142697] Fri, 02 November 2007 10:02 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------020805000002080105040206
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

Yves,

Yes. If the EStructuralFeature f has f.isMany() true, then the value
returned from eGet(f) will be an EList, i.e., a list containing all the
referenced values.


Yves YANG wrote:
> You cast the value to EList. And then use the iterator to get each
> element.
> Yves YANG
> ---
> http://www.soyatec.com
>
> "zxc" <caye5200@yahoo.com.cn <mailto:caye5200@yahoo.com.cn>> wrote
> in message news:fge1o7$v8o$1@build.eclipse.org...
> Ed Merks
> Yes, your way can get members's attribute, butit not get members's
> components list
>
> "Ed Merks" <merks@ca.ibm.com <mailto:merks@ca.ibm.com>> wrote
> in message news:fgcefn$ftd$2@build.eclipse.org...
> I think VE is making heavy use of dynamic Ecore models so this
> article will give a bit of background that might help:
>
> Discover the Eclipse Modeling Framework (EMF) and Its
> Dynamic Capabilities
> <http://www.devx.com/Java/Article/29093/0/page/1>
>
> In general, for an EObject x, you can do
> x.eClass().getEAllStructuralFeatures(), and then for each of
> those, you can do x.eGet(feature) to access all the data
> available for x. Of course if there is a generate API for x,
> you can just cast to that interface and call the getters...
>
>
> zxc wrote:
>> - Ed Merks,
>> this members is Panel, its have 3 component , button, image,
>> lable,
>> and its have a bounds property , these message ,how i can get
>> by Model?
>>
>> <members xsi:type="com.ce_cube.parts.standard:CEPanel"
>> bounds="//@methods.0/@properties.0">
>> - <allocation
>> xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
>>
>> <expression
>> xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
>> type="com.ce_cube.parts.standard.CEPanel" />
>> </allocation>
>> - <components component="//@members.0">
>> <constraint xsi:nil="true" />
>> </components>
>> - <components component="//@members.1">
>> <constraint xsi:nil="true" />
>> </components>
>> - <components component="//@members.2">
>> <constraint xsi:nil="true" />
>> </components>
>> </members>
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fg9tfg$6lc$4@build.eclipse.org...
>>> That string value represents a reference to an object so in the
>>> deserilized result, you will only have the object being
>>> referenced. If
>>> the referenced object is an EObject x, then
>>> x.eResource().getURIFragment(x) will return the string value
>>> used to
>>> reference it.
>>>
>>>
>>> zxc wrote:
>>>> yves yang,
>>>>
>>>> i know the following code , can get the key value "SP01005005"
>>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>>> (String)keyValue.getValue(),
>>>>
>>>> now i want get annotates="//@members.3"
>>>> the String value "//@members.3" how i can get ?
>>>>
>>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>>> In the BeanUtilities class, you can read getBeanName() and
>>>>> getBeanName() to access the Bean's name;
>>>>>
>>>>> yves yang
>>>>> --- http://www.soyatec.com
>>>>>
>>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>>> Ed Merks,
>>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>>> i can get a JavaObjectInstance, but i don't know its
>>>>>> order, like
>>>>>> <annotations
>>>>>> xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.3">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005005" />
>>>>>> why VE can know its order "SP01005005" is members.3
>>>>>> i want to know this annotates's order.
>>>>>>
>>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>>> I really don't have a good answer since I don't know VE,
>>>>>>> but I imagine
>>>>>>> you should be casting to AnnotationEMF not
>>>>>>> AnnotationEMFImpl and I
>>>>>>> imagine that AnnotationEMF has a getAnnotates method
>>>>>>> that will yield
>>>>>>> which object is being annotated. I could be wrong, but
>>>>>>> that's
>>>>>>> certainly
>>>>>>> what the serialization itself leads me to believe...
>>>>>>>
>>>>>>> zxc wrote:
>>>>>>>> hello, the view.xml following :
>>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>>> //@annotations.24/@visualInfos.0
>>>>>>>> //@annotations.23/@visualInfos.0
>>>>>>>> //@annotations.8/@visualInfos.0
>>>>>>>> //@annotations.3/@visualInfos.0
>>>>>>>> //@annotations.6/@visualInfos.0
>>>>>>>> //@annotations.22/@visualInfos.0
>>>>>>>> //@annotations.19/@visualInfos.0
>>>>>>>> //@annotations.16/@visualInfos.0
>>>>>>>> //@annotations.15/@visualInfos.0
>>>>>>>> //@annotations.12/@visualInfos.0
>>>>>>>> //@annotations.10/@visualInfos.0
>>>>>>>> //@annotations.9/@visualInfos.0
>>>>>>>> //@annotations.7/@visualInfos.0
>>>>>>>> //@annotations.1/@visualInfos.0
>>>>>>>> //@annotations.21/@visualInfos.0
>>>>>>>> //@annotations.17/@visualInfos.0
>>>>>>>> //@annotations.14/@visualInfos.0
>>>>>>>> //@annotations.13/@visualInfos.0
>>>>>>>> //@annotations.11/@visualInfos.0
>>>>>>>> //@annotations.5/@visualInfos.0
>>>>>>>> //@annotations.4/@visualInfos.0
>>>>>>>> //@annotations.2/@visualInfos.0
>>>>>>>> //@annotations.0/@visualInfos.0
>>>>>>>> //@annotations.25/@visualInfos.0" />
>>>>>>>> - <annotations
>>>>>>>> xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>>> annotates="//@members.14">
>>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>>> value="SP01005016" />
>>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>>> <keyedValues
>>>>>>>> xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>>>
>>>>>>>> value="true" />
>>>>>>>> </visualInfos>
>>>>>>>> </annotations>
>>>>>>>> - <annotations
>>>>>>>> xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>>> annotates="//@members.3">
>>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>>> value="SP01005005" />
>>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>>> <keyedValues
>>>>>>>> xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>>>
>>>>>>>> value="true" />
>>>>>>>> </visualInfos>
>>>>>>>> </annotations>
>>>>>>>> I hava get the model :lastModel =
>>>>>>>> modelBuilder.getModelRoot(),
>>>>>>>> but
>>>>>>>> now i want know the annotates the order ,like
>>>>>>>> SP01005016, members.14,
>>>>>>>> SP01005005,members.3.
>>>>>>>> i can get the value,but can not get the annotates ,the
>>>>>>>> code like:
>>>>>>>>
>>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>>> annotations.get(aIndex);
>>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>>> String value=(String)
>>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>>>
>>>>>>>> }
>>>>>>>> how i can annotates ? please help me!
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>


--------------020805000002080105040206
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-2022-JP"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yves,<br>
<br>
Yes.&nbsp; If the EStructuralFeature f has f.isMany() true, then the value
returned from eGet(f) will be an EList, i.e., a list containing all the
referenced values.<br>
<br>
<br>
Yves YANG wrote:
<blockquote cite="mid:fgeqav$90k$1@build.eclipse.org" type="cite">
<meta http-equiv="Content-Type"
content="text/html;charset=ISO-2022-JP">
<meta content="MSHTML 6.00.6000.16544" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">You cast the value to EList. And
then use the iterator to get each element.</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Yves YANG</font></div>
<div><font face="Arial" size="2">---</font></div>
<div><font face="Arial" size="2"><a moz-do-not-send="true"
href="http://www.soyatec.com">http://www.soyatec.com</a></font></div>
<blockquote dir="ltr"
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div>"zxc" &lt;<a moz-do-not-send="true"
href="mailto:caye5200@yahoo.com.cn">caye5200@yahoo.com.cn</a>&gt;
wrote in message <a moz-do-not-send="true"
href="news:fge1o7$v8o$1@build.eclipse.org">news:fge1o7$v8o$1@build.eclipse.org</a>...</div>
<div><font face="MS UI Gothic" size="2">&nbsp; <font size="3">Ed Merks</font></font></div>
<div><font face="MS UI Gothic">&nbsp; Yes, your way can get members's
attribute, but&nbsp;it &nbsp;not get members's components list</font></div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div>"Ed Merks" &lt;<a moz-do-not-send="true"
href="mailto:merks@ca.ibm.com">merks@ca.ibm.com</a>&gt; wrote in
message <a moz-do-not-send="true"
href="news:fgcefn$ftd$2@build.eclipse.org">news:fgcefn$ftd$2@build.eclipse.org</a>...</div>
I think VE is making heavy use of dynamic Ecore models so this article
will give a bit of background that might help:<br>
<blockquote><a moz-do-not-send="true"
href="http://www.devx.com/Java/Article/29093/0/page/1" target="_out">Discover
the Eclipse Modeling Framework (EMF) and Its Dynamic Capabilities</a><br>
</blockquote>
In general, for an EObject x, you can do
x.eClass().getEAllStructuralFeatures(), and then for each of those, you
can do x.eGet(feature) to access all the data available for x.&nbsp;&nbsp; Of
course if there is a generate API for x, you can just cast to that
interface and call the getters...<br>
<br>
<br>
zxc wrote:
<blockquote cite="mid:fgbi7n$nbb$1@build.eclipse.org" type="cite">-
Ed Merks, <br>
&nbsp;&nbsp;&nbsp; this members is Panel, its have 3 component , button, image, lable,
<br>
&nbsp;&nbsp;&nbsp; and its have a bounds property , these message ,how i can get&nbsp; by
Model? <br>
<br>
&lt;members xsi:type="com.ce_cube.parts.standard:CEPanel" bounds=<a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto://@methods.0/@properties.0">"//@methods.0/@properties.0"</a>&gt;
<br>
- &lt;allocation
xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation "&gt;
<br>
&nbsp;&lt;expression
xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
type="com.ce_cube.parts.standard.CEPanel" /&gt; <br>
&nbsp;&lt;/allocation&gt; <br>
- &lt;components component=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.0">"//@members.0"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt; <br>
&nbsp;&lt;/components&gt; <br>
- &lt;components component=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.1">"//@members.1"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt; <br>
&nbsp;&lt;/components&gt; <br>
- &lt;components component=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.2">"//@members.2"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt; <br>
&nbsp;&lt;/components&gt; <br>
&nbsp;&lt;/members&gt; <br>
<br>
"Ed Merks" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in
message <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fg9tfg$6lc$4@build.eclipse.org">news:fg9tfg$6lc$4@build.eclipse.org</a>...
<br>
<blockquote type="cite">That string value represents a
reference to an object so in the <br>
deserilized result, you will only have the object being referenced. If <br>
the referenced object is an EObject x, then <br>
x.eResource().getURIFragment(x) will return the string value used to <br>
reference it. <br>
<br>
<br>
zxc wrote: <br>
<blockquote type="cite">yves yang, <br>
<br>
i know the following code , can get the key value "SP01005005" <br>
Entry keyValue = BeanUtilities.getMapEntry(annImpl, <br>
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY) <br>
(String)keyValue.getValue(), <br>
<br>
now i want get annotates=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>
<br>
the String value <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>
how i can get ? <br>
<br>
"Yves YANG" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:yves.yang@soyatec.com">&lt;yves.yang@soyatec.com&gt;</a>
wrote in message <br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fg8mts$vcj$1@build.eclipse.org">news:fg8mts$vcj$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">In the BeanUtilities class, you can
read getBeanName() and <br>
getBeanName() to access the Bean's name; <br>
<br>
yves yang <br>
--- <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.soyatec.com">http://www.soyatec.com</a> <br>
<br>
"zxc" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:caye5200@yahoo.com.cn">&lt;caye5200@yahoo.com.cn&gt;</a>
wrote in message <br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fg8k20$lmp$1@build.eclipse.org">news:fg8k20$lmp$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">Ed Merks, <br>
AnnotationEMFImpl has getAnnotates method too, <br>
i can get a JavaObjectInstance, but i don't know its order, like <br>
&lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF" <br>
annotates=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto://@members.3">"//@members.3"</a>&gt; <br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry" <br>
key="org.eclipse.ve.internal.cde.core.nameincomposition" <br>
value="SP01005005" /&gt; <br>
why VE can know its order "SP01005005" is members.3 <br>
i want to know this annotates's order. <br>
<br>
"Ed Merks" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in
message <br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fg7bfa$ro7$1@build.eclipse.org">news:fg7bfa$ro7$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">I really don't have a good
answer since I don't know VE, but I imagine <br>
you should be casting to AnnotationEMF not AnnotationEMFImpl and I <br>
imagine that AnnotationEMF has a getAnnotates method that will yield <br>
which object is being annotated. I could be wrong, but that's <br>
certainly <br>
what the serialization itself leads me to believe... <br>
<br>
zxc wrote: <br>
<blockquote type="cite">hello, the view.xml following
: <br>
&lt;?xml version="1.0" encoding="ASCII" ?&gt; <br>
&lt;diagrams id="org.eclipse.ve.internal.cdm.primarydiagram" <br>
visualInfos="//@annotations.18/@visualInfos.0 <br>
//@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0 <br>
//@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0 <br>
//@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0 <br>
//@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0 <br>
//@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0 <br>
//@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0 <br>
//@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0 <br>
//@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0 <br>
//@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0 <br>
//@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0 <br>
//@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0 <br>
//@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" /&gt;
<br>
- &lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF" <br>
annotates=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto://@members.14">"//@members.14"</a>&gt; <br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry" <br>
key="org.eclipse.ve.internal.cde.core.nameincomposition" <br>
value="SP01005016" /&gt; <br>
- &lt;visualInfos diagram=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@diagrams.0">"//@diagrams.0"</a>&gt;
<br>
&lt;keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean" <br>
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" <br>
value="true" /&gt; <br>
&lt;/visualInfos&gt; <br>
&lt;/annotations&gt; <br>
- &lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF" <br>
annotates=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto://@members.3">"//@members.3"</a>&gt; <br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry" <br>
key="org.eclipse.ve.internal.cde.core.nameincomposition" <br>
value="SP01005005" /&gt; <br>
- &lt;visualInfos diagram=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@diagrams.0">"//@diagrams.0"</a>&gt;
<br>
&lt;keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean" <br>
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" <br>
value="true" /&gt; <br>
&lt;/visualInfos&gt; <br>
&lt;/annotations&gt; <br>
I hava get the model :lastModel = modelBuilder.getModelRoot(), <br>
but <br>
now i want know the annotates the order ,like SP01005016, members.14, <br>
SP01005005,members.3. <br>
i can get the value,but can not get the annotates ,the code like: <br>
<br>
lastModel = modelBuilder.getModelRoot(); <br>
EList annotations=lastModel.getAnnotations(); <br>
for(int aIndex=0;aIndex&lt;annotations.size();aIndex++){ <br>
AnnotationEMFImpl annImpl=(AnnotationEMFImpl) <br>
annotations.get(aIndex); <br>
EMap keyedValue=annImpl.getKeyedValues(); <br>
String value=(String) <br>
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition "); <br>
} <br>
how i can annotates ? please help me! <br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</body>
</html>

--------------020805000002080105040206--
Re: annotates="//@members.14",how can get? [message #616817 is a reply to message #142438] Tue, 30 October 2007 13:23 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
I think BeanUtilities does the trick.

Yves YANG
---
http://www.soyatec.com

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fg742j$ihc$1@build.eclipse.org...
> hello, the view.xml following :
> <?xml version="1.0" encoding="ASCII" ?>
> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
> visualInfos="//@annotations.18/@visualInfos.0
> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.14">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005016" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true"
> />
> </visualInfos>
> </annotations>
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.3">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005005" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true"
> />
> </visualInfos>
> </annotations>
> I hava get the model :lastModel = modelBuilder.getModelRoot(),
> but
> now i want know the annotates the order ,like SP01005016, members.14,
> SP01005005,members.3.
> i can get the value,but can not get the annotates ,the code like:
>
> lastModel = modelBuilder.getModelRoot();
> EList annotations=lastModel.getAnnotations();
> for(int aIndex=0;aIndex<annotations.size();aIndex++){
> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
> annotations.get(aIndex);
> EMap keyedValue=annImpl.getKeyedValues();
> String value=(String)
> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
> }
> how i can annotates ? please help me!
>
Re: annotates="//@members.14",how can get? [message #616818 is a reply to message #142438] Tue, 30 October 2007 13:26 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33108
Registered: July 2009
Senior Member
I really don't have a good answer since I don't know VE, but I imagine
you should be casting to AnnotationEMF not AnnotationEMFImpl and I
imagine that AnnotationEMF has a getAnnotates method that will yield
which object is being annotated. I could be wrong, but that's certainly
what the serialization itself leads me to believe...

zxc wrote:
> hello, the view.xml following :
> <?xml version="1.0" encoding="ASCII" ?>
> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
> visualInfos="//@annotations.18/@visualInfos.0
> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.14">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005016" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
> value="true" />
> </visualInfos>
> </annotations>
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.3">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005005" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
> value="true" />
> </visualInfos>
> </annotations>
> I hava get the model :lastModel = modelBuilder.getModelRoot(),
> but
> now i want know the annotates the order ,like SP01005016, members.14,
> SP01005005,members.3.
> i can get the value,but can not get the annotates ,the code like:
>
> lastModel = modelBuilder.getModelRoot();
> EList annotations=lastModel.getAnnotations();
> for(int aIndex=0;aIndex<annotations.size();aIndex++){
> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
> EMap keyedValue=annImpl.getKeyedValues();
> String value=(String)
> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
> }
> how i can annotates ? please help me!
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: annotates="//@members.14",how can get? [message #616819 is a reply to message #142438] Tue, 30 October 2007 13:23 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
I think BeanUtilities does the trick.

Yves YANG
---
http://www.soyatec.com

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fg742j$ihc$1@build.eclipse.org...
> hello, the view.xml following :
> <?xml version="1.0" encoding="ASCII" ?>
> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
> visualInfos="//@annotations.18/@visualInfos.0
> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.14">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005016" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true"
> />
> </visualInfos>
> </annotations>
> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.3">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005005" />
> - <visualInfos diagram="//@diagrams.0">
> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" value="true"
> />
> </visualInfos>
> </annotations>
> I hava get the model :lastModel = modelBuilder.getModelRoot(),
> but
> now i want know the annotates the order ,like SP01005016, members.14,
> SP01005005,members.3.
> i can get the value,but can not get the annotates ,the code like:
>
> lastModel = modelBuilder.getModelRoot();
> EList annotations=lastModel.getAnnotations();
> for(int aIndex=0;aIndex<annotations.size();aIndex++){
> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
> annotations.get(aIndex);
> EMap keyedValue=annImpl.getKeyedValues();
> String value=(String)
> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
> }
> how i can annotates ? please help me!
>
Re: annotates="//@members.14",how can get? [message #616820 is a reply to message #142456] Wed, 31 October 2007 00:59 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Ed Merks,
AnnotationEMFImpl has getAnnotates method too,
i can get a JavaObjectInstance, but i don't know its order, like
<annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.3">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="SP01005005" />
why VE can know its order "SP01005005" is members.3
i want to know this annotates's order.

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg7bfa$ro7$1@build.eclipse.org...
>I really don't have a good answer since I don't know VE, but I imagine
> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
> imagine that AnnotationEMF has a getAnnotates method that will yield
> which object is being annotated. I could be wrong, but that's certainly
> what the serialization itself leads me to believe...
>
> zxc wrote:
>> hello, the view.xml following :
>> <?xml version="1.0" encoding="ASCII" ?>
>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>> visualInfos="//@annotations.18/@visualInfos.0
>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>> annotates="//@members.14">
>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>> value="SP01005016" />
>> - <visualInfos diagram="//@diagrams.0">
>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>> value="true" />
>> </visualInfos>
>> </annotations>
>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>> annotates="//@members.3">
>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>> value="SP01005005" />
>> - <visualInfos diagram="//@diagrams.0">
>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>> value="true" />
>> </visualInfos>
>> </annotations>
>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>> but
>> now i want know the annotates the order ,like SP01005016, members.14,
>> SP01005005,members.3.
>> i can get the value,but can not get the annotates ,the code like:
>>
>> lastModel = modelBuilder.getModelRoot();
>> EList annotations=lastModel.getAnnotations();
>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
>> EMap keyedValue=annImpl.getKeyedValues();
>> String value=(String)
>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>> }
>> how i can annotates ? please help me!
>>
>
Re: annotates="//@members.14",how can get? [message #616822 is a reply to message #142474] Wed, 31 October 2007 01:48 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
In the BeanUtilities class, you can read getBeanName() and getBeanName() to
access the Bean's name;

yves yang
---
http://www.soyatec.com

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fg8k20$lmp$1@build.eclipse.org...
> Ed Merks,
> AnnotationEMFImpl has getAnnotates method too,
> i can get a JavaObjectInstance, but i don't know its order, like
> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
> annotates="//@members.3">
> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
> key="org.eclipse.ve.internal.cde.core.nameincomposition"
> value="SP01005005" />
> why VE can know its order "SP01005005" is members.3
> i want to know this annotates's order.
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fg7bfa$ro7$1@build.eclipse.org...
>>I really don't have a good answer since I don't know VE, but I imagine
>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>> imagine that AnnotationEMF has a getAnnotates method that will yield
>> which object is being annotated. I could be wrong, but that's certainly
>> what the serialization itself leads me to believe...
>>
>> zxc wrote:
>>> hello, the view.xml following :
>>> <?xml version="1.0" encoding="ASCII" ?>
>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>> visualInfos="//@annotations.18/@visualInfos.0
>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>> annotates="//@members.14">
>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>> value="SP01005016" />
>>> - <visualInfos diagram="//@diagrams.0">
>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>> value="true" />
>>> </visualInfos>
>>> </annotations>
>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>> annotates="//@members.3">
>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>> value="SP01005005" />
>>> - <visualInfos diagram="//@diagrams.0">
>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>> value="true" />
>>> </visualInfos>
>>> </annotations>
>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>> but
>>> now i want know the annotates the order ,like SP01005016, members.14,
>>> SP01005005,members.3.
>>> i can get the value,but can not get the annotates ,the code like:
>>>
>>> lastModel = modelBuilder.getModelRoot();
>>> EList annotations=lastModel.getAnnotations();
>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
>>> EMap keyedValue=annImpl.getKeyedValues();
>>> String value=(String)
>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>> }
>>> how i can annotates ? please help me!
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #616825 is a reply to message #142494] Wed, 31 October 2007 12:00 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Yves YANG
thank you, can you give me a simple?

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fg8mts$vcj$1@build.eclipse.org...
> In the BeanUtilities class, you can read getBeanName() and getBeanName()
> to access the Bean's name;
>
> yves yang
> ---
> http://www.soyatec.com
>
> "zxc" <caye5200@yahoo.com.cn> wrote in message
> news:fg8k20$lmp$1@build.eclipse.org...
>> Ed Merks,
>> AnnotationEMFImpl has getAnnotates method too,
>> i can get a JavaObjectInstance, but i don't know its order, like
>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>> annotates="//@members.3">
>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>> value="SP01005005" />
>> why VE can know its order "SP01005005" is members.3
>> i want to know this annotates's order.
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>I really don't have a good answer since I don't know VE, but I imagine
>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>> which object is being annotated. I could be wrong, but that's certainly
>>> what the serialization itself leads me to believe...
>>>
>>> zxc wrote:
>>>> hello, the view.xml following :
>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.14">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005016" />
>>>> - <visualInfos diagram="//@diagrams.0">
>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>> value="true" />
>>>> </visualInfos>
>>>> </annotations>
>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.3">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005005" />
>>>> - <visualInfos diagram="//@diagrams.0">
>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>> value="true" />
>>>> </visualInfos>
>>>> </annotations>
>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>> but
>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>> SP01005005,members.3.
>>>> i can get the value,but can not get the annotates ,the code like:
>>>>
>>>> lastModel = modelBuilder.getModelRoot();
>>>> EList annotations=lastModel.getAnnotations();
>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>> String value=(String)
>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>> }
>>>> how i can annotates ? please help me!
>>>>
>>>
>>
>
>
>
Re: annotates="//@members.14",how can get? [message #616826 is a reply to message #142494] Wed, 31 October 2007 12:26 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

yves yang,

i know the following code , can get the key value "SP01005005"
Entry keyValue = BeanUtilities.getMapEntry(annImpl,
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
(String)keyValue.getValue(),

now i want get annotates="//@members.3"
the String value "//@members.3" how i can get ?

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fg8mts$vcj$1@build.eclipse.org...
> In the BeanUtilities class, you can read getBeanName() and getBeanName()
> to access the Bean's name;
>
> yves yang
> ---
> http://www.soyatec.com
>
> "zxc" <caye5200@yahoo.com.cn> wrote in message
> news:fg8k20$lmp$1@build.eclipse.org...
>> Ed Merks,
>> AnnotationEMFImpl has getAnnotates method too,
>> i can get a JavaObjectInstance, but i don't know its order, like
>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>> annotates="//@members.3">
>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>> value="SP01005005" />
>> why VE can know its order "SP01005005" is members.3
>> i want to know this annotates's order.
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>I really don't have a good answer since I don't know VE, but I imagine
>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>> which object is being annotated. I could be wrong, but that's certainly
>>> what the serialization itself leads me to believe...
>>>
>>> zxc wrote:
>>>> hello, the view.xml following :
>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.14">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005016" />
>>>> - <visualInfos diagram="//@diagrams.0">
>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>> value="true" />
>>>> </visualInfos>
>>>> </annotations>
>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.3">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005005" />
>>>> - <visualInfos diagram="//@diagrams.0">
>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>> value="true" />
>>>> </visualInfos>
>>>> </annotations>
>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>> but
>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>> SP01005005,members.3.
>>>> i can get the value,but can not get the annotates ,the code like:
>>>>
>>>> lastModel = modelBuilder.getModelRoot();
>>>> EList annotations=lastModel.getAnnotations();
>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl) annotations.get(aIndex);
>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>> String value=(String)
>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>> }
>>>> how i can annotates ? please help me!
>>>>
>>>
>>
>
>
>
Re: annotates="//@members.14",how can get? [message #616827 is a reply to message #142534] Wed, 31 October 2007 12:46 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33108
Registered: July 2009
Senior Member
That string value represents a reference to an object so in the
deserilized result, you will only have the object being referenced. If
the referenced object is an EObject x, then
x.eResource().getURIFragment(x) will return the string value used to
reference it.


zxc wrote:
> yves yang,
>
> i know the following code , can get the key value "SP01005005"
> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
> (String)keyValue.getValue(),
>
> now i want get annotates="//@members.3"
> the String value "//@members.3" how i can get ?
>
> "Yves YANG" <yves.yang@soyatec.com> wrote in message
> news:fg8mts$vcj$1@build.eclipse.org...
>> In the BeanUtilities class, you can read getBeanName() and
>> getBeanName() to access the Bean's name;
>>
>> yves yang
>> --- http://www.soyatec.com
>>
>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>> news:fg8k20$lmp$1@build.eclipse.org...
>>> Ed Merks,
>>> AnnotationEMFImpl has getAnnotates method too,
>>> i can get a JavaObjectInstance, but i don't know its order, like
>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>> annotates="//@members.3">
>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>> value="SP01005005" />
>>> why VE can know its order "SP01005005" is members.3
>>> i want to know this annotates's order.
>>>
>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>> I really don't have a good answer since I don't know VE, but I imagine
>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>> which object is being annotated. I could be wrong, but that's
>>>> certainly
>>>> what the serialization itself leads me to believe...
>>>>
>>>> zxc wrote:
>>>>> hello, the view.xml following :
>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.14">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005016" />
>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>> value="true" />
>>>>> </visualInfos>
>>>>> </annotations>
>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.3">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005005" />
>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>> value="true" />
>>>>> </visualInfos>
>>>>> </annotations>
>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>> but
>>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>>> SP01005005,members.3.
>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>
>>>>> lastModel = modelBuilder.getModelRoot();
>>>>> EList annotations=lastModel.getAnnotations();
>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>> annotations.get(aIndex);
>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>> String value=(String)
>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>> }
>>>>> how i can annotates ? please help me!
>>>>>
>>>>
>>>
>>
>>
>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: annotates="//@members.14",how can get? [message #616830 is a reply to message #142543] Thu, 01 November 2007 02:28 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Ed Merks,
thank you ,you are right. i have other problem, thisPart can have some
components,
how can get thisPart's components

BeanSubclassCompositionImpl
beanSubclass=(BeanSubclassCompositionImpl)lastModel;
IJavaObjectInstance thisPart= beanSubclass.getThisPart();

i can get thisPart is IJavaObjectInstance , i don't get its components,
i want get component the string value "// @members.5"

- <thisPart xsi:type="usa.axxx:SS01006"
xmi:id="this" size="//@methods.6/@properties.0"
visible=//@methods.6/@properties.3
opaque="//@methods.6/@properties.1"
image="//@methods.6/@properties.2">
<layout xsi:nil="true" />
- <components component="//@members.5">
<constraint xsi:nil="true" />
</components>
</thisPart>

xingchenZhao
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg9tfg$6lc$4@build.eclipse.org...
> That string value represents a reference to an object so in the
> deserilized result, you will only have the object being referenced. If
> the referenced object is an EObject x, then
> x.eResource().getURIFragment(x) will return the string value used to
> reference it.
>
>
> zxc wrote:
>> yves yang,
>>
>> i know the following code , can get the key value "SP01005005"
>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>> (String)keyValue.getValue(),
>>
>> now i want get annotates="//@members.3"
>> the String value "//@members.3" how i can get ?
>>
>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>> news:fg8mts$vcj$1@build.eclipse.org...
>>> In the BeanUtilities class, you can read getBeanName() and
>>> getBeanName() to access the Bean's name;
>>>
>>> yves yang
>>> --- http://www.soyatec.com
>>>
>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>> Ed Merks,
>>>> AnnotationEMFImpl has getAnnotates method too,
>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.3">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005005" />
>>>> why VE can know its order "SP01005005" is members.3
>>>> i want to know this annotates's order.
>>>>
>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>> I really don't have a good answer since I don't know VE, but I imagine
>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>> which object is being annotated. I could be wrong, but that's
>>>>> certainly
>>>>> what the serialization itself leads me to believe...
>>>>>
>>>>> zxc wrote:
>>>>>> hello, the view.xml following :
>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.14">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005016" />
>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>> value="true" />
>>>>>> </visualInfos>
>>>>>> </annotations>
>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.3">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005005" />
>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>> value="true" />
>>>>>> </visualInfos>
>>>>>> </annotations>
>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>> but
>>>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>>>> SP01005005,members.3.
>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>
>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>> annotations.get(aIndex);
>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>> String value=(String)
>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>> }
>>>>>> how i can annotates ? please help me!
>>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #616831 is a reply to message #142543] Thu, 01 November 2007 03:46 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

- Ed Merks,
this members is Panel, its have 3 component , button, image, lable,
and its have a bounds property , these message ,how i can get by
Model?

<members xsi:type="com.ce_cube.parts.standard:CEPanel"
bounds="//@methods.0/@properties.0">
- <allocation
xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
<expression
xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
type="com.ce_cube.parts.standard.CEPanel" />
</allocation>
- <components component="//@members.0">
<constraint xsi:nil="true" />
</components>
- <components component="//@members.1">
<constraint xsi:nil="true" />
</components>
- <components component="//@members.2">
<constraint xsi:nil="true" />
</components>
</members>

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg9tfg$6lc$4@build.eclipse.org...
> That string value represents a reference to an object so in the
> deserilized result, you will only have the object being referenced. If
> the referenced object is an EObject x, then
> x.eResource().getURIFragment(x) will return the string value used to
> reference it.
>
>
> zxc wrote:
>> yves yang,
>>
>> i know the following code , can get the key value "SP01005005"
>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>> (String)keyValue.getValue(),
>>
>> now i want get annotates="//@members.3"
>> the String value "//@members.3" how i can get ?
>>
>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>> news:fg8mts$vcj$1@build.eclipse.org...
>>> In the BeanUtilities class, you can read getBeanName() and
>>> getBeanName() to access the Bean's name;
>>>
>>> yves yang
>>> --- http://www.soyatec.com
>>>
>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>> Ed Merks,
>>>> AnnotationEMFImpl has getAnnotates method too,
>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>> annotates="//@members.3">
>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>> value="SP01005005" />
>>>> why VE can know its order "SP01005005" is members.3
>>>> i want to know this annotates's order.
>>>>
>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>> I really don't have a good answer since I don't know VE, but I imagine
>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>> which object is being annotated. I could be wrong, but that's
>>>>> certainly
>>>>> what the serialization itself leads me to believe...
>>>>>
>>>>> zxc wrote:
>>>>>> hello, the view.xml following :
>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.14">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005016" />
>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>> value="true" />
>>>>>> </visualInfos>
>>>>>> </annotations>
>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.3">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005005" />
>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>> value="true" />
>>>>>> </visualInfos>
>>>>>> </annotations>
>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>> but
>>>>>> now i want know the annotates the order ,like SP01005016, members.14,
>>>>>> SP01005005,members.3.
>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>
>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>> annotations.get(aIndex);
>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>> String value=(String)
>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>> }
>>>>>> how i can annotates ? please help me!
>>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #616832 is a reply to message #142572] Thu, 01 November 2007 09:31 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
Call eGet("components"). You will get a lst of IJavaInstance. Afterwards,
you call eGet(JFCConstants.SF_CONSTRAINT_COMPONENT) for each element.

Yves YANG
---
http://www.soyatec.com
"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fgbdln$8tb$1@build.eclipse.org...
> Ed Merks,
> thank you ,you are right. i have other problem, thisPart can have some
> components,
> how can get thisPart's components
>
> BeanSubclassCompositionImpl
> beanSubclass=(BeanSubclassCompositionImpl)lastModel;
> IJavaObjectInstance thisPart= beanSubclass.getThisPart();
>
> i can get thisPart is IJavaObjectInstance , i don't get its components,
> i want get component the string value "// @members.5"
>
> - <thisPart xsi:type="usa.axxx:SS01006"
> xmi:id="this" size="//@methods.6/@properties.0"
> visible=//@methods.6/@properties.3
> opaque="//@methods.6/@properties.1"
> image="//@methods.6/@properties.2">
> <layout xsi:nil="true" />
> - <components component="//@members.5">
> <constraint xsi:nil="true" />
> </components>
> </thisPart>
>
> xingchenZhao
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fg9tfg$6lc$4@build.eclipse.org...
>> That string value represents a reference to an object so in the
>> deserilized result, you will only have the object being referenced. If
>> the referenced object is an EObject x, then
>> x.eResource().getURIFragment(x) will return the string value used to
>> reference it.
>>
>>
>> zxc wrote:
>>> yves yang,
>>>
>>> i know the following code , can get the key value "SP01005005"
>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>> (String)keyValue.getValue(),
>>>
>>> now i want get annotates="//@members.3"
>>> the String value "//@members.3" how i can get ?
>>>
>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>> In the BeanUtilities class, you can read getBeanName() and
>>>> getBeanName() to access the Bean's name;
>>>>
>>>> yves yang
>>>> --- http://www.soyatec.com
>>>>
>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>> Ed Merks,
>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.3">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005005" />
>>>>> why VE can know its order "SP01005005" is members.3
>>>>> i want to know this annotates's order.
>>>>>
>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>> I really don't have a good answer since I don't know VE, but I
>>>>>> imagine
>>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>>> which object is being annotated. I could be wrong, but that's
>>>>>> certainly
>>>>>> what the serialization itself leads me to believe...
>>>>>>
>>>>>> zxc wrote:
>>>>>>> hello, the view.xml following :
>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.14">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005016" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.3">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005005" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>>> but
>>>>>>> now i want know the annotates the order ,like SP01005016,
>>>>>>> members.14,
>>>>>>> SP01005005,members.3.
>>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>>
>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>> annotations.get(aIndex);
>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>> String value=(String)
>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>> }
>>>>>>> how i can annotates ? please help me!
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #616833 is a reply to message #142579] Thu, 01 November 2007 09:35 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
See my response above .

Best regards
Yves YANG
---
http://www.soyatec.com/

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fgbi7n$nbb$1@build.eclipse.org...
>- Ed Merks,
> this members is Panel, its have 3 component , button, image, lable,
> and its have a bounds property , these message ,how i can get by
> Model?
>
> <members xsi:type="com.ce_cube.parts.standard:CEPanel"
> bounds="//@methods.0/@properties.0">
> - <allocation
> xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
> <expression
> xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
> type="com.ce_cube.parts.standard.CEPanel" />
> </allocation>
> - <components component="//@members.0">
> <constraint xsi:nil="true" />
> </components>
> - <components component="//@members.1">
> <constraint xsi:nil="true" />
> </components>
> - <components component="//@members.2">
> <constraint xsi:nil="true" />
> </components>
> </members>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fg9tfg$6lc$4@build.eclipse.org...
>> That string value represents a reference to an object so in the
>> deserilized result, you will only have the object being referenced. If
>> the referenced object is an EObject x, then
>> x.eResource().getURIFragment(x) will return the string value used to
>> reference it.
>>
>>
>> zxc wrote:
>>> yves yang,
>>>
>>> i know the following code , can get the key value "SP01005005"
>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>> (String)keyValue.getValue(),
>>>
>>> now i want get annotates="//@members.3"
>>> the String value "//@members.3" how i can get ?
>>>
>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>> In the BeanUtilities class, you can read getBeanName() and
>>>> getBeanName() to access the Bean's name;
>>>>
>>>> yves yang
>>>> --- http://www.soyatec.com
>>>>
>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>> Ed Merks,
>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.3">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005005" />
>>>>> why VE can know its order "SP01005005" is members.3
>>>>> i want to know this annotates's order.
>>>>>
>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>> I really don't have a good answer since I don't know VE, but I
>>>>>> imagine
>>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>>> which object is being annotated. I could be wrong, but that's
>>>>>> certainly
>>>>>> what the serialization itself leads me to believe...
>>>>>>
>>>>>> zxc wrote:
>>>>>>> hello, the view.xml following :
>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" />
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.14">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005016" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.3">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005005" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>>> but
>>>>>>> now i want know the annotates the order ,like SP01005016,
>>>>>>> members.14,
>>>>>>> SP01005005,members.3.
>>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>>
>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>> annotations.get(aIndex);
>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>> String value=(String)
>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>> }
>>>>>>> how i can annotates ? please help me!
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>
Re: annotates="//@members.14",how can get? [message #616834 is a reply to message #142590] Thu, 01 November 2007 10:31 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

which Object call eGet(); my code is following ,Can you write to me?
i don' t understand.the argument "JFCConstants.SF_CONSTRAINT_COMPONENT"
eGet() method not support

lastModel = modelBuilder.getModelRoot();
BeanSubclassCompositionImpl beanSubclass=
(BeanSubclassCompositionImpl)lastModel;
EList annotations=lastModel.getAnnotations();
EList components=beanSubclass.getComponents();
EList members=beanSubclass.getMembers();
EList methods=beanSubclass.getMethods();

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fgc6dj$cht$1@build.eclipse.org...
> Call eGet("components"). You will get a lst of IJavaInstance. Afterwards,
> you call eGet(JFCConstants.SF_CONSTRAINT_COMPONENT) for each element.
>
> Yves YANG
> ---
> http://www.soyatec.com
> "zxc" <caye5200@yahoo.com.cn> wrote in message
> news:fgbdln$8tb$1@build.eclipse.org...
>> Ed Merks,
>> thank you ,you are right. i have other problem, thisPart can have some
>> components,
>> how can get thisPart's components
>>
>> BeanSubclassCompositionImpl
>> beanSubclass=(BeanSubclassCompositionImpl)lastModel;
>> IJavaObjectInstance thisPart= beanSubclass.getThisPart();
>>
>> i can get thisPart is IJavaObjectInstance , i don't get its components,
>> i want get component the string value "// @members.5"
>>
>> - <thisPart xsi:type="usa.axxx:SS01006"
>> xmi:id="this" size="//@methods.6/@properties.0"
>> visible=//@methods.6/@properties.3
>> opaque="//@methods.6/@properties.1"
>> image="//@methods.6/@properties.2">
>> <layout xsi:nil="true" />
>> - <components component="//@members.5">
>> <constraint xsi:nil="true" />
>> </components>
>> </thisPart>
>>
>> xingchenZhao
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fg9tfg$6lc$4@build.eclipse.org...
>>> That string value represents a reference to an object so in the
>>> deserilized result, you will only have the object being referenced. If
>>> the referenced object is an EObject x, then
>>> x.eResource().getURIFragment(x) will return the string value used to
>>> reference it.
>>>
>>>
>>> zxc wrote:
>>>> yves yang,
>>>>
>>>> i know the following code , can get the key value "SP01005005"
>>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>>> (String)keyValue.getValue(),
>>>>
>>>> now i want get annotates="//@members.3"
>>>> the String value "//@members.3" how i can get ?
>>>>
>>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>>> In the BeanUtilities class, you can read getBeanName() and
>>>>> getBeanName() to access the Bean's name;
>>>>>
>>>>> yves yang
>>>>> --- http://www.soyatec.com
>>>>>
>>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>>> Ed Merks,
>>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.3">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005005" />
>>>>>> why VE can know its order "SP01005005" is members.3
>>>>>> i want to know this annotates's order.
>>>>>>
>>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>>> I really don't have a good answer since I don't know VE, but I
>>>>>>> imagine
>>>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>>>> which object is being annotated. I could be wrong, but that's
>>>>>>> certainly
>>>>>>> what the serialization itself leads me to believe...
>>>>>>>
>>>>>>> zxc wrote:
>>>>>>>> hello, the view.xml following :
>>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>>>> //@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0"
>>>>>>>> />
>>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>>> annotates="//@members.14">
>>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>>> value="SP01005016" />
>>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>>> value="true" />
>>>>>>>> </visualInfos>
>>>>>>>> </annotations>
>>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>>> annotates="//@members.3">
>>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>>> value="SP01005005" />
>>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>>> value="true" />
>>>>>>>> </visualInfos>
>>>>>>>> </annotations>
>>>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>>>> but
>>>>>>>> now i want know the annotates the order ,like SP01005016,
>>>>>>>> members.14,
>>>>>>>> SP01005005,members.3.
>>>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>>>
>>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>>> annotations.get(aIndex);
>>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>>> String value=(String)
>>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>>> }
>>>>>>>> how i can annotates ? please help me!
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>
>
Re: annotates="//@members.14",how can get? [message #616837 is a reply to message #142579] Thu, 01 November 2007 11:51 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33108
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060005040107090704020405
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

I think VE is making heavy use of dynamic Ecore models so this article
will give a bit of background that might help:

Discover the Eclipse Modeling Framework (EMF) and Its Dynamic
Capabilities <http://www.devx.com/Java/Article/29093/0/page/1>

In general, for an EObject x, you can do
x.eClass().getEAllStructuralFeatures(), and then for each of those, you
can do x.eGet(feature) to access all the data available for x. Of course
if there is a generate API for x, you can just cast to that interface
and call the getters...


zxc wrote:
> - Ed Merks,
> this members is Panel, its have 3 component , button, image, lable,
> and its have a bounds property , these message ,how i can get by Model?
>
> <members xsi:type="com.ce_cube.parts.standard:CEPanel"
> bounds="//@methods.0/@properties.0">
> - <allocation
> xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
> <expression
> xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
> type="com.ce_cube.parts.standard.CEPanel" />
> </allocation>
> - <components component="//@members.0">
> <constraint xsi:nil="true" />
> </components>
> - <components component="//@members.1">
> <constraint xsi:nil="true" />
> </components>
> - <components component="//@members.2">
> <constraint xsi:nil="true" />
> </components>
> </members>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fg9tfg$6lc$4@build.eclipse.org...
>> That string value represents a reference to an object so in the
>> deserilized result, you will only have the object being referenced. If
>> the referenced object is an EObject x, then
>> x.eResource().getURIFragment(x) will return the string value used to
>> reference it.
>>
>>
>> zxc wrote:
>>> yves yang,
>>>
>>> i know the following code , can get the key value "SP01005005"
>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>> (String)keyValue.getValue(),
>>>
>>> now i want get annotates="//@members.3"
>>> the String value "//@members.3" how i can get ?
>>>
>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>> In the BeanUtilities class, you can read getBeanName() and
>>>> getBeanName() to access the Bean's name;
>>>>
>>>> yves yang
>>>> --- http://www.soyatec.com
>>>>
>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>> Ed Merks,
>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>> i can get a JavaObjectInstance, but i don't know its order, like
>>>>> <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>> annotates="//@members.3">
>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>> value="SP01005005" />
>>>>> why VE can know its order "SP01005005" is members.3
>>>>> i want to know this annotates's order.
>>>>>
>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>> I really don't have a good answer since I don't know VE, but I
>>>>>> imagine
>>>>>> you should be casting to AnnotationEMF not AnnotationEMFImpl and I
>>>>>> imagine that AnnotationEMF has a getAnnotates method that will yield
>>>>>> which object is being annotated. I could be wrong, but that's
>>>>>> certainly
>>>>>> what the serialization itself leads me to believe...
>>>>>>
>>>>>> zxc wrote:
>>>>>>> hello, the view.xml following :
>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>> //@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
>>>>>>> //@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
>>>>>>> //@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
>>>>>>> //@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
>>>>>>> //@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
>>>>>>> //@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
>>>>>>> //@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
>>>>>>> //@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
>>>>>>> //@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
>>>>>>> //@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
>>>>>>> //@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
>>>>>>> //@annotations.0/@visualInfos.0
>>>>>>> //@annotations.25/@visualInfos.0" />
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.14">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005016" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> - <annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>> annotates="//@members.3">
>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>> value="SP01005005" />
>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>> <keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>> value="true" />
>>>>>>> </visualInfos>
>>>>>>> </annotations>
>>>>>>> I hava get the model :lastModel = modelBuilder.getModelRoot(),
>>>>>>> but
>>>>>>> now i want know the annotates the order ,like SP01005016,
>>>>>>> members.14,
>>>>>>> SP01005005,members.3.
>>>>>>> i can get the value,but can not get the annotates ,the code like:
>>>>>>>
>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>> annotations.get(aIndex);
>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>> String value=(String)
>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>>
>>>>>>> }
>>>>>>> how i can annotates ? please help me!
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>


--------------060005040107090704020405
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-2022-JP"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I think VE is making heavy use of dynamic Ecore models so this article
will give a bit of background that might help:<br>
<blockquote><a target="_out"
href="http://www.devx.com/Java/Article/29093/0/page/1">Discover the
Eclipse Modeling Framework (EMF) and Its Dynamic Capabilities</a><br>
</blockquote>
In general, for an EObject x, you can do
x.eClass().getEAllStructuralFeatures(), and then for each of those, you
can do x.eGet(feature) to access all the data available for x.&nbsp;&nbsp; Of
course if there is a generate API for x, you can just cast to that
interface and call the getters...<br>
<br>
<br>
zxc wrote:
<blockquote cite="mid:fgbi7n$nbb$1@build.eclipse.org" type="cite">- Ed
Merks,
<br>
&nbsp;&nbsp;&nbsp; this members is Panel, its have 3 component , button, image, lable,
<br>
&nbsp;&nbsp;&nbsp; and its have a bounds property , these message ,how i can get&nbsp; by
Model?
<br>
<br>
&lt;members xsi:type="com.ce_cube.parts.standard:CEPanel"
bounds=<a class="moz-txt-link-rfc2396E" href="mailto://@methods.0/@properties.0">"//@methods.0/@properties.0"</a>&gt;
<br>
- &lt;allocation
xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation "&gt;
<br>
&nbsp;&lt;expression
xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
type="com.ce_cube.parts.standard.CEPanel" /&gt;
<br>
&nbsp;&lt;/allocation&gt;
<br>
- &lt;components component=<a class="moz-txt-link-rfc2396E" href="mailto://@members.0">"//@members.0"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt;
<br>
&nbsp;&lt;/components&gt;
<br>
- &lt;components component=<a class="moz-txt-link-rfc2396E" href="mailto://@members.1">"//@members.1"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt;
<br>
&nbsp;&lt;/components&gt;
<br>
- &lt;components component=<a class="moz-txt-link-rfc2396E" href="mailto://@members.2">"//@members.2"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt;
<br>
&nbsp;&lt;/components&gt;
<br>
&nbsp;&lt;/members&gt;
<br>
<br>
"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:fg9tfg$6lc$4@build.eclipse.org">news:fg9tfg$6lc$4@build.eclipse.org</a>...
<br>
<blockquote type="cite">That string value represents a reference to
an object so in the
<br>
deserilized result, you will only have the object being referenced. If
<br>
the referenced object is an EObject x, then
<br>
x.eResource().getURIFragment(x) will return the string value used to
<br>
reference it.
<br>
<br>
<br>
zxc wrote:
<br>
<blockquote type="cite">yves yang,
<br>
<br>
i know the following code , can get the key value "SP01005005"
<br>
Entry keyValue = BeanUtilities.getMapEntry(annImpl,
<br>
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
<br>
(String)keyValue.getValue(),
<br>
<br>
now i want get annotates=<a class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>
<br>
the String value <a class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a> how i can get ?
<br>
<br>
"Yves YANG" <a class="moz-txt-link-rfc2396E" href="mailto:yves.yang@soyatec.com">&lt;yves.yang@soyatec.com&gt;</a> wrote in message
<br>
<a class="moz-txt-link-freetext" href="news:fg8mts$vcj$1@build.eclipse.org">news:fg8mts$vcj$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">In the BeanUtilities class, you can read
getBeanName() and
<br>
getBeanName() to access the Bean's name;
<br>
<br>
yves yang
<br>
--- <a class="moz-txt-link-freetext" href="http://www.soyatec.com">http://www.soyatec.com</a>
<br>
<br>
"zxc" <a class="moz-txt-link-rfc2396E" href="mailto:caye5200@yahoo.com.cn">&lt;caye5200@yahoo.com.cn&gt;</a> wrote in message
<br>
<a class="moz-txt-link-freetext" href="news:fg8k20$lmp$1@build.eclipse.org">news:fg8k20$lmp$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">Ed Merks,
<br>
AnnotationEMFImpl has getAnnotates method too,
<br>
i can get a JavaObjectInstance, but i don't know its order, like
<br>
&lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
<br>
annotates=<a class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>&gt;
<br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry"
<br>
key="org.eclipse.ve.internal.cde.core.nameincomposition"
<br>
value="SP01005005" /&gt;
<br>
why VE can know its order "SP01005005" is members.3
<br>
i want to know this annotates's order.
<br>
<br>
"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in message
<br>
<a class="moz-txt-link-freetext" href="news:fg7bfa$ro7$1@build.eclipse.org">news:fg7bfa$ro7$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">I really don't have a good answer
since I don't know VE, but I imagine
<br>
you should be casting to AnnotationEMF not AnnotationEMFImpl and I
<br>
imagine that AnnotationEMF has a getAnnotates method that will yield
<br>
which object is being annotated. I could be wrong, but that's
<br>
certainly
<br>
what the serialization itself leads me to believe...
<br>
<br>
zxc wrote:
<br>
<blockquote type="cite">hello, the view.xml following :
<br>
&lt;?xml version="1.0" encoding="ASCII" ?&gt;
<br>
&lt;diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
<br>
visualInfos="//@annotations.18/@visualInfos.0
<br>
//@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0
<br>
//@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0
<br>
//@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0
<br>
//@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0
<br>
//@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0
<br>
//@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0
<br>
//@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0
<br>
//@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0
<br>
//@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0
<br>
//@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0
<br>
//@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0
<br>
//@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" /&gt;
<br>
- &lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
<br>
annotates=<a class="moz-txt-link-rfc2396E" href="mailto://@members.14">"//@members.14"</a>&gt;
<br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry"
<br>
key="org.eclipse.ve.internal.cde.core.nameincomposition"
<br>
value="SP01005016" /&gt;
<br>
- &lt;visualInfos diagram=<a class="moz-txt-link-rfc2396E" href="mailto://@diagrams.0">"//@diagrams.0"</a>&gt;
<br>
&lt;keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
<br>
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
<br>
value="true" /&gt;
<br>
&lt;/visualInfos&gt;
<br>
&lt;/annotations&gt;
<br>
- &lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
<br>
annotates=<a class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>&gt;
<br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry"
<br>
key="org.eclipse.ve.internal.cde.core.nameincomposition"
<br>
value="SP01005005" /&gt;
<br>
- &lt;visualInfos diagram=<a class="moz-txt-link-rfc2396E" href="mailto://@diagrams.0">"//@diagrams.0"</a>&gt;
<br>
&lt;keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
<br>
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
<br>
value="true" /&gt;
<br>
&lt;/visualInfos&gt;
<br>
&lt;/annotations&gt;
<br>
I hava get the model :lastModel = modelBuilder.getModelRoot(),
<br>
but
<br>
now i want know the annotates the order ,like SP01005016, members.14,
<br>
SP01005005,members.3.
<br>
i can get the value,but can not get the annotates ,the code like:
<br>
<br>
lastModel = modelBuilder.getModelRoot();
<br>
EList annotations=lastModel.getAnnotations();
<br>
for(int aIndex=0;aIndex&lt;annotations.size();aIndex++){
<br>
AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
<br>
annotations.get(aIndex);
<br>
EMap keyedValue=annImpl.getKeyedValues();
<br>
String value=(String)
<br>
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
<br>
}
<br>
how i can annotates ? please help me!
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>

--------------060005040107090704020405--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: annotates="//@members.14",how can get? [message #616842 is a reply to message #142636] Fri, 02 November 2007 02:23 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

This is a multi-part message in MIME format.

------=_NextPart_000_003F_01C81D3A.7B8E2140
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit

Ed Merks
Yes, your way can get members's attribute, but it not get members's
components list
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fgcefn$ftd$2@build.eclipse.org...
I think VE is making heavy use of dynamic Ecore models so this article
will give a bit of background that might help:

Discover the Eclipse Modeling Framework (EMF) and Its Dynamic
Capabilities

In general, for an EObject x, you can do
x.eClass().getEAllStructuralFeatures(), and then for each of those, you can
do x.eGet(feature) to access all the data available for x. Of course if
there is a generate API for x, you can just cast to that interface and call
the getters...


zxc wrote:
- Ed Merks,
this members is Panel, its have 3 component , button, image, lable,
and its have a bounds property , these message ,how i can get by
Model?

<members xsi:type="com.ce_cube.parts.standard:CEPanel"
bounds="//@methods.0/@properties.0">
- <allocation
xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
<expression
xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
type="com.ce_cube.parts.standard.CEPanel" />
</allocation>
- <components component="//@members.0">
<constraint xsi:nil="true" />
</components>
- <components component="//@members.1">
<constraint xsi:nil="true" />
</components>
- <components component="//@members.2">
<constraint xsi:nil="true" />
</components>
</members>

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg9tfg$6lc$4@build.eclipse.org...

That string value represents a reference to an object so in the
deserilized result, you will only have the object being referenced. If
the referenced object is an EObject x, then
x.eResource().getURIFragment(x) will return the string value used to
reference it.


zxc wrote:

yves yang,

i know the following code , can get the key value "SP01005005"
Entry keyValue = BeanUtilities.getMapEntry(annImpl,
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
(String)keyValue.getValue(),

now i want get annotates="//@members.3"
the String value "//@members.3" how i can get ?

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fg8mts$vcj$1@build.eclipse.org...

In the BeanUtilities class, you can read getBeanName() and
getBeanName() to access the Bean's name;

yves yang
--- http://www.soyatec.com

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fg8k20$lmp$1@build.eclipse.org...

Ed Merks,
AnnotationEMFImpl has getAnnotates method too,
i can get a JavaObjectInstance, but i don't know its order, like
<annotations
xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.3">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="SP01005005" />
why VE can know its order "SP01005005" is members.3
i want to know this annotates's order.

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fg7bfa$ro7$1@build.eclipse.org...

I really don't have a good answer since I don't know VE, but I
imagine
you should be casting to AnnotationEMF not AnnotationEMFImpl
and I
imagine that AnnotationEMF has a getAnnotates method that will
yield
which object is being annotated. I could be wrong, but that's
certainly
what the serialization itself leads me to believe...

zxc wrote:

hello, the view.xml following :
<?xml version="1.0" encoding="ASCII" ?>
<diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
visualInfos="//@annotations.18/@visualInfos.0
//@annotations.24/@visualInfos.0
//@annotations.23/@visualInfos.0
//@annotations.8/@visualInfos.0
//@annotations.3/@visualInfos.0
//@annotations.6/@visualInfos.0
//@annotations.22/@visualInfos.0
//@annotations.19/@visualInfos.0
//@annotations.16/@visualInfos.0
//@annotations.15/@visualInfos.0
//@annotations.12/@visualInfos.0
//@annotations.10/@visualInfos.0
//@annotations.9/@visualInfos.0
//@annotations.7/@visualInfos.0
//@annotations.1/@visualInfos.0
//@annotations.21/@visualInfos.0
//@annotations.17/@visualInfos.0
//@annotations.14/@visualInfos.0
//@annotations.13/@visualInfos.0
//@annotations.11/@visualInfos.0
//@annotations.5/@visualInfos.0
//@annotations.4/@visualInfos.0
//@annotations.2/@visualInfos.0
//@annotations.0/@visualInfos.0
//@annotations.25/@visualInfos.0" />
- <annotations
xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.14">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="SP01005016" />
- <visualInfos diagram="//@diagrams.0">
<keyedValues
xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
value="true" />
</visualInfos>
</annotations>
- <annotations
xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
annotates="//@members.3">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="SP01005005" />
- <visualInfos diagram="//@diagrams.0">
<keyedValues
xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
value="true" />
</visualInfos>
</annotations>
I hava get the model :lastModel =
modelBuilder.getModelRoot(),
but
now i want know the annotates the order ,like SP01005016,
members.14,
SP01005005,members.3.
i can get the value,but can not get the annotates ,the code
like:

lastModel = modelBuilder.getModelRoot();
EList annotations=lastModel.getAnnotations();
for(int aIndex=0;aIndex<annotations.size();aIndex++){
AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
annotations.get(aIndex);
EMap keyedValue=annImpl.getKeyedValues();
String value=(String)
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
}
how i can annotates ? please help me!


















------=_NextPart_000_003F_01C81D3A.7B8E2140
Content-Type: text/html;
charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-2022-JP>
<META content=3D"MSHTML 6.00.2900.3199" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3D"MS UI Gothic" size=3D2>&nbsp; <FONT size=3D3>Ed=20
Merks</FONT></FONT></DIV>
<DIV><FONT face=3D"MS UI Gothic">&nbsp; Yes, your way can get members's =
attribute,=20
but&nbsp;it &nbsp;not get members's components list</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:fgcefn$ftd$2@build.eclipse.org">news:fgcefn$ftd$2@build.ecli=
pse.org</A>...</DIV>I=20
think VE is making heavy use of dynamic Ecore models so this article =
will give=20
a bit of background that might help:<BR>
<BLOCKQUOTE><A =
href=3D"http://www.devx.com/Java/Article/29093/0/page/1"=20
target=3D_out>Discover the Eclipse Modeling Framework (EMF) and Its =
Dynamic=20
Capabilities</A><BR></BLOCKQUOTE>In general, for an EObject x, you =
can do=20
x.eClass().getEAllStructuralFeatures(), and then for each of those, =
you can do=20
x.eGet(feature) to access all the data available for x.&nbsp;&nbsp; Of =
course=20
if there is a generate API for x, you can just cast to that interface =
and call=20
the getters...<BR><BR><BR>zxc wrote:=20
<BLOCKQUOTE cite=3Dmid:fgbi7n$nbb$1@build.eclipse.org type=3D"cite">- =
Ed Merks,=20
<BR>&nbsp;&nbsp;&nbsp; this members is Panel, its have 3 component , =
button,=20
image, lable, <BR>&nbsp;&nbsp;&nbsp; and its have a bounds property =
, these=20
message ,how i can get&nbsp; by Model? <BR><BR>&lt;members=20
xsi:type=3D"com.ce_cube.parts.standard:CEPanel" bounds=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto://@methods.0/@properties.0">"//@methods.0/@properties.0"</=
A>&gt;=20
<BR>- &lt;allocation=20
=
xsi:type=3D"org.eclipse.jem.internal.instantiation:ParseTreeAllocation "&g=
t;=20
<BR>&nbsp;&lt;expression=20
=
xsi:type=3D" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati o=
n"=20
type=3D"com.ce_cube.parts.standard.CEPanel" /&gt;=20
<BR>&nbsp;&lt;/allocation&gt; <BR>- &lt;components component=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.0">"//@members.0"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt; <BR>- =
&lt;components=20
component=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.1">"//@members.1"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt; <BR>- =
&lt;components=20
component=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.2">"//@members.2"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt;=20
<BR>&nbsp;&lt;/members&gt; <BR><BR>"Ed Merks" <A =
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> wrote =
in message=20
<A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg9tfg$6lc$4@build.eclipse.org">news:fg9tfg$6lc$4@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">That string value represents a reference =
to an=20
object so in the <BR>deserilized result, you will only have the =
object=20
being referenced. If <BR>the referenced object is an EObject x, =
then=20
<BR>x.eResource().getURIFragment(x) will return the string value =
used to=20
<BR>reference it. <BR><BR><BR>zxc wrote: <BR>
<BLOCKQUOTE type=3D"cite">yves yang, <BR><BR>i know the following =
code ,=20
can get the key value "SP01005005" <BR>Entry keyValue =3D=20
BeanUtilities.getMapEntry(annImpl,=20
<BR> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY) =

<BR>(String)keyValue.getValue(), <BR><BR>now i want get =
annotates=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A> <BR>the String =
value <A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A> how i can get ?=20
<BR><BR>"Yves YANG" <A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:yves.yang@soyatec.com">&lt;yves.yang@soyatec.com&gt;</A>=20
wrote in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg8mts$vcj$1@build.eclipse.org">news:fg8mts$vcj$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">In the BeanUtilities class, you can =
read=20
getBeanName() and <BR>getBeanName() to access the Bean's name; =

<BR><BR>yves yang <BR>--- <A class=3Dmoz-txt-link-freetext=20
href=3D"http://www.soyatec.com">http://www.soyatec.com</A> =
<BR><BR>"zxc"=20
<A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:caye5200@yahoo.com.cn">&lt;caye5200@yahoo.com.cn&gt;</A>=20
wrote in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg8k20$lmp$1@build.eclipse.org">news:fg8k20$lmp$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">Ed Merks, <BR>AnnotationEMFImpl has=20
getAnnotates method too, <BR>i can get a JavaObjectInstance, =
but i=20
don't know its order, like <BR>&lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005005" /&gt; <BR>why VE can know its order =

"SP01005005" is members.3 <BR>i want to know this =
annotates's order.=20
<BR><BR>"Ed Merks" <A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> wrote in=20
message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg7bfa$ro7$1@build.eclipse.org">news:fg7bfa$ro7$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">I really don't have a good answer =
since I=20
don't know VE, but I imagine <BR>you should be casting to=20
AnnotationEMF not AnnotationEMFImpl and I <BR>imagine that =

AnnotationEMF has a getAnnotates method that will yield =
<BR>which=20
object is being annotated. I could be wrong, but that's=20
<BR>certainly <BR>what the serialization itself leads me =
to=20
believe... <BR><BR>zxc wrote: <BR>
<BLOCKQUOTE type=3D"cite">hello, the view.xml following :=20
<BR>&lt;?xml version=3D"1.0" encoding=3D"ASCII" ?&gt;=20
<BR>&lt;diagrams =
id=3D"org.eclipse.ve.internal.cdm.primarydiagram"=20
<BR>visualInfos=3D"//@annotations.18/@visualInfos.0=20
<BR>//@annotations.24/@visualInfos.0=20
//@annotations.23/@visualInfos.0=20
<BR>//@annotations.8/@visualInfos.0=20
//@annotations.3/@visualInfos.0=20
<BR>//@annotations.6/@visualInfos.0=20
//@annotations.22/@visualInfos.0=20
<BR>//@annotations.19/@visualInfos.0=20
//@annotations.16/@visualInfos.0=20
<BR>//@annotations.15/@visualInfos.0=20
//@annotations.12/@visualInfos.0=20
<BR>//@annotations.10/@visualInfos.0=20
//@annotations.9/@visualInfos.0=20
<BR>//@annotations.7/@visualInfos.0=20
//@annotations.1/@visualInfos.0=20
<BR>//@annotations.21/@visualInfos.0=20
//@annotations.17/@visualInfos.0=20
<BR>//@annotations.14/@visualInfos.0=20
//@annotations.13/@visualInfos.0=20
<BR>//@annotations.11/@visualInfos.0=20
//@annotations.5/@visualInfos.0=20
<BR>//@annotations.4/@visualInfos.0=20
//@annotations.2/@visualInfos.0=20
<BR>//@annotations.0/@visualInfos.0=20
//@annotations.25/@visualInfos.0" /&gt; <BR>- =
&lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.14">"//@members.14"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005016" /&gt; <BR>- &lt;visualInfos =
diagram=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@diagrams.0">"//@diagrams.0"</A>&gt;=20
<BR>&lt;keyedValues=20
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
<BR>key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
<BR>value=3D"true" /&gt; <BR>&lt;/visualInfos&gt;=20
<BR>&lt;/annotations&gt; <BR>- &lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005005" /&gt; <BR>- &lt;visualInfos =
diagram=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@diagrams.0">"//@diagrams.0"</A>&gt;=20
<BR>&lt;keyedValues=20
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
<BR>key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
<BR>value=3D"true" /&gt; <BR>&lt;/visualInfos&gt;=20
<BR>&lt;/annotations&gt; <BR>I hava get the model =
:lastModel =3D=20
modelBuilder.getModelRoot(), <BR>but <BR>now i want know =
the=20
annotates the order ,like SP01005016, members.14,=20
<BR>SP01005005,members.3. <BR>i can get the value,but =
can not=20
get the annotates ,the code like: <BR><BR>lastModel =3D=20
modelBuilder.getModelRoot(); <BR>EList=20
annotations=3DlastModel.getAnnotations(); <BR>for(int=20
aIndex=3D0;aIndex&lt;annotations.size();aIndex++){=20
<BR>AnnotationEMFImpl annImpl=3D(AnnotationEMFImpl)=20
<BR>annotations.get(aIndex); <BR>EMap=20
keyedValue=3DannImpl.getKeyedValues(); <BR>String =
value=3D(String)=20
=
<BR>keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");=
=20
<BR>} <BR>how i can annotates ? please help me!=20
=
<BR><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE ><BR><BR><BR></BLOC=
KQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE ><BR></BLOCKQUOT=
E></BODY></HTML>

------=_NextPart_000_003F_01C81D3A.7B8E2140--
Re: annotates="//@members.14",how can get? [message #616843 is a reply to message #142685] Fri, 02 November 2007 09:23 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0017_01C81D3A.739EBA30
Content-Type: text/plain;
charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

You cast the value to EList. And then use the iterator to get each =
element.

Yves YANG
---
http://www.soyatec.com
"zxc" <caye5200@yahoo.com.cn> wrote in message =
news:fge1o7$v8o$1@build.eclipse.org...
Ed Merks
Yes, your way can get members's attribute, but it not get members's =
components list
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:fgcefn$ftd$2@build.eclipse.org...
I think VE is making heavy use of dynamic Ecore models so this =
article will give a bit of background that might help:

Discover the Eclipse Modeling Framework (EMF) and Its Dynamic =
Capabilities

In general, for an EObject x, you can do =
x.eClass().getEAllStructuralFeatures(), and then for each of those, you =
can do x.eGet(feature) to access all the data available for x. Of =
course if there is a generate API for x, you can just cast to that =
interface and call the getters...


zxc wrote:=20
- Ed Merks,=20
this members is Panel, its have 3 component , button, image, =
lable,=20
and its have a bounds property , these message ,how i can get =
by Model?=20

<members xsi:type=3D"com.ce_cube.parts.standard:CEPanel" =
bounds=3D"//@methods.0/@properties.0">=20
- <allocation =
xsi:type=3D"org.eclipse.jem.internal.instantiation:ParseTreeAllocation "> =

<expression =
xsi:type=3D" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati o=
n" type=3D"com.ce_cube.parts.standard.CEPanel" />=20
</allocation>=20
- <components component=3D"//@members.0">=20
<constraint xsi:nil=3D"true" />=20
</components>=20
- <components component=3D"//@members.1">=20
<constraint xsi:nil=3D"true" />=20
</components>=20
- <components component=3D"//@members.2">=20
<constraint xsi:nil=3D"true" />=20
</components>=20
</members>=20

"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:fg9tfg$6lc$4@build.eclipse.org...=20

That string value represents a reference to an object so in the=20
deserilized result, you will only have the object being =
referenced. If=20
the referenced object is an EObject x, then=20
x.eResource().getURIFragment(x) will return the string value =
used to=20
reference it.=20


zxc wrote:=20

yves yang,=20

i know the following code , can get the key value "SP01005005" =

Entry keyValue =3D BeanUtilities.getMapEntry(annImpl,=20
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY) =20
(String)keyValue.getValue(),=20

now i want get annotates=3D"//@members.3"=20
the String value "//@members.3" how i can get ?=20

"Yves YANG" <yves.yang@soyatec.com> wrote in message=20
news:fg8mts$vcj$1@build.eclipse.org...=20

In the BeanUtilities class, you can read getBeanName() and=20
getBeanName() to access the Bean's name;=20

yves yang=20
--- http://www.soyatec.com=20

"zxc" <caye5200@yahoo.com.cn> wrote in message=20
news:fg8k20$lmp$1@build.eclipse.org...=20

Ed Merks,=20
AnnotationEMFImpl has getAnnotates method too,=20
i can get a JavaObjectInstance, but i don't know its =
order, like=20
<annotations =
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
annotates=3D"//@members.3">=20
<keyedValues xsi:type=3D"ecore:EStringToStringMapEntry"=20
key=3D"org.eclipse.ve.internal.cde.core.nameincomposition" =

value=3D"SP01005005" />=20
why VE can know its order "SP01005005" is members.3=20
i want to know this annotates's order.=20

"Ed Merks" <merks@ca.ibm.com> wrote in message=20
news:fg7bfa$ro7$1@build.eclipse.org...=20

I really don't have a good answer since I don't know VE, =
but I imagine=20
you should be casting to AnnotationEMF not =
AnnotationEMFImpl and I=20
imagine that AnnotationEMF has a getAnnotates method =
that will yield=20
which object is being annotated. I could be wrong, but =
that's=20
certainly=20
what the serialization itself leads me to believe...=20

zxc wrote:=20

hello, the view.xml following :=20
<?xml version=3D"1.0" encoding=3D"ASCII" ?>=20
<diagrams =
id=3D"org.eclipse.ve.internal.cdm.primarydiagram"=20
visualInfos=3D"//@annotations.18/@visualInfos.0=20
//@annotations.24/@visualInfos.0 =
//@annotations.23/@visualInfos.0=20
//@annotations.8/@visualInfos.0 =
//@annotations.3/@visualInfos.0=20
//@annotations.6/@visualInfos.0 =
//@annotations.22/@visualInfos.0=20
//@annotations.19/@visualInfos.0 =
//@annotations.16/@visualInfos.0=20
//@annotations.15/@visualInfos.0 =
//@annotations.12/@visualInfos.0=20
//@annotations.10/@visualInfos.0 =
//@annotations.9/@visualInfos.0=20
//@annotations.7/@visualInfos.0 =
//@annotations.1/@visualInfos.0=20
//@annotations.21/@visualInfos.0 =
//@annotations.17/@visualInfos.0=20
//@annotations.14/@visualInfos.0 =
//@annotations.13/@visualInfos.0=20
//@annotations.11/@visualInfos.0 =
//@annotations.5/@visualInfos.0=20
//@annotations.4/@visualInfos.0 =
//@annotations.2/@visualInfos.0=20
//@annotations.0/@visualInfos.0 =
//@annotations.25/@visualInfos.0" />=20
- <annotations =
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
annotates=3D"//@members.14">=20
<keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
key=3D"org.eclipse.ve.internal.cde.core.nameincomposition"=20
value=3D"SP01005016" />=20
- <visualInfos diagram=3D"//@diagrams.0">=20
<keyedValues =
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
value=3D"true" />=20
</visualInfos>=20
</annotations>=20
- <annotations =
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
annotates=3D"//@members.3">=20
<keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
key=3D"org.eclipse.ve.internal.cde.core.nameincomposition"=20
value=3D"SP01005005" />=20
- <visualInfos diagram=3D"//@diagrams.0">=20
<keyedValues =
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
value=3D"true" />=20
</visualInfos>=20
</annotations>=20
I hava get the model :lastModel =3D =
modelBuilder.getModelRoot(),=20
but=20
now i want know the annotates the order ,like =
SP01005016, members.14,=20
SP01005005,members.3.=20
i can get the value,but can not get the annotates ,the =
code like:=20

lastModel =3D modelBuilder.getModelRoot();=20
EList annotations=3DlastModel.getAnnotations();=20
for(int =
aIndex=3D0;aIndex<annotations.size();aIndex++){=20
AnnotationEMFImpl annImpl=3D(AnnotationEMFImpl)=20
annotations.get(aIndex);=20
EMap keyedValue=3DannImpl.getKeyedValues();=20
String value=3D(String)=20
=
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");=20
}=20
how i can annotates ? please help me!=20


















------=_NextPart_000_0017_01C81D3A.739EBA30
Content-Type: text/html;
charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-2022-JP>
<META content=3D"MSHTML 6.00.6000.16544" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>You cast the value to EList. And then =
use the=20
iterator to get each element.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Yves YANG</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://www.soyatec.com">http://www.soyatec.com</A></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"zxc" &lt;<A=20
href=3D"mailto:caye5200@yahoo.com.cn">caye5200@yahoo.com.cn</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:fge1o7$v8o$1@build.eclipse.org">news:fge1o7$v8o$1@build.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3D"MS UI Gothic" size=3D2>&nbsp; <FONT size=3D3>Ed=20
Merks</FONT></FONT></DIV>
<DIV><FONT face=3D"MS UI Gothic">&nbsp; Yes, your way can get =
members's=20
attribute, but&nbsp;it &nbsp;not get members's components =
list</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A=20
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:fgcefn$ftd$2@build.eclipse.org">news:fgcefn$ftd$2@build.ecli=
pse.org</A>...</DIV>I=20
think VE is making heavy use of dynamic Ecore models so this article =
will=20
give a bit of background that might help:<BR>
<BLOCKQUOTE><A =
href=3D"http://www.devx.com/Java/Article/29093/0/page/1"=20
target=3D_out>Discover the Eclipse Modeling Framework (EMF) and =
Its Dynamic=20
Capabilities</A><BR></BLOCKQUOTE>In general, for an EObject x, you =
can do=20
x.eClass().getEAllStructuralFeatures(), and then for each of those, =
you can=20
do x.eGet(feature) to access all the data available for =
x.&nbsp;&nbsp; Of=20
course if there is a generate API for x, you can just cast to that =
interface=20
and call the getters...<BR><BR><BR>zxc wrote:=20
<BLOCKQUOTE cite=3Dmid:fgbi7n$nbb$1@build.eclipse.org =
type=3D"cite">- Ed=20
Merks, <BR>&nbsp;&nbsp;&nbsp; this members is Panel, its have 3 =
component=20
, button, image, lable, <BR>&nbsp;&nbsp;&nbsp; and its have a =
bounds=20
property , these message ,how i can get&nbsp; by Model?=20
<BR><BR>&lt;members =
xsi:type=3D"com.ce_cube.parts.standard:CEPanel"=20
bounds=3D<A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto://@methods.0/@properties.0">"//@methods.0/@properties.0"</=
A>&gt;=20
<BR>- &lt;allocation=20
=
xsi:type=3D"org.eclipse.jem.internal.instantiation:ParseTreeAllocation "&g=
t;=20
<BR>&nbsp;&lt;expression=20
=
xsi:type=3D" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati o=
n"=20
type=3D"com.ce_cube.parts.standard.CEPanel" /&gt;=20
<BR>&nbsp;&lt;/allocation&gt; <BR>- &lt;components component=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.0">"//@members.0"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt; <BR>- =
&lt;components=20
component=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.1">"//@members.1"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt; <BR>- =
&lt;components=20
component=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.2">"//@members.2"</A>&gt; =
<BR>&nbsp;&lt;constraint=20
xsi:nil=3D"true" /&gt; <BR>&nbsp;&lt;/components&gt;=20
<BR>&nbsp;&lt;/members&gt; <BR><BR>"Ed Merks" <A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> =
wrote in=20
message <A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg9tfg$6lc$4@build.eclipse.org">news:fg9tfg$6lc$4@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">That string value represents a reference =
to an=20
object so in the <BR>deserilized result, you will only have the =
object=20
being referenced. If <BR>the referenced object is an EObject x, =
then=20
<BR>x.eResource().getURIFragment(x) will return the string value =
used to=20
<BR>reference it. <BR><BR><BR>zxc wrote: <BR>
<BLOCKQUOTE type=3D"cite">yves yang, <BR><BR>i know the =
following code ,=20
can get the key value "SP01005005" <BR>Entry keyValue =3D=20
BeanUtilities.getMapEntry(annImpl,=20
=
<BR> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY) =20
<BR>(String)keyValue.getValue(), <BR><BR>now i want get =
annotates=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A> <BR>the String =
value <A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A> how i can get =
?=20
<BR><BR>"Yves YANG" <A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:yves.yang@soyatec.com">&lt;yves.yang@soyatec.com&gt;</A>=20
wrote in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg8mts$vcj$1@build.eclipse.org">news:fg8mts$vcj$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">In the BeanUtilities class, you can =
read=20
getBeanName() and <BR>getBeanName() to access the Bean's =
name;=20
<BR><BR>yves yang <BR>--- <A class=3Dmoz-txt-link-freetext=20
href=3D"http://www.soyatec.com">http://www.soyatec.com</A>=20
<BR><BR>"zxc" <A class=3Dmoz-txt-link-rfc2396E=20
=
href=3D"mailto:caye5200@yahoo.com.cn">&lt;caye5200@yahoo.com.cn&gt;</A>=20
wrote in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg8k20$lmp$1@build.eclipse.org">news:fg8k20$lmp$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">Ed Merks, <BR>AnnotationEMFImpl =
has=20
getAnnotates method too, <BR>i can get a =
JavaObjectInstance, but i=20
don't know its order, like <BR>&lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF"=20
<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005005" /&gt; <BR>why VE can know its =
order=20
"SP01005005" is members.3 <BR>i want to know this =
annotates's=20
order. <BR><BR>"Ed Merks" <A class=3Dmoz-txt-link-rfc2396E =

=
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> wrote=20
in message <BR><A class=3Dmoz-txt-link-freetext=20
=
href=3D"news:fg7bfa$ro7$1@build.eclipse.org">news:fg7bfa$ro7$1@build.ecli=
pse.org</A>...=20
<BR>
<BLOCKQUOTE type=3D"cite">I really don't have a good =
answer since=20
I don't know VE, but I imagine <BR>you should be casting =
to=20
AnnotationEMF not AnnotationEMFImpl and I <BR>imagine =
that=20
AnnotationEMF has a getAnnotates method that will yield=20
<BR>which object is being annotated. I could be wrong, =
but=20
that's <BR>certainly <BR>what the serialization itself =
leads me=20
to believe... <BR><BR>zxc wrote: <BR>
<BLOCKQUOTE type=3D"cite">hello, the view.xml following =
:=20
<BR>&lt;?xml version=3D"1.0" encoding=3D"ASCII" ?&gt;=20
<BR>&lt;diagrams=20
id=3D"org.eclipse.ve.internal.cdm.primarydiagram"=20
<BR>visualInfos=3D"//@annotations.18/@visualInfos.0=20
<BR>//@annotations.24/@visualInfos.0=20
//@annotations.23/@visualInfos.0=20
<BR>//@annotations.8/@visualInfos.0=20
//@annotations.3/@visualInfos.0=20
<BR>//@annotations.6/@visualInfos.0=20
//@annotations.22/@visualInfos.0=20
<BR>//@annotations.19/@visualInfos.0=20
//@annotations.16/@visualInfos.0=20
<BR>//@annotations.15/@visualInfos.0=20
//@annotations.12/@visualInfos.0=20
<BR>//@annotations.10/@visualInfos.0=20
//@annotations.9/@visualInfos.0=20
<BR>//@annotations.7/@visualInfos.0=20
//@annotations.1/@visualInfos.0=20
<BR>//@annotations.21/@visualInfos.0=20
//@annotations.17/@visualInfos.0=20
<BR>//@annotations.14/@visualInfos.0=20
//@annotations.13/@visualInfos.0=20
<BR>//@annotations.11/@visualInfos.0=20
//@annotations.5/@visualInfos.0=20
<BR>//@annotations.4/@visualInfos.0=20
//@annotations.2/@visualInfos.0=20
<BR>//@annotations.0/@visualInfos.0=20
//@annotations.25/@visualInfos.0" /&gt; <BR>- =
&lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF" =

<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.14">"//@members.14"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005016" /&gt; <BR>- &lt;visualInfos =
diagram=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@diagrams.0">"//@diagrams.0"</A>&gt;=20
<BR>&lt;keyedValues=20
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
<BR>key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
<BR>value=3D"true" /&gt; <BR>&lt;/visualInfos&gt;=20
<BR>&lt;/annotations&gt; <BR>- &lt;annotations=20
xsi:type=3D"org.eclipse.ve.internal.cdm:AnnotationEMF" =

<BR>annotates=3D<A class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@members.3">"//@members.3"</A>&gt;=20
<BR>&lt;keyedValues =
xsi:type=3D"ecore:EStringToStringMapEntry"=20
=
<BR>key=3D"org.eclipse.ve.internal.cde.core.nameincomposition "=20
<BR>value=3D"SP01005005" /&gt; <BR>- &lt;visualInfos =
diagram=3D<A=20
class=3Dmoz-txt-link-rfc2396E=20
href=3D"mailto://@diagrams.0">"//@diagrams.0"</A>&gt;=20
<BR>&lt;keyedValues=20
xsi:type=3D"org.eclipse.ve.internal.cdm:KeyedBoolean"=20
=
<BR>key=3D"org.eclipse.ve.internal.cdm.model.visualconstraintkey "=20
<BR>value=3D"true" /&gt; <BR>&lt;/visualInfos&gt;=20
<BR>&lt;/annotations&gt; <BR>I hava get the model =
:lastModel =3D=20
modelBuilder.getModelRoot(), <BR>but <BR>now i want =
know the=20
annotates the order ,like SP01005016, members.14,=20
<BR>SP01005005,members.3. <BR>i can get the value,but =
can not=20
get the annotates ,the code like: <BR><BR>lastModel =
=3D=20
modelBuilder.getModelRoot(); <BR>EList=20
annotations=3DlastModel.getAnnotations(); <BR>for(int=20
aIndex=3D0;aIndex&lt;annotations.size();aIndex++){=20
<BR>AnnotationEMFImpl annImpl=3D(AnnotationEMFImpl)=20
<BR>annotations.get(aIndex); <BR>EMap=20
keyedValue=3DannImpl.getKeyedValues(); <BR>String =
value=3D(String)=20
=
<BR>keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");=
=20
<BR>} <BR>how i can annotates ? please help me!=20
=
<BR><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE ><BR><BR><BR></BLOC=
KQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE ><BR></BLOCKQUOT=
E></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0017_01C81D3A.739EBA30--
Re: annotates="//@members.14",how can get? [message #616844 is a reply to message #142697] Fri, 02 November 2007 10:02 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33108
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020805000002080105040206
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

Yves,

Yes. If the EStructuralFeature f has f.isMany() true, then the value
returned from eGet(f) will be an EList, i.e., a list containing all the
referenced values.


Yves YANG wrote:
> You cast the value to EList. And then use the iterator to get each
> element.
> Yves YANG
> ---
> http://www.soyatec.com
>
> "zxc" <caye5200@yahoo.com.cn <mailto:caye5200@yahoo.com.cn>> wrote
> in message news:fge1o7$v8o$1@build.eclipse.org...
> Ed Merks
> Yes, your way can get members's attribute, butit not get members's
> components list
>
> "Ed Merks" <merks@ca.ibm.com <mailto:merks@ca.ibm.com>> wrote
> in message news:fgcefn$ftd$2@build.eclipse.org...
> I think VE is making heavy use of dynamic Ecore models so this
> article will give a bit of background that might help:
>
> Discover the Eclipse Modeling Framework (EMF) and Its
> Dynamic Capabilities
> <http://www.devx.com/Java/Article/29093/0/page/1>
>
> In general, for an EObject x, you can do
> x.eClass().getEAllStructuralFeatures(), and then for each of
> those, you can do x.eGet(feature) to access all the data
> available for x. Of course if there is a generate API for x,
> you can just cast to that interface and call the getters...
>
>
> zxc wrote:
>> - Ed Merks,
>> this members is Panel, its have 3 component , button, image,
>> lable,
>> and its have a bounds property , these message ,how i can get
>> by Model?
>>
>> <members xsi:type="com.ce_cube.parts.standard:CEPanel"
>> bounds="//@methods.0/@properties.0">
>> - <allocation
>> xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
>>
>> <expression
>> xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
>> type="com.ce_cube.parts.standard.CEPanel" />
>> </allocation>
>> - <components component="//@members.0">
>> <constraint xsi:nil="true" />
>> </components>
>> - <components component="//@members.1">
>> <constraint xsi:nil="true" />
>> </components>
>> - <components component="//@members.2">
>> <constraint xsi:nil="true" />
>> </components>
>> </members>
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fg9tfg$6lc$4@build.eclipse.org...
>>> That string value represents a reference to an object so in the
>>> deserilized result, you will only have the object being
>>> referenced. If
>>> the referenced object is an EObject x, then
>>> x.eResource().getURIFragment(x) will return the string value
>>> used to
>>> reference it.
>>>
>>>
>>> zxc wrote:
>>>> yves yang,
>>>>
>>>> i know the following code , can get the key value "SP01005005"
>>>> Entry keyValue = BeanUtilities.getMapEntry(annImpl,
>>>> NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY)
>>>> (String)keyValue.getValue(),
>>>>
>>>> now i want get annotates="//@members.3"
>>>> the String value "//@members.3" how i can get ?
>>>>
>>>> "Yves YANG" <yves.yang@soyatec.com> wrote in message
>>>> news:fg8mts$vcj$1@build.eclipse.org...
>>>>> In the BeanUtilities class, you can read getBeanName() and
>>>>> getBeanName() to access the Bean's name;
>>>>>
>>>>> yves yang
>>>>> --- http://www.soyatec.com
>>>>>
>>>>> "zxc" <caye5200@yahoo.com.cn> wrote in message
>>>>> news:fg8k20$lmp$1@build.eclipse.org...
>>>>>> Ed Merks,
>>>>>> AnnotationEMFImpl has getAnnotates method too,
>>>>>> i can get a JavaObjectInstance, but i don't know its
>>>>>> order, like
>>>>>> <annotations
>>>>>> xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>> annotates="//@members.3">
>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>> value="SP01005005" />
>>>>>> why VE can know its order "SP01005005" is members.3
>>>>>> i want to know this annotates's order.
>>>>>>
>>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>>> news:fg7bfa$ro7$1@build.eclipse.org...
>>>>>>> I really don't have a good answer since I don't know VE,
>>>>>>> but I imagine
>>>>>>> you should be casting to AnnotationEMF not
>>>>>>> AnnotationEMFImpl and I
>>>>>>> imagine that AnnotationEMF has a getAnnotates method
>>>>>>> that will yield
>>>>>>> which object is being annotated. I could be wrong, but
>>>>>>> that's
>>>>>>> certainly
>>>>>>> what the serialization itself leads me to believe...
>>>>>>>
>>>>>>> zxc wrote:
>>>>>>>> hello, the view.xml following :
>>>>>>>> <?xml version="1.0" encoding="ASCII" ?>
>>>>>>>> <diagrams id="org.eclipse.ve.internal.cdm.primarydiagram"
>>>>>>>> visualInfos="//@annotations.18/@visualInfos.0
>>>>>>>> //@annotations.24/@visualInfos.0
>>>>>>>> //@annotations.23/@visualInfos.0
>>>>>>>> //@annotations.8/@visualInfos.0
>>>>>>>> //@annotations.3/@visualInfos.0
>>>>>>>> //@annotations.6/@visualInfos.0
>>>>>>>> //@annotations.22/@visualInfos.0
>>>>>>>> //@annotations.19/@visualInfos.0
>>>>>>>> //@annotations.16/@visualInfos.0
>>>>>>>> //@annotations.15/@visualInfos.0
>>>>>>>> //@annotations.12/@visualInfos.0
>>>>>>>> //@annotations.10/@visualInfos.0
>>>>>>>> //@annotations.9/@visualInfos.0
>>>>>>>> //@annotations.7/@visualInfos.0
>>>>>>>> //@annotations.1/@visualInfos.0
>>>>>>>> //@annotations.21/@visualInfos.0
>>>>>>>> //@annotations.17/@visualInfos.0
>>>>>>>> //@annotations.14/@visualInfos.0
>>>>>>>> //@annotations.13/@visualInfos.0
>>>>>>>> //@annotations.11/@visualInfos.0
>>>>>>>> //@annotations.5/@visualInfos.0
>>>>>>>> //@annotations.4/@visualInfos.0
>>>>>>>> //@annotations.2/@visualInfos.0
>>>>>>>> //@annotations.0/@visualInfos.0
>>>>>>>> //@annotations.25/@visualInfos.0" />
>>>>>>>> - <annotations
>>>>>>>> xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>>> annotates="//@members.14">
>>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>>> value="SP01005016" />
>>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>>> <keyedValues
>>>>>>>> xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>>>
>>>>>>>> value="true" />
>>>>>>>> </visualInfos>
>>>>>>>> </annotations>
>>>>>>>> - <annotations
>>>>>>>> xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF"
>>>>>>>> annotates="//@members.3">
>>>>>>>> <keyedValues xsi:type="ecore:EStringToStringMapEntry"
>>>>>>>> key="org.eclipse.ve.internal.cde.core.nameincomposition"
>>>>>>>> value="SP01005005" />
>>>>>>>> - <visualInfos diagram="//@diagrams.0">
>>>>>>>> <keyedValues
>>>>>>>> xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean"
>>>>>>>> key="org.eclipse.ve.internal.cdm.model.visualconstraintkey"
>>>>>>>>
>>>>>>>> value="true" />
>>>>>>>> </visualInfos>
>>>>>>>> </annotations>
>>>>>>>> I hava get the model :lastModel =
>>>>>>>> modelBuilder.getModelRoot(),
>>>>>>>> but
>>>>>>>> now i want know the annotates the order ,like
>>>>>>>> SP01005016, members.14,
>>>>>>>> SP01005005,members.3.
>>>>>>>> i can get the value,but can not get the annotates ,the
>>>>>>>> code like:
>>>>>>>>
>>>>>>>> lastModel = modelBuilder.getModelRoot();
>>>>>>>> EList annotations=lastModel.getAnnotations();
>>>>>>>> for(int aIndex=0;aIndex<annotations.size();aIndex++){
>>>>>>>> AnnotationEMFImpl annImpl=(AnnotationEMFImpl)
>>>>>>>> annotations.get(aIndex);
>>>>>>>> EMap keyedValue=annImpl.getKeyedValues();
>>>>>>>> String value=(String)
>>>>>>>> keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition ");
>>>>>>>>
>>>>>>>> }
>>>>>>>> how i can annotates ? please help me!
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>


--------------020805000002080105040206
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-2022-JP"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yves,<br>
<br>
Yes.&nbsp; If the EStructuralFeature f has f.isMany() true, then the value
returned from eGet(f) will be an EList, i.e., a list containing all the
referenced values.<br>
<br>
<br>
Yves YANG wrote:
<blockquote cite="mid:fgeqav$90k$1@build.eclipse.org" type="cite">
<meta http-equiv="Content-Type"
content="text/html;charset=ISO-2022-JP">
<meta content="MSHTML 6.00.6000.16544" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">You cast the value to EList. And
then use the iterator to get each element.</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Yves YANG</font></div>
<div><font face="Arial" size="2">---</font></div>
<div><font face="Arial" size="2"><a moz-do-not-send="true"
href="http://www.soyatec.com">http://www.soyatec.com</a></font></div>
<blockquote dir="ltr"
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div>"zxc" &lt;<a moz-do-not-send="true"
href="mailto:caye5200@yahoo.com.cn">caye5200@yahoo.com.cn</a>&gt;
wrote in message <a moz-do-not-send="true"
href="news:fge1o7$v8o$1@build.eclipse.org">news:fge1o7$v8o$1@build.eclipse.org</a>...</div>
<div><font face="MS UI Gothic" size="2">&nbsp; <font size="3">Ed Merks</font></font></div>
<div><font face="MS UI Gothic">&nbsp; Yes, your way can get members's
attribute, but&nbsp;it &nbsp;not get members's components list</font></div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div>"Ed Merks" &lt;<a moz-do-not-send="true"
href="mailto:merks@ca.ibm.com">merks@ca.ibm.com</a>&gt; wrote in
message <a moz-do-not-send="true"
href="news:fgcefn$ftd$2@build.eclipse.org">news:fgcefn$ftd$2@build.eclipse.org</a>...</div>
I think VE is making heavy use of dynamic Ecore models so this article
will give a bit of background that might help:<br>
<blockquote><a moz-do-not-send="true"
href="http://www.devx.com/Java/Article/29093/0/page/1" target="_out">Discover
the Eclipse Modeling Framework (EMF) and Its Dynamic Capabilities</a><br>
</blockquote>
In general, for an EObject x, you can do
x.eClass().getEAllStructuralFeatures(), and then for each of those, you
can do x.eGet(feature) to access all the data available for x.&nbsp;&nbsp; Of
course if there is a generate API for x, you can just cast to that
interface and call the getters...<br>
<br>
<br>
zxc wrote:
<blockquote cite="mid:fgbi7n$nbb$1@build.eclipse.org" type="cite">-
Ed Merks, <br>
&nbsp;&nbsp;&nbsp; this members is Panel, its have 3 component , button, image, lable,
<br>
&nbsp;&nbsp;&nbsp; and its have a bounds property , these message ,how i can get&nbsp; by
Model? <br>
<br>
&lt;members xsi:type="com.ce_cube.parts.standard:CEPanel" bounds=<a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto://@methods.0/@properties.0">"//@methods.0/@properties.0"</a>&gt;
<br>
- &lt;allocation
xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation "&gt;
<br>
&nbsp;&lt;expression
xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on "
type="com.ce_cube.parts.standard.CEPanel" /&gt; <br>
&nbsp;&lt;/allocation&gt; <br>
- &lt;components component=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.0">"//@members.0"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt; <br>
&nbsp;&lt;/components&gt; <br>
- &lt;components component=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.1">"//@members.1"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt; <br>
&nbsp;&lt;/components&gt; <br>
- &lt;components component=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.2">"//@members.2"</a>&gt;
<br>
&nbsp;&lt;constraint xsi:nil="true" /&gt; <br>
&nbsp;&lt;/components&gt; <br>
&nbsp;&lt;/members&gt; <br>
<br>
"Ed Merks" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in
message <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fg9tfg$6lc$4@build.eclipse.org">news:fg9tfg$6lc$4@build.eclipse.org</a>...
<br>
<blockquote type="cite">That string value represents a
reference to an object so in the <br>
deserilized result, you will only have the object being referenced. If <br>
the referenced object is an EObject x, then <br>
x.eResource().getURIFragment(x) will return the string value used to <br>
reference it. <br>
<br>
<br>
zxc wrote: <br>
<blockquote type="cite">yves yang, <br>
<br>
i know the following code , can get the key value "SP01005005" <br>
Entry keyValue = BeanUtilities.getMapEntry(annImpl, <br>
NameInCompositionPropertyDescriptor.NAME_IN_COMPOSITION_KEY) <br>
(String)keyValue.getValue(), <br>
<br>
now i want get annotates=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>
<br>
the String value <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@members.3">"//@members.3"</a>
how i can get ? <br>
<br>
"Yves YANG" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:yves.yang@soyatec.com">&lt;yves.yang@soyatec.com&gt;</a>
wrote in message <br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fg8mts$vcj$1@build.eclipse.org">news:fg8mts$vcj$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">In the BeanUtilities class, you can
read getBeanName() and <br>
getBeanName() to access the Bean's name; <br>
<br>
yves yang <br>
--- <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.soyatec.com">http://www.soyatec.com</a> <br>
<br>
"zxc" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:caye5200@yahoo.com.cn">&lt;caye5200@yahoo.com.cn&gt;</a>
wrote in message <br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fg8k20$lmp$1@build.eclipse.org">news:fg8k20$lmp$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">Ed Merks, <br>
AnnotationEMFImpl has getAnnotates method too, <br>
i can get a JavaObjectInstance, but i don't know its order, like <br>
&lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF" <br>
annotates=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto://@members.3">"//@members.3"</a>&gt; <br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry" <br>
key="org.eclipse.ve.internal.cde.core.nameincomposition" <br>
value="SP01005005" /&gt; <br>
why VE can know its order "SP01005005" is members.3 <br>
i want to know this annotates's order. <br>
<br>
"Ed Merks" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in
message <br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fg7bfa$ro7$1@build.eclipse.org">news:fg7bfa$ro7$1@build.eclipse.org</a>...
<br>
<blockquote type="cite">I really don't have a good
answer since I don't know VE, but I imagine <br>
you should be casting to AnnotationEMF not AnnotationEMFImpl and I <br>
imagine that AnnotationEMF has a getAnnotates method that will yield <br>
which object is being annotated. I could be wrong, but that's <br>
certainly <br>
what the serialization itself leads me to believe... <br>
<br>
zxc wrote: <br>
<blockquote type="cite">hello, the view.xml following
: <br>
&lt;?xml version="1.0" encoding="ASCII" ?&gt; <br>
&lt;diagrams id="org.eclipse.ve.internal.cdm.primarydiagram" <br>
visualInfos="//@annotations.18/@visualInfos.0 <br>
//@annotations.24/@visualInfos.0 //@annotations.23/@visualInfos.0 <br>
//@annotations.8/@visualInfos.0 //@annotations.3/@visualInfos.0 <br>
//@annotations.6/@visualInfos.0 //@annotations.22/@visualInfos.0 <br>
//@annotations.19/@visualInfos.0 //@annotations.16/@visualInfos.0 <br>
//@annotations.15/@visualInfos.0 //@annotations.12/@visualInfos.0 <br>
//@annotations.10/@visualInfos.0 //@annotations.9/@visualInfos.0 <br>
//@annotations.7/@visualInfos.0 //@annotations.1/@visualInfos.0 <br>
//@annotations.21/@visualInfos.0 //@annotations.17/@visualInfos.0 <br>
//@annotations.14/@visualInfos.0 //@annotations.13/@visualInfos.0 <br>
//@annotations.11/@visualInfos.0 //@annotations.5/@visualInfos.0 <br>
//@annotations.4/@visualInfos.0 //@annotations.2/@visualInfos.0 <br>
//@annotations.0/@visualInfos.0 //@annotations.25/@visualInfos.0" /&gt;
<br>
- &lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF" <br>
annotates=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto://@members.14">"//@members.14"</a>&gt; <br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry" <br>
key="org.eclipse.ve.internal.cde.core.nameincomposition" <br>
value="SP01005016" /&gt; <br>
- &lt;visualInfos diagram=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@diagrams.0">"//@diagrams.0"</a>&gt;
<br>
&lt;keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean" <br>
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" <br>
value="true" /&gt; <br>
&lt;/visualInfos&gt; <br>
&lt;/annotations&gt; <br>
- &lt;annotations xsi:type="org.eclipse.ve.internal.cdm:AnnotationEMF" <br>
annotates=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto://@members.3">"//@members.3"</a>&gt; <br>
&lt;keyedValues xsi:type="ecore:EStringToStringMapEntry" <br>
key="org.eclipse.ve.internal.cde.core.nameincomposition" <br>
value="SP01005005" /&gt; <br>
- &lt;visualInfos diagram=<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto://@diagrams.0">"//@diagrams.0"</a>&gt;
<br>
&lt;keyedValues xsi:type="org.eclipse.ve.internal.cdm:KeyedBoolean" <br>
key="org.eclipse.ve.internal.cdm.model.visualconstraintkey" <br>
value="true" /&gt; <br>
&lt;/visualInfos&gt; <br>
&lt;/annotations&gt; <br>
I hava get the model :lastModel = modelBuilder.getModelRoot(), <br>
but <br>
now i want know the annotates the order ,like SP01005016, members.14, <br>
SP01005005,members.3. <br>
i can get the value,but can not get the annotates ,the code like: <br>
<br>
lastModel = modelBuilder.getModelRoot(); <br>
EList annotations=lastModel.getAnnotations(); <br>
for(int aIndex=0;aIndex&lt;annotations.size();aIndex++){ <br>
AnnotationEMFImpl annImpl=(AnnotationEMFImpl) <br>
annotations.get(aIndex); <br>
EMap keyedValue=annImpl.getKeyedValues(); <br>
String value=(String) <br>
keyedValue.get("org.eclipse.ve.internal.cde.core.nameincomposition "); <br>
} <br>
how i can annotates ? please help me! <br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</body>
</html>

--------------020805000002080105040206--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:create a bunch of Button once?
Next Topic:VE and eclipse 3.3.1.1
Goto Forum:
  


Current Time: Tue Mar 19 11:00:27 GMT 2024

Powered by FUDForum. Page generated in 0.05159 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top