EASE | |
==== | |
First Blood | |
----------- | |
You need to get your hands dirty: execute a print command either in the Script Shell or by executing a file using a Run Configuration. | |
Goal: | |
scriptListener.script.contains("print(.*)") | |
-> consoleListener.getOutput().contains(".+") | |
Reward: | |
scripting: 10xp | |
Create and execute a script file | |
-------------------------------- | |
Create a script file in your workspace and execute it via a launch configuration. | |
Goal: | |
resourceListener.creation().type(File).name(".*.js") | |
|| resourceListener.creation().type(File).name(".*.py") | |
-> launchListener.type(org.elcipse.ease.launch).launchType(debug) | |
Reward: | |
scripting: 30xp | |
requires: | |
First Blood | |
Create a project via Scripting | |
------------------------------ | |
Scripting modules provide simple accessors for complex functionality. The Resources module allows to create workspace resources with simple commands. | |
Goal: | |
scriptListener.script.contains("createProject(.*)") | |
-> resourceListener.getCreatedElements().contains(IProject.class) | |
Reward: | |
scripting: 40xp | |
requires: | |
First Blood | |
Split scripts to multiple files | |
------------------------------- | |
Scripts may include other scripts. This allows to create script libraries and to segment your code for improved readability and maintainability. | |
Goal: | |
scriptListener.script.contains("include(.*)") | |
Reward: | |
scripting: 20xp | |
requires: | |
First Blood | |
Access Java classes | |
------------------- | |
Scripts may directly access Java classes and its methods. You may mix this code with your scripts code. To complete this task, create a new java.io.File object and query its exists() method. | |
Goal: | |
scriptListener.script.contains("java.io.File(.*)") | |
-> scriptListener.script.contains("exists()") | |
Reward: | |
scripting: 40xp | |
requires: | |
First Blood | |
Load external java classes | |
-------------------------- | |
Scripts allow to access external java archives. Load a jar file of your choice into your script interpreter to be able to access its classes. | |
Goal: | |
scriptListener.script.contains("loadJar(.*)") | |
Reward: | |
scripting: 60xp | |
requires: | |
Access Java classes | |
Split scripts to multiple files | |
Debug a script | |
-------------- | |
Run a debug session on a script. Use the step over functionality to execute line by line. | |
Goal: | |
launchListener.type(org.elcipse.ease.launch).launchType(debug) | |
-> commandListener.command("stepOver") | |
|| commandListener.command("stepResume") | |
|| commandListener.command("stepInto") | |
Reward: | |
Scripting: 40xp | |
Debugging: 40xp | |
requires: | |
Create and execute a script file | |
Create a workspace script | |
------------------------- | |
Create some scripts in your workspace and register their root folder as script location. Then execute one of your scripts from the script shell view. | |
Gaol: | |
scriptingService.addScript().name(".*") | |
-> scriptService.execution().location("scripts://.*") | |
Reward: | |
Scripting 100xp | |
Productivity: 40xp | |
requires: | |
Create and execute a script file | |
Bind a script to a toolbar | |
-------------------------- | |
Registered scripts do support keywords, allowing to dynamically attach toolbar and menu items to views. To accomplish this task, attach a script of your choice to the Project Explorer view. | |
Goal: | |
scriptingService.keyword("toolbar").content("Project Explorer") | |
Reward: | |
Scripting: 100xp | |
Productivity: 80xp | |
requires: | |
Create a workspace script | |