use of com.intellij.struts2.graph.beans.ResultNode in project intellij-plugins by JetBrains.
the class StrutsDataModel method updateDataModel.
private void updateDataModel() {
final StrutsModel model = StrutsManager.getInstance(myProject).getModelByFile(myFile);
if (model == null) {
return;
}
for (final StrutsPackage strutsPackage : model.getStrutsPackages()) {
for (final Action action : strutsPackage.getActions()) {
final ActionNode actionNode = new ActionNode(action, action.getName().getStringValue());
addNode(actionNode);
for (final Result result : action.getResults()) {
final PathReference pathReference = result.getValue();
final String path = pathReference != null ? pathReference.getPath() : UNKNOWN;
final ResultNode resultNode = new ResultNode(result, path);
addNode(resultNode);
final String resultName = result.getName().getStringValue();
addEdge(new BasicStrutsEdge(actionNode, resultNode, resultName != null ? resultName : Result.DEFAULT_NAME));
}
}
}
}
Aggregations