Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 18:57 Go to next message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 135
Registered: July 2009
Senior Member
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 12:11 Go to previous messageGo to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 197
Registered: July 2009
Location: Graz, Austria
Senior Member
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 15:59 Go to previous messageGo to next message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 135
Registered: July 2009
Senior Member
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 16:17 Go to previous message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 197
Registered: July 2009
Location: Graz, Austria
Senior Member
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: Tue Oct 16 23:49:45 GMT 2018

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

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

Back to the top