Package org.eclipse.ui.internal.cheatsheets.data

Examples of org.eclipse.ui.internal.cheatsheets.data.AbstractExecutable


    spacerData.maxWidth = 0;
    spacerData.indent = LABEL_MARGIN;
    spacer.setLayoutData(spacerData);
    added++;

    AbstractExecutable subExecutable = null;
    if(sub.getPerformWhen() != null) {
      sub.getPerformWhen().setSelectedExecutable(viewer.getManager());
      subExecutable = sub.getPerformWhen().getSelectedExecutable();
    } else {
      subExecutable = sub.getExecutable();
    }
   
    /*
     * Actions are disabled while inside dialogs.
     */
    final int fi = index;
    ImageHyperlink startButton = null;
    boolean isActionShown = false;
    if (subExecutable != null && !isInDialogMode()) {
      added++;
      isActionShown = true;
      startButton = createButton(buttonComposite, CheatSheetPlugin.getPlugin().getImage(ICheatSheetResource.CHEATSHEET_ITEM_BUTTON_START), this, itemColor, Messages.PERFORM_TASK_TOOLTIP);
      final ImageHyperlink finalStartButton = startButton;
      startButton.addHyperlinkListener(new HyperlinkAdapter() {
        public void linkActivated(HyperlinkEvent e) {
          viewer.runSubItemPerformExecutable(finalStartButton, fi);
        }
      });
      holder.setStartButton(startButton);
    }
    if (!isActionShown || subExecutable.isConfirm() || !subExecutable.isRequired()) {
      added++;
      final ImageHyperlink completeButton = createButton(buttonComposite, CheatSheetPlugin.getPlugin().getImage(ICheatSheetResource.CHEATSHEET_ITEM_BUTTON_COMPLETE), this, itemColor, Messages.COMPLETE_TASK_TOOLTIP);
      completeButton.addHyperlinkListener(new HyperlinkAdapter() {
        public void linkActivated(HyperlinkEvent e) {
          viewer.advanceSubItem(completeButton, true, fi);
View Full Code Here


        filler.setLayoutData(fillerData);
    }
  }

  private AbstractExecutable getExecutable() {
    AbstractExecutable executable = item.getExecutable();
    if(executable == null) {
      if(item.getPerformWhen() != null){
        executable = item.getPerformWhen().getSelectedExecutable();
      }
    }
View Full Code Here

  private AbstractExecutable getExecutable(int index) {
    if (item.getSubItems() != null && item.getSubItems().size()>0 && listOfSubItemCompositeHolders != null) {
      SubItemCompositeHolder s = (SubItemCompositeHolder) listOfSubItemCompositeHolders.get(index);
      if(s != null) {
        SubItem subItem = s.getSubItem();
        AbstractExecutable executable = subItem.getExecutable();
        if(executable == null) {
          if(subItem.getPerformWhen() != null){
            executable = subItem.getPerformWhen().getSelectedExecutable();
          }
        }
View Full Code Here

    } else {
      createButtonComposite();
    }

    item.getPerformWhen().setSelectedExecutable(viewer.getManager());
    AbstractExecutable performExecutable = item.getPerformWhen().getSelectedExecutable();

    createButtons(performExecutable);
   
    if(refreshRequired) {
      refresh(buttonComposite);
View Full Code Here

    buttonsHandled = true;
  }
 
  /*package*/
  boolean hasConfirm() {
    AbstractExecutable executable = getExecutable();

    if (executable == null || executable.isConfirm()) {
      return true;
    }
    return false;
  }
View Full Code Here

    return false;
  }

  /*package*/
  boolean hasConfirm(int index) {
    AbstractExecutable executable = getExecutable(index);

    if (executable == null || executable.isConfirm()) {
      return true;
    }
    return false;
  }
View Full Code Here

  /*package*/
  byte runSubItemExecutable(CheatSheetManager csm, int index) {
    if (item.getSubItems() != null && item.getSubItems().size()>0 && listOfSubItemCompositeHolders != null) {
      SubItemCompositeHolder s = (SubItemCompositeHolder) listOfSubItemCompositeHolders.get(index);
      if(s != null) {
        AbstractExecutable executable = getExecutable(index);

        if(executable != null) {
          try {
            if(s.getThisValue() != null) {
              csm.setData("this", s.getThisValue()); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.cheatsheets.data.AbstractExecutable

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.