In which situation does EClass.getEAllOperations() return a empty list? [message #524542] |
Thu, 01 April 2010 06:00 |
Eclipse User |
|
|
|
Originally posted by: lifesting.gmail.com
Hi, gurus, I create a simple EMF model and there's an EClass 'World' in
it, like below:
public interface World extends EObject {
EList<Living> getLivings();
int getCurrentCentury();
void setCurrentCentury(int value);
}
Now I get a handle for a World instance and invoke method
getEAllOperations(), code like below:
World w = ....;
EClass classifier = w.eClass();
EList ops = ((EClass) classifier).getEAllOperations();
//Now ops is an empty list, puzzle~~
Thanks a lot!
|
|
|
|
Re: In which situation does EClass.getEAllOperations() return a empty list? [message #524724 is a reply to message #524547] |
Thu, 01 April 2010 22:30 |
Eclipse User |
|
|
|
Originally posted by: lifesting.gmail.com
yeah! you are right, getEAllOperations only return Operations, thank you
very much!
On 4/1/2010 7:29 PM, Jonas wrote:
> Hi,
> could it be that you are looking for this:
> eClass().getEAllStructuralFeatures()
> As I think EAllOperations will only return operations not attributes and
> references.
> regards
> Jonas
>
> David Chan wrote:
>> Hi, gurus, I create a simple EMF model and there's an EClass 'World'
>> in it, like below:
>>
>> public interface World extends EObject {
>>
>> EList<Living> getLivings();
>>
>>
>> int getCurrentCentury();
>>
>> void setCurrentCentury(int value);
>>
>> }
>>
>> Now I get a handle for a World instance and invoke method
>> getEAllOperations(), code like below:
>>
>> World w = ....;
>> EClass classifier = w.eClass();
>> EList ops = ((EClass) classifier).getEAllOperations();
>>
>> //Now ops is an empty list, puzzle~~
>>
>> Thanks a lot!
|
|
|
Re: In which situation does EClass.getEAllOperations() return a empty list? [message #525041 is a reply to message #524724] |
Mon, 05 April 2010 09:32 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
u re wellcome :-)
David Chan wrote:
> yeah! you are right, getEAllOperations only return Operations, thank you
> very much!
> On 4/1/2010 7:29 PM, Jonas wrote:
>> Hi,
>> could it be that you are looking for this:
>> eClass().getEAllStructuralFeatures()
>> As I think EAllOperations will only return operations not attributes and
>> references.
>> regards
>> Jonas
>>
>> David Chan wrote:
>>> Hi, gurus, I create a simple EMF model and there's an EClass 'World'
>>> in it, like below:
>>>
>>> public interface World extends EObject {
>>>
>>> EList<Living> getLivings();
>>>
>>>
>>> int getCurrentCentury();
>>>
>>> void setCurrentCentury(int value);
>>>
>>> }
>>>
>>> Now I get a handle for a World instance and invoke method
>>> getEAllOperations(), code like below:
>>>
>>> World w = ....;
>>> EClass classifier = w.eClass();
>>> EList ops = ((EClass) classifier).getEAllOperations();
>>>
>>> //Now ops is an empty list, puzzle~~
>>>
>>> Thanks a lot!
>
|
|
|
Powered by
FUDForum. Page generated in 0.02990 seconds