use of org.eclipse.ui.IPageService in project eclipse.platform.ui by eclipse-platform.
the class IPageServiceTest method testLocalPageService.
@Test
public void testLocalPageService() throws Throwable {
IWorkbenchPage page = fWindow.openPage(EmptyPerspective.PERSP_ID, getPageInput());
MockViewPart view = (MockViewPart) page.showView(MockViewPart.ID);
IPageService slaveService = view.getSite().getService(IPageService.class);
assertTrue(fWindow != slaveService);
perspEventReceived = false;
slaveService.addPerspectiveListener(this);
page.resetPerspective();
assertTrue(perspEventReceived);
page.hideView(view);
perspEventReceived = false;
page.resetPerspective();
assertFalse(perspEventReceived);
}
Aggregations