use of org.eclipse.che.ide.api.parts.PartStack in project che by eclipse.
the class AbstractPerspectiveTest method nullShouldBeFound.
@Test
public void nullShouldBeFound() {
when(partStackPresenter.containsPart(partPresenter)).thenReturn(true);
PartStack partStack = perspective.findPartStackByPart(partPresenter);
assertSame(partStack, partStackPresenter);
}
use of org.eclipse.che.ide.api.parts.PartStack in project che by eclipse.
the class AbstractPerspectiveTest method nullShouldBeReturnedWhenPartIsNotFound.
@Test
public void nullShouldBeReturnedWhenPartIsNotFound() {
PartStack partStack = perspective.findPartStackByPart(partPresenter);
assertSame(partStack, null);
}
use of org.eclipse.che.ide.api.parts.PartStack 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