blob: ff07cf280b9aa74212a86d5313fdf90357ba0160 [file] [log] [blame]
--- RCPTT testcase ---
Format-Version: 1.0
Context-Type: org.eclipse.rcptt.ctx.ecl
Element-Name: ECL_EditComment
Element-Type: context
Element-Version: 2.0
Id: _addcommentondiagram
Runtime-Version: 2.0.2.201511100828
Save-Time: 6/23/16 4:06 PM
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998
Content-Type: text/ecl
Entry-Name: .ecl.context
// This function add a comment on the given diagram.
proc "add-comment" [val x] [val y] [val textComment] [val diagramName] [val editorRootName] [val explorerRootName] [val pathComment] {
get-editor "model.di" | get-diagram | get-edit-part -name $editorRootName
// Get comment in palette.
with [get-palette | get-palette-entry "Comment"] {
mouse-move 35 12 button1 -height 23 -width 251
mouse-press 35 12 button1 -height 23 -width 251
mouse-release 35 12 button1 524288 -height 23 -width 251
}
// Add the comment in the given diagram.
with [get-diagram $diagramName] {
mouse-move $x $y button1
mouse-press $x $y button1
mouse-release $x $y button1
}
get-view Properties | get-editbox -after [get-label Body] | set-text $textComment
// Make sure the desired comment has been created.
with [get-view "Model Explorer" | get-tree | get-item $explorerRootName] {
get-item $pathComment | equals true
}
}
// This function remove a comment on the given diagram.
proc "remove-comment" [val explorerRootName] [val pathComment] {
with [get-view "Model Explorer" | get-tree | get-item $explorerRootName] {
get-item $pathComment | click
get-menu Delete | click
}
// Make sure the desired comment has been removed.
with [get-view "Model Explorer" | get-tree | get-item $explorerRootName] {
verify-error {get-item $pathComment}
}
}
------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998--