Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How to test defineLayout method from IPerspectiveFactory
How to test defineLayout method from IPerspectiveFactory [message #555017] Wed, 25 August 2010 08:19 Go to next message
snieguu is currently offline snieguuFriend
Messages: 4
Registered: March 2010
Junior Member
I'd like to know if there is a way to check correctness of Layout of Views created in class that implements IPerspectiveLayouts. In other words I have
    private void defineLayout(final IPageLayout layout) {
        ...
        final IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.33f, editorArea);
        left.addPlaceholder(VIEW_ID);
        ...
     }

and in SWTBot test I want to check that after open view, It will appear in place defined in defineLayout method.
Re: How to test defineLayout method from IPerspectiveFactory [message #555096 is a reply to message #555017] Wed, 25 August 2010 12:59 Go to previous message
snieguu is currently offline snieguuFriend
Messages: 4
Registered: March 2010
Junior Member
I have found solution:
       final SWTBotView view = _bot.viewById(VIEW_ID);
       final ViewReference viewRef =  (ViewReference)view.getReference(); 
       final ViewPane pane = viewRef.getPane();
       final ILayoutContainer layoutContainer = pane.getContainer();
       final ViewStack viewStack = (ViewStack)layoutContainer;
       assertEquals(viewStack.getID(),"left");
Previous Topic:How to select a menu on a popup menu with SWTBOT?
Next Topic:Setting keyboard layout different to the system's default
Goto Forum:
  


Current Time: Fri Apr 19 01:27:31 GMT 2024

Powered by FUDForum. Page generated in 0.02070 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top