Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Passing multiple selected elements from a diagram editor to an external java action
Passing multiple selected elements from a diagram editor to an external java action [message #1407401] Tue, 12 August 2014 14:00 Go to next message
Stefan Schulz is currently offline Stefan SchulzFriend
Messages: 4
Registered: August 2014
Junior Member
Hi,

I'm trying to pass all the items I have selected in my diagram editor to a java action (IExternalJavaAction), but the execute method of the action only gets one single element in its first argument.

Here's an example:
1) I've selected 4 items in my editor.
index.php/fa/18855/0/

2) The acceleo interpreter correctly returns all 4 elements for the expression [thisEObject/].
index.php/fa/18856/0/

3) If I call a Java action the collection of selected items given to the execute method only contains 1 element.
index.php/fa/18857/0/

4) I also tried to pass [thisEObject/] as a parameter to the method. If I execute the action there is only 1 element in the value of the corresponding HashMapEntry.
index.php/fa/18858/0/

I've tested to call the action using a context menu and via palette entry/action bar in the editor. Both approaches yield the same result though.

Am I doing something wrong or is this a bug?
I've also added my Viewpoint Specification in case it has something to do with an option I haven't set.

Help would be much appreciated.

Best regards,
Stefan



[Updated on: Tue, 12 August 2014 14:01]

Report message to a moderator

Re: Passing multiple selected elements from a diagram editor to an external java action [message #1407419 is a reply to message #1407401] Tue, 12 August 2014 14:47 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Stefan,

Indeed seeing the Sirius code, this can occurs and is a bug. Could
you raise a bugzilla with your scenario and the needed data
to reproduce. The odesign in attachement is not enough as it is an
extension of another odesign, could you provide a sample project, with
..ecore, .odesign and .aird?

Best Regards.

Le 12/08/2014 16:00, Stefan Schulz a écrit :
> Hi,
>
> I'm trying to pass all the items I have selected in my diagram editor to a java action (IExternalJavaAction), but the execute method of the action only gets one single element in its first argument.
>
> Here's an example: (hopefully the image tags work after actually creating the topic)
> 1) I've selected 4 items in my editor. (see "selection.png")
>
>
> 2) The acceleo interpreter correctly returns all 4 elements (as seen in "acceleo_result.png") for the expression [thisEObject/].
>
>
> 3) If I call a Java action the collection of selected items given to the execute method only contains 1 element. (see "java_action_call.png")
>
>
> 4) I also tried to pass [thisEObject/] as a parameter to the method. If I execute the action there is only 1 element in the value of the corresponding HashMapEntry. (see "java_action_call_parameter.png")
>
>
> I've tested to call the action using a context menu and via palette entry/action bar in the editor. Both approaches yield the same result though.
>
> Am I doing something wrong or is this a bug?
> I've also added my Viewpoint Specification in case it has something to do with an option I haven't set.
>
> Help would be much appreciated.
>
> Best regards,
> Stefan
>
>
>
>


--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Passing multiple selected elements from a diagram editor to an external java action [message #1407466 is a reply to message #1407419] Tue, 12 August 2014 17:25 Go to previous messageGo to next message
Stefan Schulz is currently offline Stefan SchulzFriend
Messages: 4
Registered: August 2014
Junior Member
Hi Esteban,

thank you for your reply. I've reproduced the bug using another more simple project and attached it to the bug-report at https://bugs.eclipse.org/bugs/show_bug.cgi?id=441618.

Best regards,
Stefan
Re: Passing multiple selected elements from a diagram editor to an external java action [message #1407695 is a reply to message #1407466] Wed, 13 August 2014 08:39 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
I confirm the bug.

Thanks.

Le 12/08/2014 19:25, Stefan Schulz a écrit :
> Hi Esteban,
>
> thank you for your reply. I've reproduced the bug using another more
> simple project and attached it to the bug-report at
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=441618.
>
> Best regards,
> Stefan


--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Passing multiple selected elements from a diagram editor to an external java action [message #1732344 is a reply to message #1407466] Mon, 16 May 2016 11:40 Go to previous message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
Hi Stefan,

I had the same problem with you.
Did you find the solution to pass multiple selection elements to ExternalJavaAction?

Best Regards,
Tuan Hoang
Stefan Schulz wrote on Tue, 12 August 2014 17:25
Hi Esteban,

thank you for your reply. I've reproduced the bug using another more simple project and attached it to the bug-report at https://bugs.eclipse.org/bugs/show_bug.cgi?id=441618.

Best regards,
Stefan

Previous Topic:Routing problem between some nodes
Next Topic:EmbededEditor with diagram
Goto Forum:
  


Current Time: Wed Apr 24 23:29:59 GMT 2024

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

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

Back to the top