Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How can i poof an elis datat?
How can i poof an elis datat? [message #423362] Mon, 29 September 2008 14:38 Go to next message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
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 14:41 Go to previous messageGo to next message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
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 14:44 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
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 14:47 Go to previous messageGo to next message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
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 14:48 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
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 14:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How can i poof an elist data? [message #423370 is a reply to message #423368] Mon, 29 September 2008 14:50 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
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 15:00 Go to previous message
Oelerink is currently offline OelerinkFriend
Messages: 129
Registered: July 2009
Senior Member
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: Fri Mar 29 13:10:28 GMT 2024

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

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

Back to the top