예제 #1
0
  private void executeElementAction(ResourceBarElement element) {

    if (elementActions.containsKey(element)) {

      IAction action = elementActions.get(element);
      action.execute();
    }
  }
예제 #2
0
  /**
   * Sets the action to be executed when the specified resource bar element is clicked by the user
   *
   * @param element The resource bar element with which the action is associated
   * @param action The action to be executed
   */
  public void setElementAction(ResourceBarElement element, IAction action) {

    elementActions.put(element, action);
  }