Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Diagram refreshing and Java service Debugging
Diagram refreshing and Java service Debugging [message #1385004] Tue, 03 June 2014 10:58 Go to next message
Wenjing Yuan is currently offline Wenjing Yuan
Messages: 7
Registered: May 2014
Junior Member
Hi all,

I'm quite new in Sirius. Thanks for the info from https://www.eclipse.org/forums/index.php/t/632359/

I'm now able to use my own java service, but the problem is no matter how I modify my java class, it will never reflect to the *.odesign. Even the method name has been changed, the auto-completion would still provide the suggestion of the previous name. I have tried to remove and add again of java extension declaration, but no luck Sad , the diagram still follows the definition in previous java service.

1. Is this a common problem? or is there any force refresh button I didn't find?
2. Is there any easy way to reflect my changes immediately to the representation?
3. How to debug my java service? There is an answer about debugging but using the Sirius interpreter which is not applicable for my issue I guess.

Thank you for any hints.

KR,
Winny

Re: Diagram refreshing and Java service Debugging [message #1385011 is a reply to message #1385004] Tue, 03 June 2014 11:37 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime Porhel
Messages: 83
Registered: July 2009
Member
Le 03/06/2014 16:58, Wenjing Yuan a écrit :
> Hi all,
Hi,
>
> I'm quite new in Sirius. Thanks for the info from
> https://www.eclipse.org/forums/index.php/t/632359/
> I'm now able to use my own java service, but the problem is no matter
> how I modify my java class, it will never reflect to the *.odesign. Even
> the method name has been changed, the auto-completion would still
> provide the suggestion of the previous name. I have tried to remove and
> add again of java extension declaration, but no luck :( , the diagram
> still follows the definition in previous java service.
> 1. Is this a common problem? or is there any force refresh button I
> didn't find?

Several changes done in the VSM are directly taken into account in an
open editor described in this VSM. Do you use the java service in a
service: expression or in an Acceleo3 expression ?


2. Is there any easy way to reflect my changes immediately
> to the representation?

When a change in the VSM is not directly reflected you have several
possibilities:
. Right clic > refresh (or refresh from the tabbar when the selection
is on the diagram. (For tables and trees editors, I think Right clic >
refresh should be available too).
. If the manual refresh did not reflect the changes, you can close and
reopen the editor.
. Close/Reopen the Modeling Project (or the session if you are not
working with Modeling Project)


> 3. How to debug my java service? There is an answer about debugging but
> using the Sirius interpreter which is not applicable for my issue I guess.

If you launch a runtime in debug mode from your Sirius environment, with
the Viewpoint Specification Project in the dev env and you session /
modeling project in the runtime, you can create standard JDT breakpoints
in your java services and debug them as any Java classes.

>
> Thank you for any hints.
>
> KR,
> Winny
>
>
Regards,

Maxime
Re: Diagram refreshing and Java service Debugging [message #1385079 is a reply to message #1385011] Wed, 04 June 2014 04:48 Go to previous messageGo to next message
Wenjing Yuan is currently offline Wenjing Yuan
Messages: 7
Registered: May 2014
Junior Member
Hi Maxime,

Thank you for the reply.

1. I have tried both service expression and the Acceleo expression.

For instance, I have myService() method in SampleService class. Three expressions are:
[self.myService()/]
service:self.myService()
service:myService
There would be an error when I use service expressions, but not for the Acceleo one.

2. Thank you. The diagram refresh works well. I was my mistake, change the name of method but not in expression Razz .

3. The VSP is already in a runtime eclipse, should I launch a runtime over a runtime? Sorry to ask if this is common in this situation.


KR,
Winny

[Updated on: Wed, 04 June 2014 05:01]

Report message to a moderator

Re: Diagram refreshing and Java service Debugging [message #1385083 is a reply to message #1385079] Wed, 04 June 2014 05:06 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime Porhel
Messages: 83
Registered: July 2009
Member
Le 04/06/2014 10:48, Wenjing Yuan a écrit :
> Hi Maxime,
Hi,
>
> Thank you for the reply.
> 1. I have tried both service expression and the Acceleo expression.
> For instance, I have myService() method in SampleService class. Three
> expressions are:
> [self.myService()/]
> service:self.myService()
> service:myService
> There would be an error when I use service expressions, but not for the
> Acceleo one.

In the Specialized documentation [1], see the intended limitation to be
more efficient: "The services should be in the same bundle as the VSM
and should be deployed". This is not the case with Acceleo3 expressions
whose interpreter is able to use the services in a non deployed mode.


>
> 2. Thank you. But none of them work for me, the diagram still shows the
> previous function. I have tried to close both of them and restart
> eclipse, no luck for that. The refresh seems only happen when I restart
> the computer :(
Before restarting your computer, you could just restart your eclipse
runtime.

>
> 3. The VSP is already in a runtime eclipse, should I launch a runtime
> over a runtime? Sorry to ask if this is common in this situation.
You can launch a runtime over a runtime.
You might also move your VSP in your "base" eclipse.
>
> PS: the attached image may explain the problem better. I have change the
> method to return "new" to label instead of "foo". But newly created
> representation still hold "foo" as the name
Your message does not have any attached image.

>
> KR,
> Winny

Regards

Maxime

[1]
https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#specialized
Re: Diagram refreshing and Java service Debugging [message #1385098 is a reply to message #1385083] Wed, 04 June 2014 06:15 Go to previous message
Wenjing Yuan is currently offline Wenjing Yuan
Messages: 7
Registered: May 2014
Junior Member
Hi Maxime,

Thank you so much for your help.

There are some updates for the refreshing message. The diagram refresh do work, it was my bad, forget to change the invoking method name in expression Embarrassed .

KR,
Winny
Previous Topic:Export diagram as image on Save action
Next Topic:Bad context after a Selection Wizard Description
Goto Forum:
  


Current Time: Sat Aug 30 16:34:52 EDT 2014

Powered by FUDForum. Page generated in 0.02624 seconds