Examples of Diff


Examples of org.custommonkey.xmlunit.Diff

    public final void assertEqual(Document expected, Document actual) {

        expected.getDocumentElement().normalize();
        actual.getDocumentElement().normalize();

        Diff diff = compareXML(expected, actual);

        assertEquals("Test if the assertion document is equal, " + diff.toString(), true, diff.similar());
    }
View Full Code Here

Examples of org.eclipse.compare.internal.merge.DocumentMerger.Diff

    // return;

    if (fCenterButton != null && !fCenterButton.isDisposed())
      fCenterButton.setVisible(false);

    Diff oldDiff = fCurrentDiff;

    if (d != null && revealAndSelect) {

      // before we set fCurrentDiff we change the selection
      // so that the paint code uses the old background colors
      // otherwise selection isn't drawn correctly
      if (d.isToken() || !fHighlightTokenChanges || deep
          || !d.hasChildren()) {
        if (isThreeWay() && !isIgnoreAncestor())
          fAncestor.setSelection(d.getPosition(ANCESTOR_CONTRIBUTOR));
        fLeft.setSelection(d.getPosition(LEFT_CONTRIBUTOR));
        fRight.setSelection(d.getPosition(RIGHT_CONTRIBUTOR));
      } else {
        if (isThreeWay() && !isIgnoreAncestor())
          fAncestor.setSelection(new Position(d
              .getPosition(ANCESTOR_CONTRIBUTOR).offset, 0));
        fLeft.setSelection(new Position(
            d.getPosition(LEFT_CONTRIBUTOR).offset, 0));
        fRight.setSelection(new Position(d
            .getPosition(RIGHT_CONTRIBUTOR).offset, 0));
      }

      // now switch diffs
      fCurrentDiff = d;
      revealDiff(d, d.isToken());
    } else {
      fCurrentDiff = d;
    }

    Diff d1 = oldDiff != null ? oldDiff.getParent() : null;
    Diff d2 = fCurrentDiff != null ? fCurrentDiff.getParent() : null;
    if (d1 != d2) {
      updateDiffBackground(d1);
      updateDiffBackground(d2);
    }
View Full Code Here

Examples of org.eclipse.egit.ui.internal.blame.BlameRevision.Diff

        .grab(true, true).create());
    diffComposite.setLayout(GridLayoutFactory.fillDefaults().create());
  }

  private void createDiff(RevCommit parent) {
    Diff diff = revision.getDiffToParent(parent);
    if (diff != null) {
      try {
        createDiffLinkAndText(parent, diff);
      } catch (IOException e) {
        String msg = "Error creating diff in blame information control for commit " //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.orion.server.git.objects.Diff

      String pattern = relativePath;
      pattern = pattern.isEmpty() ? null : pattern;
      if (parts == null || "uris,diff".equals(parts) || "diff,uris".equals(parts)) //$NON-NLS-1$ //$NON-NLS-2$
        return handleMultiPartGet(request, response, db, gitSegment, pattern);
      if ("uris".equals(parts)) { //$NON-NLS-1$
        OrionServlet.writeJSONResponse(request, response, new Diff(getURI(request), db).toJSON(), JsonURIUnqualificationStrategy.ALL_NO_GIT);
        return true;
      }
      if ("diff".equals(parts)) //$NON-NLS-1$
        return handleGetDiff(request, response, db, gitSegment, pattern, response.getOutputStream());
      if ("diffs".equals(parts)) //$NON-NLS-1$
View Full Code Here

Examples of org.exist.versioning.Diff

            properties.setProperty("user", context.getUser().getName());

            int nodeNr = builder.startElement(VersioningTrigger.ELEMENT_VERSION, null);
            VersioningTrigger.writeProperties(receiver, properties);

            Diff diff = new StandardDiff(context.getBroker());
            diff.diff(doc1, doc2);
            diff.diff2XML(receiver);

            builder.endElement();
            return builder.getDocument().getNode(nodeNr);
        } catch (SAXException e) {
            throw new XPathException(this, "Caugt error while generating diff: " + e.getMessage(), e);
View Full Code Here

Examples of org.geotools.data.Diff

     *
     * @param state ContentState for the transaction
     */
    public DiffTransactionState(ContentState state) {
        this.state = state;
        this.diff = new Diff();
    }
View Full Code Here

Examples of org.jboss.seam.wiki.util.Diff

        String[] a = ((WikiDocument)selectedHistoricalFile).getContent().split("\n");
        String[] b = ((WikiDocument)currentFile).getContent().split("\n");

        StringBuilder result = new StringBuilder();
        List<Diff.Difference> differences = new Diff(a, b).diff();

        // TODO: Externalize and i18n these strings
        for (Diff.Difference diff : differences) {
            int        delStart = diff.getDeletedStart();
            int        delEnd   = diff.getDeletedEnd();
View Full Code Here

Examples of org.locationtech.geogig.web.api.commands.Diff

     *
     * @param options the parameter set
     * @return the built command
     */
    static Diff buildDiff(ParameterSet options) {
        Diff command = new Diff();
        command.setOldRefSpec(options.getFirstValue("oldRefSpec", null));
        command.setNewRefSpec(options.getFirstValue("newRefSpec", null));
        command.setPathFilter(options.getFirstValue("pathFilter", null));
        command.setShowGeometryChanges(Boolean.parseBoolean(options.getFirstValue(
                "showGeometryChanges", "false")));
        command.setPage(parseInt(options, "page", 0));
        command.setElementsPerPage(parseInt(options, "show", 30));
        return command;
    }
View Full Code Here

Examples of org.netbeans.api.diff.Diff

            this.revision2 = revision2;
            this.showLastDifference = showLastDifference;
        }

        public void run() {
            final Diff diff = Diff.getDefault();
            final DiffStreamSource s1 = new DiffStreamSource(header.getFile(), revision1, revision1);
            final DiffStreamSource s2 = new DiffStreamSource(header.getFile(), revision2, revision2);

            // it's enqueued at ClientRuntime queue and does not return until previous request handled
            s1.getMIMEType()// triggers s1.init()
            if (cancelled) {
                return;
            }
            s2.getMIMEType()// triggers s2.init()
            if (cancelled) {
                return;
            }
            if (currentTask != this) {
                return;
            }
            SwingUtilities.invokeLater(new Runnable() {

                public void run() {
                    try {
                        if (cancelled) {
                            return;
                        }
                        final DiffView view = diff.createDiff(s1, s2);
                        if (currentTask == ShowDiffTask.this) {
                            currentDiff = view;
                            setBottomComponent(currentDiff.getComponent());
                            if (currentDiff.getDifferenceCount() > 0) {
                                currentDifferenceIndex = showLastDifference ? currentDiff.getDifferenceCount() - 1 : 0;
View Full Code Here

Examples of org.ontoware.rdf2go.model.Diff

  }
 
  @Override
  public boolean isIsomorphicWith(Model other) {
    ClosableIterator<Statement> it = other.iterator();
    Diff diff = this.getDiff(it);
    it.close();
    Iterator<Statement> addIt = diff.getAdded().iterator();
    Iterator<Statement> removeIt = diff.getAdded().iterator();
    boolean result = !addIt.hasNext() && !removeIt.hasNext();
    return result;
  }
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.