use of org.eclipse.che.ide.api.parts.PartStack in project che by eclipse.
the class AbstractPerspectiveTest method partStackShouldBeReturned.
@Test
public void partStackShouldBeReturned() {
perspective.addPart(partPresenter, INFORMATION);
PartStack partStack = perspective.getPartStack(INFORMATION);
assertSame(partStack, partStackPresenter);
}
use of org.eclipse.che.ide.api.parts.PartStack in project che by eclipse.
the class AbstractPerspective method addPart.
/** {@inheritDoc} */
@Override
public void addPart(@NotNull PartPresenter part, @NotNull PartStackType type, @Nullable Constraints constraint) {
PartStack destPartStack = partStacks.get(type);
List<String> rules = part.getRules();
if (rules.isEmpty() || rules.contains(perspectiveId)) {
destPartStack.addPart(part, constraint);
return;
}
}
use of org.eclipse.che.ide.api.parts.PartStack in project che by eclipse.
the class AbstractPerspective method onMaximize.
@Override
public void onMaximize(PartStack partStack) {
if (partStack == null) {
return;
}
if (partStack.equals(maximizedPartStack)) {
return;
}
maximizedPartStack = partStack;
for (PartStack ps : partStacks.values()) {
if (!ps.equals(partStack)) {
ps.collapse();
}
}
partStack.maximize();
}
use of org.eclipse.che.ide.api.parts.PartStack in project che by eclipse.
the class AbstractPerspective method setActivePart.
/** {@inheritDoc} */
@Override
public void setActivePart(@NotNull PartPresenter part, @NotNull PartStackType type) {
PartStack destPartStack = partStacks.get(type);
destPartStack.setActivePart(part);
}
use of org.eclipse.che.ide.api.parts.PartStack in project che by eclipse.
the class AbstractPerspective method openActivePart.
/**
* Opens previous active tab on current perspective.
*
* @param partStackType
* part type on which need open previous active part
*/
protected void openActivePart(@NotNull PartStackType partStackType) {
PartStack partStack = partStacks.get(partStackType);
partStack.openPreviousActivePart();
}
Aggregations