use of org.eclipse.che.ide.api.parts.Perspective 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.api.parts.Perspective in project che by eclipse.
the class ExpandEditorAction method toggleExpand.
/**
* Expands or restores the editor.
*/
public void toggleExpand() {
Perspective perspective = perspectiveManager.getActivePerspective();
if (perspective == null) {
return;
}
PartStack partStack = perspective.getPartStack(PartStackType.EDITING);
if (partStack == null) {
return;
}
if (partStack.getPartStackState() == PartStack.State.NORMAL) {
perspective.maximizeCentralPartStack();
button.getElement().setInnerHTML(FontAwesome.COMPRESS);
} else {
perspective.restore();
button.getElement().setInnerHTML(FontAwesome.EXPAND);
}
}
Aggregations