// TODO: might want to show these in the future
return;
}
IRelationshipMap mapper = AsmManager.getDefault().getRelationshipMap();
IProgramElement targetNode = getNode(AsmManager.getDefault().getHierarchy(), shadow);
boolean runtimeTest = ((BcelAdvice)munger).hasDynamicTests();
// Work out extra info to inform interested UIs !
IProgramElement.ExtraInformation ai = new IProgramElement.ExtraInformation();
String adviceHandle = advice.getHandle();
// What kind of advice is it?
// TODO: Prob a better way to do this but I just want to
// get it into CVS !!!
AdviceKind ak = ((Advice)munger).getKind();
ai.setExtraAdviceInformation(ak.getName());
IProgramElement adviceElement = AsmManager.getDefault().getHierarchy().findElementForHandle(adviceHandle);
adviceElement.setExtraInfo(ai);
if (adviceHandle != null && targetNode != null) {
if (targetNode != null) {
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);//foreward.getTargets().add(targetHandle);
IRelationship back = mapper.get(targetHandle, IRelationship.Kind.DECLARE, SOFTENED_BY,runtimeTest,true);
if (back != null) back.addTarget(adviceHandle);//back.getTargets().add(adviceHandle);
} else {
IRelationship foreward = mapper.get(adviceHandle, IRelationship.Kind.ADVICE, ADVISES,runtimeTest,true);
if (foreward != null) foreward.addTarget(targetHandle);//foreward.getTargets().add(targetHandle);
IRelationship back = mapper.get(targetHandle, IRelationship.Kind.ADVICE, ADVISED_BY,runtimeTest,true);
if (back != null) back.addTarget(adviceHandle);//back.getTargets().add(adviceHandle);
}
}
}