|
|
|
Re: RCP Testing -- Contribution Identities [message #1699676 is a reply to message #1699592] |
Thu, 25 June 2015 18:34 |
Eclipse User |
|
|
|
Hmm, I see your point. I think you'll need to write an SWTBot Finder that knows how to traverse E4-level concepts: the org.eclipse.ui.menus extension point is used to populate E4-level toolbars.
org.eclipse.swtbot.e4.finder has a MenuFinder and ContextMenuFinder but they are actually SWT-based rather than E4-based, so they're not perfect exemplars to follow. Each of the E4 UI Elements (MUIElement) generally have a corresponding SWT widget that you can obtain using MUIElement#getWidget(). Each of these widgets has a back pointer to the MUIElement using the widget's data dictionary using the key AbstractPartRenderer.OWNING_ME = "modelElement".
So you can get the current MWindow, verify it's a MTrimmedWindow, and check its MTrimmedWindow > getTrimBars(). And then iterate over the contents looking for MHandledItems whose elementId matches the "id" or whose command matches the "commandId" (whichever you want).
And then contribute it back to SWTBot
Brian.
|
|
|
Powered by
FUDForum. Page generated in 0.02754 seconds