Examples of Edit


Examples of com.citytechinc.cq.component.annotations.widgets.rte.Edit

  private RtePlugin buildEditPlugin(RichTextEditor rteAnnotation) {

    if (rteAnnotation.edit().length > 0) {
      Edit[] editAnnotations = rteAnnotation.edit();
      Edit editAnnotation = editAnnotations[0];

      List<String> editFeatures = new ArrayList<String>();

      if (editAnnotation.cut()) {
        editFeatures.add("cut");
      }
      if (editAnnotation.copy()) {
        editFeatures.add("copy");
      }
      if (editAnnotation.pasteDefault()) {
        editFeatures.add("paste-default");
      }
      if (editAnnotation.pastePlaintext()) {
        editFeatures.add("paste-plaintext");
      }
      if (editAnnotation.pasteWordhtml()) {
        editFeatures.add("paste-wordhtml");
      }
      RtePluginParameters widgetParameters = new RtePluginParameters();
      widgetParameters.setFieldName("edit");
      widgetParameters.setFeatures(convertFeatures(editFeatures));
View Full Code Here

Examples of com.citytechinc.cq.component.annotations.widgets.rte.Edit

  private RtePlugin buildEditPlugin(RichTextEditor rteAnnotation) {

    if (rteAnnotation.edit().length > 0) {
      Edit[] editAnnotations = rteAnnotation.edit();
      Edit editAnnotation = editAnnotations[0];

      List<String> editFeatures = new ArrayList<String>();

      if (editAnnotation.cut()) {
        editFeatures.add("cut");
      }
      if (editAnnotation.copy()) {
        editFeatures.add("copy");
      }
      if (editAnnotation.pasteDefault()) {
        editFeatures.add("paste-default");
      }
      if (editAnnotation.pastePlaintext()) {
        editFeatures.add("paste-plaintext");
      }
      if (editAnnotation.pasteWordhtml()) {
        editFeatures.add("paste-wordhtml");
      }
      RtePluginParameters widgetParameters = new RtePluginParameters();
      widgetParameters.setFieldName("edit");
      widgetParameters.setFeatures(convertFeatures(editFeatures));
View Full Code Here

Examples of com.citytechinc.cq.component.annotations.widgets.rte.Edit

  private RtePlugin buildEditPlugin(RichTextEditor rteAnnotation) {

    if (rteAnnotation.edit().length > 0) {
      Edit[] editAnnotations = rteAnnotation.edit();
      Edit editAnnotation = editAnnotations[0];

      List<String> editFeatures = new ArrayList<String>();

      if (editAnnotation.cut()) {
        editFeatures.add("cut");
      }
      if (editAnnotation.copy()) {
        editFeatures.add("copy");
      }
      if (editAnnotation.pasteDefault()) {
        editFeatures.add("paste-default");
      }
      if (editAnnotation.pastePlaintext()) {
        editFeatures.add("paste-plaintext");
      }
      if (editAnnotation.pasteWordhtml()) {
        editFeatures.add("paste-wordhtml");
      }
      RtePluginParameters widgetParameters = new RtePluginParameters();
      widgetParameters.setFieldName("edit");
      widgetParameters.setFeatures(convertFeatures(editFeatures));
View Full Code Here

Examples of ket.Edit

  }


  public void recursiveSubstitute(MathCollection mathCollection) { // CLARIFY
    Vector<Branch> branchVector = getBranchVector(false, Function.WITH);
    Edit e = new Edit(tokenList);
    Collections.reverse(branchVector);
    for (Branch branch : branchVector) {
      Argument first = branch.firstChild();
      if (first==null) return;
      for (int i=1; i<branch.size(); i++) {
        e.setCurrent(first);
        e.substitute(branch.getChild(i));
      }
      e.replace(branch, first);
    }
  }
View Full Code Here

Examples of ket.Edit

   * Parse raw expressions to avoid hard-coding substitutes while allowing references to 'x' to be replaced with the corresponding variable, x.
   */
  public static Argument parseAs(String argumentString, Argument x) { // "sin(x)", token(q) -> sin(q)
    Argument a = ArgumentParser.parseArgument(argumentString, Ket.KNOWN_ARGUMENTS, null, null);
    if (a==null) return null;
    Edit e = new Edit(a);
    e.substitute(new Token(new Word("x")), x);
    return e.getCurrent();
  }
View Full Code Here

Examples of lmnd.model.command.Edit

                // Get directory name.
                File file = getSelectedFile();
                CommandData data = new CommandData();
                data.addItem(Keys.FILE, file);
                // Create command.
                Edit edit = new Edit();
                try {
                        edit.perform(data);
                } catch (Exception exception) {
                        exception.printStackTrace();
                }
        }
View Full Code Here

Examples of mallemuck.model.command.Edit

                // Get directory name.
                File file = getSelectedFile();
                CommandData data = new CommandData();
                data.addItem(Keys.FILE, file);
                // Create command.
                Edit edit = new Edit();
                try {
                        edit.perform(data);
                } catch (Exception exception) {
                        exception.printStackTrace();
                }
        }
View Full Code Here

Examples of org.eclipse.jgit.diff.Edit

    if (editList.isEmpty()) {
      newStartLine = 0;
      newLineCount = 0;
    } else {
      newStartLine = editList.get(0).getBeginB();
      Edit last = editList.get(editList.size() - 1);
      newLineCount = last.getEndB() - newStartLine;
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.diff.Edit

      editList = new EditList();
      final byte[] buf = file.buf;
      int c = nextLF(buf, startOffset);
      int oLine = old.startLine;
      int nLine = newStartLine;
      Edit in = null;

      SCAN: for (; c < endOffset; c = nextLF(buf, c)) {
        switch (buf[c]) {
        case ' ':
        case '\n':
          in = null;
          oLine++;
          nLine++;
          continue;

        case '-':
          if (in == null) {
            in = new Edit(oLine - 1, nLine - 1);
            editList.add(in);
          }
          oLine++;
          in.extendA();
          continue;

        case '+':
          if (in == null) {
            in = new Edit(oLine - 1, nLine - 1);
            editList.add(in);
          }
          nLine++;
          in.extendB();
          continue;

        case '\\': // Matches "\ No newline at end of file"
          continue;
View Full Code Here

Examples of org.eclipse.jgit.diff.Edit

      // more responsibility for the result. Remaining edits can
      // be safely ignored.
      if (r == null)
        return;

      Edit e = editList.get(eIdx);

      // Edit ends before the next candidate region. Skip the edit.
      if (e.getEndB() <= r.sourceStart) {
        eIdx++;
        continue;
      }

      // Next candidate region starts before the edit. Assign some
      // of the blame onto A, but possibly split and also on B.
      if (r.sourceStart < e.getBeginB()) {
        int d = e.getBeginB() - r.sourceStart;
        if (r.length <= d) {
          // Pass the blame for this region onto A.
          Region next = r.next;
          r.sourceStart = e.getBeginA() - d;
          aTail = add(aTail, a, r);
          r = next;
          continue;
        }

        // Split the region and assign some to A, some to B.
        aTail = add(aTail, a, r.splitFirst(e.getBeginA() - d, d));
        r.slideAndShrink(d);
      }

      // At this point e.getBeginB() <= r.sourceStart.

      // An empty edit on the B side isn't relevant to this split,
      // as it does not overlap any candidate region.
      if (e.getLengthB() == 0) {
        eIdx++;
        continue;
      }

      // If the region ends before the edit, blame on B.
      int rEnd = r.sourceStart + r.length;
      if (rEnd <= e.getEndB()) {
        Region next = r.next;
        bTail = add(bTail, b, r);
        r = next;
        if (rEnd == e.getEndB())
          eIdx++;
        continue;
      }

      // This region extends beyond the edit. Blame the first
      // half of the region on B, and process the rest after.
      int len = e.getEndB() - r.sourceStart;
      bTail = add(bTail, b, r.splitFirst(r.sourceStart, len));
      r.slideAndShrink(len);
      eIdx++;
    }

    if (r == null)
      return;

    // For any remaining region, pass the blame onto A after shifting
    // the source start to account for the difference between the two.
    Edit e = editList.get(editList.size() - 1);
    int endB = e.getEndB();
    int d = endB - e.getEndA();
    if (aTail == null)
      a.regionList = r;
    else
      aTail.next = r;
    do {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.