if (model == null) {
return;
}
if (munger instanceof Advice) {
Advice advice = (Advice) munger;
if (advice.getKind().isPerEntry() || advice.getKind().isCflow()) {
// TODO: might want to show these in the future
return;
}
if (World.createInjarHierarchy) {
createHierarchyForBinaryAspect(model, advice);
}
IRelationshipMap mapper = model.getRelationshipMap();
IProgramElement targetNode = getNode(model, matchedShadow);
if (targetNode == null) {
return;
}
boolean runtimeTest = advice.hasDynamicTests();
IProgramElement.ExtraInformation extra = new IProgramElement.ExtraInformation();
String adviceHandle = getHandle(model, advice);
if (adviceHandle == null) {
return;
}
extra.setExtraAdviceInformation(advice.getKind().getName());
IProgramElement adviceElement = model.getHierarchy().findElementForHandle(adviceHandle);
if (adviceElement != null) {
adviceElement.setExtraInfo(extra);
}
String targetHandle = targetNode.getHandleIdentifier();
if (advice.getKind().equals(AdviceKind.Softener)) {
IRelationship foreward = mapper.get(adviceHandle, IRelationship.Kind.DECLARE_SOFT, SOFTENS, runtimeTest, true);
if (foreward != null) {
foreward.addTarget(targetHandle);
}