Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » move entry in feature map
move entry in feature map [message #755218] Mon, 07 November 2011 17:41 Go to next message
Christian B is currently offline Christian BFriend
Messages: 68
Registered: August 2011
Member
Hi,

I tried it for hours now and i am out of ideas, so i have to ask here Wink

What i want to do is easy, i just want to move an entry in a feature map to another position within the same feature map.

As example, say i have a featuremap with 2 features: standard_order and preferred_order and my map looks like:

  1. standard_order
  2. preferred_order

And now i want to change the feature map, that it looks like:

  1. preferred_order
  2. standard_order


So looks like a very easy task (and i hope it is and i am just stupid!)

I tried everything withe the FeatureMap.move methods, but nothing worked...
I always get a IndexOutOfBoundsException and it looks like the move methods can only move e.g. a standard_order to another position within the standard_orders and same for preferred_orders

i hope you have some ideas!

thx in advance

[Updated on: Mon, 07 November 2011 17:43]

Report message to a moderator

Re: move entry in feature map [message #755296 is a reply to message #755218] Mon, 07 November 2011 23:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Comments below.

On 07/11/2011 6:41 PM, buschcobolt wrote:
> Hi,
>
> I tried it for hours now and i am out of ideas, so i have to ask here ;)
>
> What i want to do is easy, i just want to move an entry in a feature
> map to another position within the sam feature map.
>
> As example, say i have a featuremap with 2 features: standard_orders
> and preferred_order and my map looks like:
>
> standard_order
> preferred_order
>
> And now i want to change the feature map, that it looks like:
>
> standard_order
> preferred_order
They look the same...
>
>
> So looks like a very easy task (and i hope it is and i am just stupid!)
>
> I tried everything withe the FeatureMap.move methods, but nothing
> worked...
> I always get a IndexOutOfBoundsException and it looks like the move
> methods can only move e.g. a standard_order to another position within
> the standard_orders and same for preferred_orders
You should be able to do move(0,1) to exchange the first two elements.
>
> i hope you have some ideas!
>
> thx in advance
>
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: move entry in feature map [message #755331 is a reply to message #755296] Tue, 08 November 2011 08:08 Go to previous messageGo to next message
Christian B is currently offline Christian BFriend
Messages: 68
Registered: August 2011
Member
hmm, i corrected this mistake in the first version of my post immediately after posting it

I solved the issue by removing the standard_order and adding it again, but still have the feeling that
featuremap.move doesn't work as aspected

[Updated on: Tue, 08 November 2011 08:11]

Report message to a moderator

Re: move entry in feature map [message #755346 is a reply to message #755331] Tue, 08 November 2011 08:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
I'd really have to see an example where it doesn't work, or at least the
code you called and a stack trace.

On 08/11/2011 9:08 AM, buschcobolt wrote:
> hmm, i corrected this mistake in the first version of my post
> immediatly after posting it
>
> I solved the issue by removing the standard_order and adding it again,
> but still have the feeling that featuremap.move doesn't work as aspected
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Should a I model multiple inheritance in my ECORE model
Next Topic:EMF Based Master Details : Grouping
Goto Forum:
  


Current Time: Wed Apr 24 16:04:35 GMT 2024

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

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

Back to the top