boolean (AntBuildTarget target) { VirtualFile virtualFile = target.getModel().getBuildFile().getVirtualFile(); if (virtualFile == null) { return false; } mySettings.myFileUrl = virtualFile.getUrl(); mySettings.myTargetName = target.getName(); return true; }