Search in sources :

Example 1 with AntBuildModel

use of com.intellij.lang.ant.config.AntBuildModel in project intellij-community by JetBrains.

the class AntArtifactProperties method findTarget.

@Nullable
public AntBuildTarget findTarget(final AntConfiguration antConfiguration) {
    String fileUrl = getFileUrl();
    String targetName = getTargetName();
    if (fileUrl == null || targetName == null)
        return null;
    for (AntBuildFile buildFile : antConfiguration.getBuildFileList()) {
        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;
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) AntBuildModel(com.intellij.lang.ant.config.AntBuildModel) AntBuildFile(com.intellij.lang.ant.config.AntBuildFile) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

AntBuildFile (com.intellij.lang.ant.config.AntBuildFile)1 AntBuildModel (com.intellij.lang.ant.config.AntBuildModel)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 Nullable (org.jetbrains.annotations.Nullable)1