Unable to access a button that is located in the header of a SharedHeaderFormEditor. [message #662214] |
Tue, 29 March 2011 18:24 |
Abu Zak Messages: 11 Registered: February 2010 |
Junior Member |
|
|
I'm unable to access a button that is located in the header of a SharedHeaderFormEditor.
I tried several ways, they all fail. For example:
- SWTBotButton generateCodeButton1 = swtWorkbenchBot.button("Generate Code");
(raises an unfound widget exception)
- Matcher matcher = allOf(widgetOfType(Button.class),
withMnemonic("Generate Code"), withStyle(SWT.PUSH, "SWT.PUSH"));
List<Widget> widgets = swtWorkbenchBot.getFinder().findControls(matcher);
(returns an empty list)
I would appreciate any help
---------------------------------------------
Note that when I use the SpyView I can see that the button is located at:
Location:
//Shell/-1//Composite/4//Composite/0//Composite/12//Composit e/0//Composite/0//SashForm/0//ScrolledForm/0//Form/0//FormHe ading/0//ToolBar/1//Button/0
Layout Information:
Button {Generate Code}
Style: PUSH | CENTER | LEFT_TO_RIGHT
Layout Data: null
Bounds: Rectangle {0, 0, 109, 22}
Children: 0
Siblings: 2
[*]Button {Generate Code}: Layout Data: null
Button {Support}: Layout Data: null
Parent Tree:
ToolBar {}[1]@
Layout: null
LayoutData: null
FormHeading {}[0]@
Layout: FormHeading$FormHeadingLayout
LayoutData: null
Form {}[0]@
Layout: Form$FormLayout
LayoutData: null
ScrolledForm {}[0]@
Layout: ScrolledCompositeLayout
LayoutData: SashFormData
SashForm {}[0]@
Layout: SashFormLayout
LayoutData: null
Composite {}[0]@
Layout: FillLayout
LayoutData: null
Composite {}[0]@
Layout: FillLayout
LayoutData: null
Composite {}[12]@
Layout: null
LayoutData: null
Composite {}[0]@
Layout: null
LayoutData: null
Composite {}[4]@
Layout: StackLayout
LayoutData: null
Shell {CCS Edit - ccs-c6flo...}[-1]@
Layout: TrimLayout
LayoutData: null
[Updated on: Tue, 29 March 2011 18:33] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03038 seconds