@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; }
@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; }