-
Notifications
You must be signed in to change notification settings - Fork 20
RCPTT
Dániel Segesdi edited this page Jun 1, 2016
·
18 revisions
-
AUT Connection Error: <a feature project> does not exist
- Close the mentioned project in your workspace
- A test case fails indeterministically
- Check for background jobs that can change any visible property, e.g. name or position
- A test case fails because a section is not found in the Properties view
- Focus is handled a bit differently when executing a test, so make sure to explicitly click on a newly created item before using a selection-dependent view
- Query UI elements based on the underlying model
- Introduce Java methods
- Call them with the
invoke
command - Wrap the invocations in procedures
- Derive UI strings from model using
format
- Get raw property values with
get-property <property> -raw
- If something is not clear from the ECL documentation, consult the following Ecore metamodels:
There isn't any reliable documentation about this command, or how to use it, however it is referenced from the documentation.
There is a blog entry for the 1.5.2 RCPTT release which shows us how to use this command:
proc "get-os" {
invoke-static -pluginId "org.eclipse.core.runtime"
-className "org.eclipse.core.runtime.Platform"
-methodName getOS
}
proc "print-os" [val os] {
switch $os
[case "win32" {
log "current OS is Windows"
}]
[case "linux" {
log "current OS is Linux"
}]
[case "macosx" {
log "current OS is Mac OS X"
}]
-default {
log [format "Unknow os: %s" $os]
}
}
print-os [get-os]
The problem with this is that the ECL "documentation" states that the argumets are Strings, including the method name, so the lack of quotes might be a typo in the example.
This documentation also shows us that there is a fourth argument -args
which we can use to pass arguments (Java Objects) to the java method. Further research showed that the -args
keyword is used to pass a single argument, and it has to be added before each argument.
proc "test" [val parent] [val name] {
invoke-static -pluginId "org.exemple"
-className "org.exemple.ClassName"
-methodName "methodName"
-args $parent
-args $name
}