Package aQute.bnd.service.diff

Examples of aQute.bnd.service.diff.Diff


                        reporter.error( "%s: %s; detected %s, suggested %s",
                                        info.packageName, diffMessage, info.newerVersion, info.suggestedVersion );
                    }
                }

                Diff packageDiff = info.packageDiff;

                Delta delta = packageDiff.getDelta();

                switch ( delta )
                {
                    case UNCHANGED:
                        if ( ( suggestedVersion.getMajor() != newerVersion.getMajor() )
View Full Code Here


    if (parent instanceof Tree) {
      return ((Tree) parent).getChildren().length > 0;
    }

    if (parent instanceof Diff) {
      Diff diff = (Diff) parent;
            return getChildren(diff).length > 0;
    }

    return false;
  }
View Full Code Here

  @Override
    public Image getImage(Object element) {

    if (element instanceof Baseline) {
        Diff apiDiff = ((Baseline)element).getDiff() != null ? ((Baseline)element).getDiff().get("<api>") : null; //$NON-NLS-1$
        if (apiDiff == null) {
            apiDiff = ((Baseline)element).getDiff();
        }
            return BundleTreeImages.resolveImage("bundle", apiDiff.getDelta().toString().toLowerCase(), null, null); //$NON-NLS-1$
    }
    if (element instanceof Info) {
      Info tree = (Info) element;
      String type = "package"; //$NON-NLS-1$
      String delta = "changed" + '_' + tree.packageDiff.getDelta().toString().toLowerCase(); //$NON-NLS-1$
View Full Code Here

    if (element instanceof Baseline) {
      return ((Baseline) element).getBsn();
    }

    if (element instanceof Diff) {
      Diff diff = (Diff) element;
      switch (diff.getType()) {
      case API:
        return Type.API.toString();
      case MANIFEST:
        return Type.MANIFEST.toString();
      case RESOURCES:
        return Type.RESOURCES.toString();
      case RESOURCE:
          return diff.getName();
      default:
        return diff.getName();
      }
    }
    if (element instanceof Tree) {
      Tree tree = (Tree) element;
      switch (tree.getType()) {
View Full Code Here

    if (element instanceof Baseline) {
        return BundleTreeImages.resolveImage("bundle", ((Baseline)element).getDiff().getDelta().toString().toLowerCase(), null, null); //$NON-NLS-1$
    }
    if (element instanceof Diff) {
      Diff tree = (Diff) element;
      String type = tree.getType().toString().toLowerCase();

      String strDelta = getDeltaString(tree);
      String impExp = null;
      if (tree.getType() == Type.PACKAGE) {
        impExp = "export"; //$NON-NLS-1$
      } else if (tree.getType() == Type.RESOURCE) {
          String name = tree.getName();
        int idx = name.lastIndexOf('.');
        if (idx > -1) {
          type = "dot_" + name.substring(idx + 1); //$NON-NLS-1$
        }
      }
      return BundleTreeImages.resolveImage(type, strDelta, impExp, null);
    }
    if (element instanceof Tree) {
      Tree tree = (Tree) element;
      String type = tree.getType().toString().toLowerCase();
      String impExp = null;
      if (tree.getType() == Type.PACKAGE) {
        impExp = "export"; //$NON-NLS-1$
      } else if (tree.getType() == Type.RESOURCE) {
                String name = tree.getName();
        int idx = name.lastIndexOf('.');
        if (idx > 0) {
          type = "dot_" + name.substring(idx + 1); //$NON-NLS-1$
        }
      }
View Full Code Here

     */
    public static boolean jarsDiffer(File first, File second) throws Exception {
        Differ di = new DiffPluginImpl();
        Tree n = di.tree(new Jar(second));
        Tree o = di.tree(new Jar(first));
        Diff diff = n.diff(o);
        for (Diff child : diff.getChildren()) {
            for (Diff childc : child.getChildren()) {
                if (childc.getDelta() == Delta.UNCHANGED || childc.getDelta() == Delta.IGNORED) {
                    continue;
                }
                System.out.println(childc);
View Full Code Here

TOP

Related Classes of aQute.bnd.service.diff.Diff

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.