| --- RCPTT testcase --- |
| Format-Version: 1.0 |
| Context-Type: org.eclipse.rcptt.ctx.ecl |
| Element-Name: ECL_RenameElement |
| Element-Type: context |
| Element-Version: 2.0 |
| Id: _renameaelement |
| Runtime-Version: 2.0.2.201511100828 |
| Save-Time: 6/23/16 4:07 PM |
| |
| ------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 |
| Content-Type: text/ecl |
| Entry-Name: .ecl.context |
| |
| // This function rename the given element. |
| proc "rename-element" [val pathOldName] [val newName] [val pathNewName] [val diagramName] [val rootName]{ |
| |
| // Get the element in the Model Explorer. |
| with [get-view "Model Explorer" | get-tree] { |
| get-item $rootName | click |
| get-item $pathOldName | click |
| } |
| |
| // Set the property Name with the new value. |
| with [get-view $properties | get-editbox -after [get-label Name]] { |
| set-text $newName |
| key-type Enter |
| } |
| |
| // Make sure the element's name has been modified. |
| get-view $modelExplorer | get-tree | get-item $rootName | get-item $pathNewName |
| | equals true |
| } |
| ------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- |