Package org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan

Examples of org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan.ElementAction


      if (!(obj instanceof PlanElement))
        return;
      PlanElement firstSelectedEntry = (PlanElement) obj;
      PlanElement lastSelectedEntry = firstSelectedEntry;

      ElementAction type = firstSelectedEntry.getPlanElementAction();

      boolean singleTypeSelected = true;

      if (!theToolbar.isEnabled()
          && !view.getCurrentPlan().hasRebaseBeenStartedYet())
View Full Code Here


    public void widgetSelected(SelectionEvent e) {
      List<RebaseInteractivePlan.PlanElement> selected = getSelectedRebaseTodoLines();
      if (selected == null || selected.isEmpty())
        return;

      ElementAction typeToSet = type;
      if (type != ElementAction.PICK) {
        boolean allItemsHaveTargetType = true;
        for (RebaseInteractivePlan.PlanElement element : selected)
          allItemsHaveTargetType &= element.getPlanElementAction() == type;
        if (allItemsHaveTargetType) {
View Full Code Here

    TreeViewerColumn actionColumn = createColumn(headings[2], 90);
    actionColumn.setLabelProvider(new HighlightingColumnLabelProvider() {

      @Override
      public Image getImage(Object element) {
        ElementAction a = getAction(element);
        if (a != null) {
          switch (a) {
          case EDIT:
            return UIIcons.getImage(resources, UIIcons.EDITCONFIG);
          case FIXUP:
            if (RebaseInteractivePreferences.isOrderReversed())
              return UIIcons.getImage(resources,
                  UIIcons.FIXUP_DOWN);
            else
              return UIIcons.getImage(resources,
                  UIIcons.FIXUP_UP);
          case PICK:
            return UIIcons.getImage(resources, UIIcons.CHERRY_PICK);
          case REWORD:
            return UIIcons.getImage(resources, UIIcons.REWORD);
          case SKIP:
            return UIIcons.getImage(resources, UIIcons.REBASE_SKIP);
          case SQUASH:
            if (RebaseInteractivePreferences.isOrderReversed())
              return UIIcons.getImage(resources,
                  UIIcons.SQUASH_DOWN);
            else
              return UIIcons.getImage(resources,
                  UIIcons.SQUASH_UP);
          default:
            // fall through
          }
        }
        return super.getImage(element);
      }

      @Override
      public String getText(Object element) {
        ElementAction a = getAction(element);
        return (a != null) ? a.name() : super.getText(element);
      }

      private ElementAction getAction(Object element) {
        if (element instanceof PlanElement) {
          PlanElement planLine = (PlanElement) element;
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.internal.rebase.RebaseInteractivePlan.ElementAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.