예제 #1
0
 /** {@inheritDoc} */
 @Override
 public void setActivePart(@NotNull PartPresenter part) {
   PartStack destPartStack = findPartStackByPart(part);
   if (destPartStack != null) {
     destPartStack.setActivePart(part);
   }
 }
예제 #2
0
  /** {@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);
    }
  }
예제 #3
0
  /** {@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);
  }
예제 #4
0
 /** {@inheritDoc} */
 @Override
 public void setActivePart(@NotNull PartPresenter part, @NotNull PartStackType type) {
   PartStack destPartStack = partStacks.get(type);
   destPartStack.setActivePart(part);
 }
예제 #5
0
  /**
   * 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();
  }