blob: 75c752bda2c42369dc59fd835c85b5524b2c033b [file] [log] [blame]
--- RCPTT testcase ---
Format-Version: 1.0
Context-Type: org.eclipse.rcptt.ctx.ecl
Element-Name: ProcUtility
Element-Type: context
Element-Version: 2.0
Id: _DPiW0DeOEeWhvfUs26xJZQ
Runtime-Version: 2.0.0.201507292316
Save-Time: 3/29/16 2:15 PM
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998
Content-Type: text/ecl
Entry-Name: .ecl.context
proc "set-size" [val window -input] [val width $workbenchWidth] [val height $workbenchHeight] {
$window | get-object | invoke setSize $width $height
}
//find a tab folder given its name
//Screenshots of a Java Editor and a tree in Outline view above don't look very realistic -- they don't include a name of View/Editor. In order to include it, ideally we should take bounds of a tab folder, associated with view or editor stack. RCPTT does not have built-in commands to find a tab folder by view/editor (as there is no practical need for that). However, it is possible to write a handy procedure to iterate through all tab folders in an application and find the one with an active tab we need:
//usage: find-tab-folder "Package Explorer" | get-object | save-screenshot [full-path "package-explorer"]
proc "find-tab-folder" [val activePage] {
loop [val index [int 0]] {
let [val folder [get-tab-folder -index $index]] {
let [val folderActivePage [$folder | get-property activePage -raw]] {
if [$folderActivePage | eq $activePage] {
$folder //returning result
} -else { recur [$index | plus 1] }
}
}
}
}
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998--