use of org.eclipse.che.ide.workspace.WorkspacePresenter in project che by eclipse.
the class WorkspacePresenterPersistenceTest method setUp.
@Before
public void setUp() throws Exception {
Map<String, Perspective> map = new HashMap<>();
map.put("perspective1", perspective1);
map.put("perspective2", perspective2);
perspectiveManager = new PerspectiveManager(map, "perspective1");
when(perspectiveManagerProvider.get()).thenReturn(perspectiveManager);
presenter = new WorkspacePresenter(workspaceView, perspectiveManagerProvider, mainMenuPresenter, statusPanelGroupPresenter, toolbarPresenter, "perspective1");
}
use of org.eclipse.che.ide.workspace.WorkspacePresenter in project che by eclipse.
the class BootstrapController method displayIDE.
private void displayIDE() {
// Start UI
SimpleLayoutPanel mainPanel = new SimpleLayoutPanel();
RootLayoutPanel.get().add(mainPanel);
// Make sure the root panel creates its own stacking context
RootLayoutPanel.get().getElement().getStyle().setZIndex(0);
WorkspacePresenter workspacePresenter = workspaceProvider.get();
// Display IDE
workspacePresenter.go(mainPanel);
// Bind browser's window events
Window.addWindowClosingHandler(new Window.ClosingHandler() {
@Override
public void onWindowClosing(Window.ClosingEvent event) {
eventBus.fireEvent(WindowActionEvent.createWindowClosingEvent(event));
}
});
Window.addCloseHandler(new CloseHandler<Window>() {
@Override
public void onClose(CloseEvent<Window> event) {
eventBus.fireEvent(WindowActionEvent.createWindowClosedEvent());
}
});
}
Aggregations