Skip to main content



      Home
Home » Modeling » EMF » How can i poof an elis datat?
How can i poof an elis datat? [message #423362] Mon, 29 September 2008 10:38 Go to next message
Eclipse UserFriend
Hello,

I have an Elist like this. EList<Property> Pi

Now i fill this EList with some Elements. But i want to proof these
Elements dynamically. So is there a way to get the information, that
this elist only holds propertys?

This is only an example, there are some more lists, whiches holds other
elements.

Greetings
Jörg
Re: How can i poof an elist data? [message #423364 is a reply to message #423362] Mon, 29 September 2008 10:41 Go to previous messageGo to next message
Eclipse UserFriend
Sorry for the spelling mistake.

Jörg schrieb:
> Hello,
>
> I have an Elist like this. EList<Property> Pi
>
> Now i fill this EList with some Elements. But i want to proof these
> Elements dynamically. So is there a way to get the information, that
> this elist only holds propertys?
>
> This is only an example, there are some more lists, whiches holds other
> elements.
>
> Greetings
> Jörg
Re: How can i poof an elist data? [message #423365 is a reply to message #423364] Mon, 29 September 2008 10:44 Go to previous messageGo to next message
Eclipse UserFriend
Jörg schrieb:
> Sorry for the spelling mistake.
>
> Jörg schrieb:
>> Hello,
>>
>> I have an Elist like this. EList<Property> Pi
>>
>> Now i fill this EList with some Elements. But i want to proof these
>> Elements dynamically. So is there a way to get the information, that
>> this elist only holds propertys?
Jörg, I'm curious: Which non-Property classed objects do you think would
Java allow you to add to such a list?

Cheers
/Eike


>>
>> This is only an example, there are some more lists, whiches holds
>> other elements.
>>
>> Greetings
>> Jörg
Re: How can i poof an elist data? [message #423367 is a reply to message #423365] Mon, 29 September 2008 10:47 Go to previous messageGo to next message
Eclipse UserFriend
There is no non-property class i can at. I know this. this is the reason
i want to proof it, before i call the put method.

Eike Stepper schrieb:
> Jörg schrieb:
>> Sorry for the spelling mistake.
>>
>> Jörg schrieb:
>>> Hello,
>>>
>>> I have an Elist like this. EList<Property> Pi
>>>
>>> Now i fill this EList with some Elements. But i want to proof these
>>> Elements dynamically. So is there a way to get the information, that
>>> this elist only holds propertys?
> Jörg, I'm curious: Which non-Property classed objects do you think would
> Java allow you to add to such a list?
>
> Cheers
> /Eike
>
>
>>>
>>> This is only an example, there are some more lists, whiches holds
>>> other elements.
>>>
>>> Greetings
>>> Jörg
Re: How can i poof an elist data? [message #423368 is a reply to message #423367] Mon, 29 September 2008 10:48 Go to previous messageGo to next message
Eclipse UserFriend
Jörg schrieb:
> There is no non-property class i can at. I know this. this is the
> reason i want to proof it, before i call the put method.
I still don't understand. Why do you want to proof something that you
already know?

>
> Eike Stepper schrieb:
>> Jörg schrieb:
>>> Sorry for the spelling mistake.
>>>
>>> Jörg schrieb:
>>>> Hello,
>>>>
>>>> I have an Elist like this. EList<Property> Pi
>>>>
>>>> Now i fill this EList with some Elements. But i want to proof these
>>>> Elements dynamically. So is there a way to get the information,
>>>> that this elist only holds propertys?
>> Jörg, I'm curious: Which non-Property classed objects do you think
>> would Java allow you to add to such a list?
>>
>> Cheers
>> /Eike
>>
>>
>>>>
>>>> This is only an example, there are some more lists, whiches holds
>>>> other elements.
>>>>
>>>> Greetings
>>>> Jörg
Re: How can i poof an elist data? [message #423369 is a reply to message #423364] Mon, 29 September 2008 10:49 Go to previous messageGo to next message
Eclipse UserFriend
Jörg,

Comments below.

Jörg wrote:
> Sorry for the spelling mistake.
>
> Jörg schrieb:
>> Hello,
>>
>> I have an Elist like this. EList<Property> Pi
>>
>> Now i fill this EList with some Elements. But i want to proof these
>> Elements dynamically. So is there a way to get the information, that
>> this elist only holds propertys?
The lists for multi-valued properties implement
EStructuralFeature.Setting and hence can be cast to that. From there
you can find out the feature and hence the type of the feature...
>>
>> This is only an example, there are some more lists, whiches holds
>> other elements.
>>
>> Greetings
>> Jörg
Re: How can i poof an elist data? [message #423370 is a reply to message #423368] Mon, 29 September 2008 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Eike Stepper schrieb:
> Jörg schrieb:
>> There is no non-property class i can at. I know this. this is the
>> reason i want to proof it, before i call the put method.
> I still don't understand. Why do you want to proof something that you
> already know?
Ah, do you mean how to test if a given object "is a" Property?
That would be a pure Java question and I'd say

if (object instanceof Property) list.add((Property)object);

>
>>
>> Eike Stepper schrieb:
>>> Jörg schrieb:
>>>> Sorry for the spelling mistake.
>>>>
>>>> Jörg schrieb:
>>>>> Hello,
>>>>>
>>>>> I have an Elist like this. EList<Property> Pi
>>>>>
>>>>> Now i fill this EList with some Elements. But i want to proof
>>>>> these Elements dynamically. So is there a way to get the
>>>>> information, that this elist only holds propertys?
>>> Jörg, I'm curious: Which non-Property classed objects do you think
>>> would Java allow you to add to such a list?
>>>
>>> Cheers
>>> /Eike
>>>
>>>
>>>>>
>>>>> This is only an example, there are some more lists, whiches holds
>>>>> other elements.
>>>>>
>>>>> Greetings
>>>>> Jörg
Re: How can i poof an elist data? [message #423372 is a reply to message #423369] Mon, 29 September 2008 11:00 Go to previous message
Eclipse UserFriend
Thanks this helped me a lot.

Ed Merks schrieb:
> Jörg,
>
> Comments below.
>
> Jörg wrote:
>> Sorry for the spelling mistake.
>>
>> Jörg schrieb:
>>> Hello,
>>>
>>> I have an Elist like this. EList<Property> Pi
>>>
>>> Now i fill this EList with some Elements. But i want to proof these
>>> Elements dynamically. So is there a way to get the information, that
>>> this elist only holds propertys?
> The lists for multi-valued properties implement
> EStructuralFeature.Setting and hence can be cast to that. From there
> you can find out the feature and hence the type of the feature...
>>>
>>> This is only an example, there are some more lists, whiches holds
>>> other elements.
>>>
>>> Greetings
>>> Jörg
Previous Topic:[CDO] Version handling
Next Topic:EMF + API Tools
Goto Forum:
  


Current Time: Wed Jul 23 08:21:23 EDT 2025

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

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

Back to the top