/** Removes dependencies that are greater than overall result since they are irrelevant */ private void purgeDependencies() { int thisOrdinal = getEvaluationResult().ordinal(); for (Iterator<IRteDependency> iterator = fDependencies.iterator(); iterator.hasNext(); ) { IRteDependency d = iterator.next(); EEvaluationResult r = d.getEvaluationResult(); if (r.ordinal() > thisOrdinal) { iterator.remove(); cachedChildArray = null; } } }
@Override public void addStopItem(IRteComponentItem item, EEvaluationResult result) { if (fStopItems == null) fStopItems = new LinkedHashMap<IRteComponentItem, IRteDependencyItem>(); fStopItems.put(item, new RteDependencyItem(item, result)); if (fResult.ordinal() < result.ordinal()) fResult = result; }
@Override public String getDescription() { EEvaluationResult res = getEvaluationResult(); if (!fDependencies.isEmpty()) { switch (res) { case INSTALLED: case MISSING: case SELECTABLE: case UNAVAILABLE: case UNAVAILABLE_PACK: return CpStrings.RteDependencyResult_AdditionalComponentRequired; case INCOMPATIBLE: case FAILED: return CpStrings.RteDependencyResult_ComponentConficts; default: break; } } String s = null; if (fComponentItem != null && !res.isFulfilled()) { ICpComponentInfo ci = fComponentItem.getActiveCpComponentInfo(); if (ci != null && ci.getComponent() == null) { s = EEvaluationResult.MISSING.getDescription(); s += ". "; // $NON-NLS-1$ s += res.getDescription(); if (res == EEvaluationResult.UNAVAILABLE_PACK) { s += ": "; // $NON-NLS-1$ ICpPackInfo pi = ci.getPackInfo(); String id = pi.isVersionFixed() ? pi.getId() : pi.getPackFamilyId(); s += id; } return s; } } s = res.getDescription(); if (s != null) return s; return super.getDescription(); }
@Override public void addComponent(IRteComponent component, EEvaluationResult result) { IRteDependencyItem de = new RteDependencyItem(component, result); fComponentEntries.put(component, de); if (fResult.ordinal() < result.ordinal()) fResult = result; }