Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Two problems with a Dialog for the Container Creation(Issues concern Textfield refresh and External Java Action Call)
Two problems with a Dialog for the Container Creation [message #1847666] Wed, 03 November 2021 10:52 Go to next message
Marco Codazzi is currently offline Marco CodazziFriend
Messages: 13
Registered: May 2021
Junior Member
I have a container that must be configured before the displacement. This because the number of nodes to be added depends on 2 parameters. For doing this task I added a Dialog after the creation of the element where the user can set these 2 parameters: tx_number and rx_number.
I have two problems:

1) If I modify the textfields and I press enter the displayed values in the dialog come back to the default values whereas if I press the OK button the parameters in the object are correcly set.
How can I force the dialog to display the updated values?

2) In order to automatically add the nodes I've written an External Java Action extending the class IExternalJavaAction, and I added it to the OK Button.
Probably I did something wrong because the "execute" method is not executed (method "canExecute" always return true).
How can I run my External Java Action when OK button is pressed?

I uploaded the screenshot of odesign view and the Dialog.
  • Attachment: odesign.png
    (Size: 14.93KB, Downloaded 51 times)
  • Attachment: dialog.png
    (Size: 4.12KB, Downloaded 48 times)
Re: Two problems with a Dialog for the Container Creation [message #1847682 is a reply to message #1847666] Wed, 03 November 2021 14:25 Go to previous messageGo to next message
Marco Codazzi is currently offline Marco CodazziFriend
Messages: 13
Registered: May 2021
Junior Member
Ok I solved problem 2: since I was not able to use External Java Action in the Dialog I've written a Java service and I added a "let" operation below the begin of OK button where I assign the result of the method that add the nodes to the container to a useless variable. I don't know if there is a bettere way to call a Java Service.

Now remains only the problem 1.
Re: Two problems with a Dialog for the Container Creation [message #1847685 is a reply to message #1847682] Wed, 03 November 2021 15:32 Go to previous message
Marco Codazzi is currently offline Marco CodazziFriend
Messages: 13
Registered: May 2021
Junior Member
OK I solved also the problem 2: I put in the text field property "Value Expression" aql:self.tx_number (or aql:self.rx_number) instead of fixed values
Previous Topic:Old-EcoreTools-style examples
Next Topic:Preserve layout with copy&paste of many elements within the same diagram
Goto Forum:
  


Current Time: Thu Oct 10 13:29:41 GMT 2024

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

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

Back to the top