use of com.intellij.lang.ant.config.impl.BuildTask in project intellij-community by JetBrains.
the class TreeView method getDescriptorForTaskNode.
@Nullable
private OpenFileDescriptor getDescriptorForTaskNode(MessageNode node) {
final String[] text = node.getText();
if (text == null || text.length == 0)
return null;
final String taskName = text[0];
final TreeNode parentNode = node.getParent();
if (!(parentNode instanceof MessageNode))
return null;
final MessageNode messageNode = (MessageNode) parentNode;
if (messageNode.getType() != AntBuildMessageView.MessageType.TARGET)
return null;
final BuildTask task = ((AntBuildModelBase) myBuildFile.getModel()).findTask(messageNode.getText()[0], taskName);
return (task == null) ? null : task.getOpenFileDescriptor();
}
Aggregations