Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » External Java Action with null parameters(Random value for External Java Action parameters)
External Java Action with null parameters [message #1480875] Thu, 20 November 2014 15:09 Go to next message
Jonathan Lasalle is currently offline Jonathan LasalleFriend
Messages: 3
Registered: July 2014
Junior Member
Hi everybody,

Can you please help me?

I'm currently using SIRIUS 0.9.0 in my RCP application and i just notice a strange random bug.

In my "odesign" file, I defined a very basic item : an Edge Creation Description with an External Java Action as operation. This External Java Action takes all available variables (source, target, sourceView, targetView) as parameters (see "odesign.png" attachment).
index.php/fa/19963/0/

It works well. The java action well receives parameters and I am able to compute my links which appear in my diagram (see "diagram.png" attachment)
index.php/fa/19962/0/

The problem is that, sometimes (about 1/10 times), when i drop the connection, the java operation is well called, the "selections" parameter of my operation is well set to the target BUT all parameters are equals to null (see "parameters.png" attachment).
index.php/fa/19964/0/
(So, i'm not able to compute the links....)

When it happens, I must restart my RCP application, and it works again.

Any idea?

Thank you in advance

Regards
  • Attachment: diagram.png
    (Size: 4.87KB, Downloaded 877 times)
  • Attachment: odesign.png
    (Size: 39.09KB, Downloaded 1083 times)
  • Attachment: parameters.png
    (Size: 69.90KB, Downloaded 1006 times)
Re: External Java Action with null parameters [message #1495496 is a reply to message #1480875] Tue, 02 December 2014 08:59 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 482
Registered: July 2009
Location: Nantes, France
Senior Member
Le 20/11/2014 17:06, Jonathan Lasalle a écrit :
> Hi everybody,

Hi Jonathan,

>
> Can you please help me?
>
> I'm currently using SIRIUS 0.9.0 in my RCP application and i just notice a strange random bug.

Did you tried with Sirius 1.0.1 (released with Luna SR1) or with Sirius
2.0 ? See [1] for the list of available update sites.

>
> In my "odesign" file, I defined a very basic item : an Edge Creation Description with an External Java Action as operation. This External Java Action takes all available variables (source, target, sourceView, targetView) as parameters (see "odesign.png" attachment).
>
I would prefer to use a Java service [2][3] which requires to define as
child of your Viewpoint and can be used in any interpreted expresion
(yeloow property sections) whereas the ExternalJavaAction is defined in
an extension point and can be used only in the corresponding operations.
Furthermore in Sirius 0.9, the interface you choose to implements for
you external java action (IExternalJavaAction or IExternalJavaAction2)
can impact performances: regarding your choice, Sirius tries to detect
the element deleted by the action and do this in an inefficient way.
This has been corrected in Sirius 2.0 by bug 427869 [4]

>
> It works well. The java action well receives parameters and I am able to compute my links which appear in my diagram (see "diagram.png" attachment)
>
>
> The problem is that, sometimes (about 1/10 times), when i drop the connection, the java operation is well called, the "selections" parameter of my operation is well set to the target BUT all parameters are equals to null (see "parameters.png" attachment).

>
> (So, i'm not able to compute the links....)
>
> When it happens, I must restart my RCP application, and it works again.
>
> Any idea?

As proposed before: try with Sirius 2.0, try with a Java Service
But it is difficult to think about what happens in your case, I do not
success to reproduce you isse. Could you create a bugzilla with a simpe
reproduction case [5] ? It will allow us to analyze the issue.


>
> Thank you in advance
>
> Regards
>

Regards

--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--

[1] https://wiki.eclipse.org/Sirius/Update_Sites
[2]
https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#specialized
[3]
https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods
[4] https://bugs.eclipse.org/bugs/show_bug.cgi?id=427869
[5] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Re: External Java Action with null parameters [message #1602139 is a reply to message #1495496] Thu, 05 February 2015 10:48 Go to previous message
Jonathan Lasalle is currently offline Jonathan LasalleFriend
Messages: 3
Registered: July 2014
Junior Member
Thank you so much for your answer Maxime and sorry for the delay.

Quote:
Did you tried with Sirius 1.0.1 (released with Luna SR1) or with Sirius
2.0 ? See [1] for the list of available update sites.


I migrated my tool to Sirius 2.0.2 but it didn't fix my bug...

Quote:
I would prefer to use a Java service [2][3] which requires to define as
child of your Viewpoint and can be used in any interpreted expresion
(yeloow property sections) whereas the ExternalJavaAction is defined in
an extension point and can be used only in the corresponding operations.
Furthermore in Sirius 0.9, the interface you choose to implements for
you external java action (IExternalJavaAction or IExternalJavaAction2)
can impact performances: regarding your choice, Sirius tries to detect
the element deleted by the action and do this in an inefficient way.
This has been corrected in Sirius 2.0 by bug 427869 [4]


Ok. It didn't fix my bug but it is good to know. Thank you.

Quote:
Could you create a bugzilla with a simpe
reproduction case [5] ? It will allow us to analyze the issue.


It is hard to reproduce with a simple case but it's done, we found the answer !

You have to know that in our tool, we merged EMF resources :
- in our tool, we have only on resource set that contains each project resource.
- we reproduced this structure inside Sirius... only one resource set... the same than in the heart of our tool.
- so in our Sirius diagram, we are able to import items from other project (initially, different resources in Sirius)
And that is the origin of our bug !

When i created my link in Sirius, the used Sirius Interpreter was sometimes the wrong one.
Sirius sometimes used the Interpreter associated to the original resource, not the merged one !
So, to correct it, we merged Sirius Interpreters !

Thank you for your help,

John
Previous Topic:Containers and recursion: container A has container B and container B has container A
Next Topic:Save failed after deletion
Goto Forum:
  


Current Time: Sun Apr 05 19:09:46 GMT 2020

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

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

Back to the top