Java 类com.intellij.lang.ant.config.AntBuildModelBase 实例源码

项目:consulo-apache-ant    文件:AntBuildActionGroup.java   
private static void fillGroup(final AntBuildFile buildFile, final DefaultActionGroup group, final AntConfiguration antConfiguration) {
  final AntBuildModelBase model = (AntBuildModelBase)buildFile.getModel();
  if (model.getDefaultTargetName() != null) {
    DefaultActionGroup subgroup = new DefaultActionGroup();
    subgroup.add(getOrCreateAction(buildFile, TargetAction.DEFAULT_TARGET_NAME, new String[]{TargetAction.DEFAULT_TARGET_NAME}, null,
                                   model.getDefaultTargetActionId()));
    group.add(subgroup);
  }

  final Set<String> addedTargetNames = StringSetSpinAllocator.alloc();
  try {
    addGroupOfTargets(buildFile, model.getFilteredTargets(), addedTargetNames, group);
    addGroupOfTargets(buildFile, antConfiguration.getMetaTargets(buildFile), addedTargetNames, group);
  }
  finally {
    StringSetSpinAllocator.dispose(addedTargetNames);
  }
}
项目:intellij-ce-playground    文件:TreeView.java   
private
@Nullable
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();
}
项目:tools-idea    文件:TreeView.java   
private
@Nullable
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();
}
项目:consulo-apache-ant    文件:TreeView.java   
private
@Nullable
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();
}
项目:consulo-apache-ant    文件:AntBuildFileImpl.java   
@Override
public AntBuildModelBase getModel()
{
    return (AntBuildModelBase) myAntConfiguration.getModel(this);
}
项目:consulo-apache-ant    文件:AntBuildFileImpl.java   
@Override
@Nullable
public AntBuildModelBase getModelIfRegistered()
{
    return (AntBuildModelBase) myAntConfiguration.getModelIfRegistered(this);
}