/** {@inheritDoc} */ @Override public void setActivePart(@NotNull PartPresenter part) { PartStack destPartStack = findPartStackByPart(part); if (destPartStack != null) { destPartStack.setActivePart(part); } }
/** {@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() && !destPartStack.containsPart(part)) { destPartStack.addPart(part, constraint); return; } if (rules.contains(perspectiveId)) { destPartStack.addPart(part, constraint); } }
/** {@inheritDoc} */ @Override public void go(@NotNull AcceptsOneWidget container) { PartStack information = getPartStack(INFORMATION); PartStack navigation = getPartStack(NAVIGATION); PartStack editing = getPartStack(EDITING); if (information == null || navigation == null || editing == null) { return; } information.updateStack(); information.go(view.getInformationPanel()); navigation.go(view.getNavigationPanel()); editing.go(view.getEditorPanel()); container.setWidget(view); openActivePart(INFORMATION); openActivePart(NAVIGATION); }
/** {@inheritDoc} */ @Override public void setActivePart(@NotNull PartPresenter part, @NotNull PartStackType type) { PartStack destPartStack = partStacks.get(type); destPartStack.setActivePart(part); }
/** * 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(); }