use of com.rockwellcollins.atc.agree.analysis.realtime.AgreePattern in project AGREE by loonwerks.
the class AgreeMenuListener method addResultsLinkingMenu.
private void addResultsLinkingMenu(IMenuManager manager, AnalysisResult result) {
if (result instanceof PropertyResult) {
PropertyResult pr = (PropertyResult) result;
Map<String, EObject> refMap = linker.getReferenceMap(pr.getParent());
EObject property = refMap.get(pr.getName());
if (property instanceof GuaranteeStatement) {
manager.add(createHyperlinkAction("Go To Guarantee", property));
}
if (property instanceof LemmaStatement) {
manager.add(createHyperlinkAction("Go To Lemma", property));
}
if (property instanceof AssumeStatement) {
manager.add(createHyperlinkAction("Go To Assumption", property));
}
if (property instanceof CallExpr) {
manager.add(createHyperlinkAction("Go To Node Call", property));
}
if (property instanceof AgreeStatement) {
AgreeStatement statement = (AgreeStatement) property;
if (statement.reference instanceof AgreePattern) {
AgreePattern pattern = (AgreePattern) statement.reference;
manager.add(createHyperlinkAction("Go To Pattern", pattern.reference));
}
}
}
}
Aggregations