I have a SourceViewer in my RCP application, and have added a MenuDetectListener to its textWidget (which is StyledText instance). I use this listener to invoke ISourceViewer.QUICK_ASSIST operation.
Now, when I try to automate the testing of this feature using RCPTT, when I right click in the text widget and select an option from the quick assist menu, recorded script is:
with [get-window "<window name>"] {
with [get-text-viewer] {
hover-text 1 2
set-caret-pos 1 2
}
get-window -from "CompletionProposalPopup.createProposalSelector()" | get-table | select "<quick assist option name>"
| click -default
}
However this fails on replay with error: "The Window "[-from, CompletionProposalPopup.createProposalSelector()]" could not be found."
I also tried
1) get-menu -path "<quick assist option name>" | double-click
2) get-text-viewer | hover-text 1 2 | mouse down -button Right
but in vain.
Can anyone help me on how to invoke the MenuDetectListener properly and select an option from the resulting Quick Assist menu?