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

项目:intellij-ce-playground    文件:AntArtifactProperties.java   
@Nullable
public AntBuildTarget findTarget(final AntConfiguration antConfiguration) {
  String fileUrl = getFileUrl();
  String targetName = getTargetName();
  if (fileUrl == null || targetName == null) return null;

  final AntBuildFile[] buildFiles = antConfiguration.getBuildFiles();
  for (AntBuildFile buildFile : buildFiles) {
    final VirtualFile file = buildFile.getVirtualFile();
    if (file != null && file.getUrl().equals(fileUrl)) {
      final AntBuildModel buildModel = buildFile.getModel();
      return buildModel != null ? buildModel.findTarget(targetName) : null;
    }
  }
  return null;
}
项目:tools-idea    文件:AntArtifactProperties.java   
@Nullable
public AntBuildTarget findTarget(final AntConfiguration antConfiguration) {
  String fileUrl = getFileUrl();
  String targetName = getTargetName();
  if (fileUrl == null || targetName == null) return null;

  final AntBuildFile[] buildFiles = antConfiguration.getBuildFiles();
  for (AntBuildFile buildFile : buildFiles) {
    final VirtualFile file = buildFile.getVirtualFile();
    if (file != null && file.getUrl().equals(fileUrl)) {
      final AntBuildModel buildModel = buildFile.getModel();
      return buildModel != null ? buildModel.findTarget(targetName) : null;
    }
  }
  return null;
}
项目:consulo-apache-ant    文件:AntArtifactProperties.java   
@Nullable
public AntBuildTarget findTarget(final AntConfiguration antConfiguration) {
  String fileUrl = getFileUrl();
  String targetName = getTargetName();
  if (fileUrl == null || targetName == null) return null;

  final AntBuildFile[] buildFiles = antConfiguration.getBuildFiles();
  for (AntBuildFile buildFile : buildFiles) {
    final VirtualFile file = buildFile.getVirtualFile();
    if (file != null && file.getUrl().equals(fileUrl)) {
      final AntBuildModel buildModel = buildFile.getModel();
      return buildModel != null ? buildModel.findTarget(targetName) : null;
    }
  }
  return null;
}
项目:consulo-apache-ant    文件:AntBuildFileImpl.java   
@Override
@Nullable
public String getPresentableName()
{
    AntBuildModel model = myAntConfiguration.getModelIfRegistered(this);
    String name = model != null ? model.getName() : null;
    if(name == null || name.trim().length() == 0)
    {
        name = myVFile.getName();
    }
    return name;
}