use of aQute.bnd.differ.Baseline.Info in project bndtools by bndtools.
the class BundleTree method getInitialSuggestedVersion.
protected Version getInitialSuggestedVersion(Object obj) {
if (initialSuggested == null) {
initialSuggested = new HashMap<Object, Version>();
}
Version version = initialSuggested.get(obj);
if (version != null) {
return version;
}
if (obj instanceof Info) {
version = ((Info) obj).suggestedVersion;
} else {
version = ((Baseline) obj).getSuggestedVersion();
}
initialSuggested.put(obj, version);
return version;
}
use of aQute.bnd.differ.Baseline.Info in project bndtools by bndtools.
the class InfoContentProvider method getChildren.
@Override
public Object[] getChildren(Object parent) {
if (parent instanceof List) {
return ((List<?>) parent).toArray();
}
if (parent instanceof Baseline) {
if (isShowAll()) {
return ((Baseline) parent).getPackageInfos().toArray();
}
Set<Info> infos = ((Baseline) parent).getPackageInfos();
List<Info> filteredDiffs = new ArrayList<Info>();
for (Info info : infos) {
if (info.packageDiff.getDelta() == Delta.IGNORED || (info.packageDiff.getDelta() == Delta.UNCHANGED && info.olderVersion.equals(info.suggestedVersion))) {
continue;
}
filteredDiffs.add(info);
}
return filteredDiffs.toArray(new Info[0]);
}
return new Object[0];
}
Aggregations