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 10:09  |
Eclipse User |
|
|
|
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).

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?
Thank you in advance
Regards
Attachment: diagram.png
(Size: 4.87KB, Downloaded 1063 times)
Attachment: odesign.png
(Size: 39.09KB, Downloaded 1384 times)
Attachment: parameters.png
(Size: 69.90KB, Downloaded 1199 times)
|
|
|
Re: External Java Action with null parameters [message #1495496 is a reply to message #1480875] |
Tue, 02 December 2014 03:59   |
Eclipse User |
|
|
|
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
|
|
|
Re: External Java Action with null parameters [message #1602139 is a reply to message #1495496] |
Thu, 05 February 2015 05:48  |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Sat May 24 21:20:41 EDT 2025
Powered by FUDForum. Page generated in 0.04877 seconds
|