Skip to main content



      Home
Home » Eclipse Projects » Advanced Scripting Environment (EASE) » Use script to automate UI actions
Use script to automate UI actions [message #1723009] Wed, 10 February 2016 13:57 Go to next message
Eclipse UserFriend
By looking at the available documentation I could not figure out if I can create an EASE script that automates the my workflow to generate code from a UML model. The first steps are as follows.

1. Open a file "model.uml" (from a project in my workspace) using the UML model editor
2. In the UML model editor open the first element to show the child element <Model> M
3. Select that child
4. In the menu bar: click on UML Editor > Package > Merge
5. etc

Can this be done using EASE?
Re: Use script to automate UI actions [message #1723186 is a reply to message #1723009] Fri, 12 February 2016 07:11 Go to previous messageGo to next message
Eclipse UserFriend
Well, if you could do it from java, you can also do it with EASE. For most parts you will need to use java calls here, lets see:

1. You can open files in the default editor using the UI module:
showEditor("workspace://Java 1/.project")
2/3. the previous call returns the editor instance. How to open and select the first element is something that the java editor instance should support. As this is editor specific I cannot help how to do that. Ev. ask the project devs for a programmatic way to do this.
4. The Platform module contains executeCommand() which allows to call a command contribution (the cody typically executed when pushing buttons, toolbars or menu items) programmatically.

So some support is there, most of your script would have to use pure java code (which can be embedded in script code).

HTH
Christian
Re: Use script to automate UI actions [message #1723335 is a reply to message #1723186] Sun, 14 February 2016 10:59 Go to previous messageGo to next message
Eclipse UserFriend
I found a solution: run SWTBot in an EASE script.
With this I don't need to know anything about internals of the editors, commands, etc that run behind the scenes.
Re: Use script to automate UI actions [message #1723337 is a reply to message #1723335] Sun, 14 February 2016 11:17 Go to previous message
Eclipse UserFriend
Using SWT bot is a great idea, did not think of that. Glad it works for you!
Previous Topic:Corrupt Git repository?
Next Topic:Importing Java package in EASE script
Goto Forum:
  


Current Time: Sun Jul 13 16:13:28 EDT 2025

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

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

Back to the top