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

项目:intellij-ce-playground    文件:AntRunProfileState.java   
@Nullable
@Override
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
  RunProfile profile = myEnvironment.getRunProfile();
  if (profile instanceof AntRunConfiguration) {
    AntRunConfiguration antRunConfiguration = (AntRunConfiguration)profile;
    AntBuildTarget target = antRunConfiguration.getTarget();
    if (target == null) return null;
    ProcessHandler processHandler = ExecutionHandler
      .executeRunConfiguration(antRunConfiguration, myEnvironment.getDataContext(), new ArrayList<BuildFileProperty>(),
                               new AntBuildListener() {
                                 @Override
                                 public void buildFinished(int state, int errorCount) {

                                 }
                               });
    if (processHandler == null) return null;
    return new DefaultExecutionResult(null, processHandler);
  }
  return null;
}
项目:intellij-ce-playground    文件:GlobalAntConfiguration.java   
public AntBuildTarget findTarget(Project project, String fileUrl, String targetName) {
  if (fileUrl == null || targetName == null || project == null) {
    return null;
  }
  final VirtualFile vFile = VirtualFileManager.getInstance().findFileByUrl(fileUrl);
  if (vFile == null) {
    return null;
  }
  final AntConfigurationImpl antConfiguration = (AntConfigurationImpl)AntConfiguration.getInstance(project);
  for (AntBuildFile buildFile : antConfiguration.getBuildFiles()) {
    if (vFile.equals(buildFile.getVirtualFile())) {
      final AntBuildTarget target = buildFile.getModel().findTarget(targetName);
      if (target != null) {
        return target;
      }
      for (AntBuildTarget metaTarget : antConfiguration.getMetaTargets(buildFile)) {
        if (targetName.equals(metaTarget.getName())) {
          return metaTarget;
        }
      }
      return null;
    }
  }
  return null;
}
项目: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;
}
项目:intellij-ce-playground    文件:AntBeforeRunTaskProvider.java   
public boolean configureTask(RunConfiguration runConfiguration, AntBeforeRunTask task) {
  AntBuildTarget buildTarget = findTargetToExecute(task);
  final TargetChooserDialog dlg = new TargetChooserDialog(myProject, buildTarget);
  if (dlg.showAndGet()) {
    task.setTargetName(null);
    task.setAntFileUrl(null);
    buildTarget = dlg.getSelectedTarget();
    if (buildTarget != null) {
      final VirtualFile vFile = buildTarget.getModel().getBuildFile().getVirtualFile();
      if (vFile != null) {
        task.setAntFileUrl(vFile.getUrl());
        task.setTargetName(buildTarget.getName());
      }
    }
    return true;
  }
  return false;
}
项目:intellij-ce-playground    文件:TargetChooserDialog.java   
public void customizeCellRenderer(JTree tree,
                                  Object value,
                                  boolean selected,
                                  boolean expanded,
                                  boolean leaf,
                                  int row,
                                  boolean hasFocus) {
  if (value instanceof DefaultMutableTreeNode) {
    final DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)value;
    final Object userObject = treeNode.getUserObject();
    if (userObject instanceof AntBuildFile) {
      append(((AntBuildFile)userObject).getPresentableName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
    }
    else if (userObject instanceof AntTargetNodeDescriptor) {
      final AntTargetNodeDescriptor descriptor = (AntTargetNodeDescriptor)userObject;
      final AntBuildTarget antTarget = descriptor.getAntTarget();
      final String antTargetName = antTarget.getName();
      append(antTargetName, SimpleTextAttributes.REGULAR_ATTRIBUTES);
      boolean isMeta = antTarget instanceof MetaTarget;
      setIcon(isMeta ? AntIcons.MetaTarget : AntIcons.Target);
    }
  }
}
项目: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;
}
项目:tools-idea    文件:AntBeforeRunTaskProvider.java   
public boolean configureTask(RunConfiguration runConfiguration, AntBeforeRunTask task) {
  AntBuildTarget buildTarget = findTargetToExecute(task);
  final TargetChooserDialog dlg = new TargetChooserDialog(myProject, buildTarget);
  dlg.show();
  if (dlg.isOK()) {
    task.setTargetName(null);
    task.setAntFileUrl(null);
    buildTarget = dlg.getSelectedTarget();
    if (buildTarget != null) {
      final VirtualFile vFile = buildTarget.getModel().getBuildFile().getVirtualFile();
      if (vFile != null) {
        task.setAntFileUrl(vFile.getUrl());
        task.setTargetName(buildTarget.getName());
      }
    }
    return true;
  }
  return false;
}
项目:tools-idea    文件:TargetChooserDialog.java   
public void customizeCellRenderer(JTree tree,
                                  Object value,
                                  boolean selected,
                                  boolean expanded,
                                  boolean leaf,
                                  int row,
                                  boolean hasFocus) {
  if (value instanceof DefaultMutableTreeNode) {
    final DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)value;
    final Object userObject = treeNode.getUserObject();
    if (userObject instanceof AntBuildFile) {
      append(((AntBuildFile)userObject).getPresentableName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
    }
    else if (userObject instanceof AntTargetNodeDescriptor) {
      final AntTargetNodeDescriptor descriptor = (AntTargetNodeDescriptor)userObject;
      final AntBuildTarget antTarget = descriptor.getAntTarget();
      final String antTargetName = antTarget.getName();
      append(antTargetName, SimpleTextAttributes.REGULAR_ATTRIBUTES);
      boolean isMeta = antTarget instanceof MetaTarget;
      setIcon(isMeta ? AllIcons.Ant.MetaTarget : AllIcons.Ant.Target);
    }
  }
}
项目:consulo-apache-ant    文件:AntExplorer.java   
private static String[] getTargetNamesFromPaths(TreePath[] paths) {
  final List<String> targets = new ArrayList<String>();
  for (final TreePath path : paths) {
    final Object userObject = ((DefaultMutableTreeNode)path.getLastPathComponent()).getUserObject();
    if (!(userObject instanceof AntTargetNodeDescriptor)) {
      continue;
    }
    final AntBuildTarget target = ((AntTargetNodeDescriptor)userObject).getTarget();
    if (target instanceof MetaTarget) {
      ContainerUtil.addAll(targets, ((MetaTarget)target).getTargetNames());
    }
    else {
      targets.add(target.getName());
    }
  }
  return ArrayUtil.toStringArray(targets);
}
项目:consulo-apache-ant    文件:AntBuildActionGroup.java   
private static void addGroupOfTargets(final AntBuildFile buildFile,
                                      final AntBuildTarget[] targets,
                                      final Set<String> addedTargetNames,
                                      final DefaultActionGroup group) {
  final DefaultActionGroup subgroup = new DefaultActionGroup();
  for (final AntBuildTarget target : targets) {
    final String displayName = target.getName();
    if (addedTargetNames.contains(displayName)) {
      continue;
    }
    addedTargetNames.add(displayName);
    final String[] targetsToRun = (target instanceof MetaTarget) ? ((MetaTarget)target).getTargetNames() : new String[]{displayName};
    subgroup.add(getOrCreateAction(buildFile, displayName, targetsToRun, target.getNotEmptyDescription(),
                                   ((AntBuildTargetBase)target).getActionId()));
  }
  if (subgroup.getChildrenCount() > 0) {
    group.add(subgroup);
  }
}
项目: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    文件:AntBeforeRunTaskProvider.java   
public boolean configureTask(RunConfiguration runConfiguration, AntBeforeRunTask task) {
  AntBuildTarget buildTarget = findTargetToExecute(task);
  final TargetChooserDialog dlg = new TargetChooserDialog(myProject, buildTarget);
  dlg.show();
  if (dlg.isOK()) {
    task.setTargetName(null);
    task.setAntFileUrl(null);
    buildTarget = dlg.getSelectedTarget();
    if (buildTarget != null) {
      final VirtualFile vFile = buildTarget.getModel().getBuildFile().getVirtualFile();
      if (vFile != null) {
        task.setAntFileUrl(vFile.getUrl());
        task.setTargetName(buildTarget.getName());
      }
    }
    return true;
  }
  return false;
}
项目:consulo-apache-ant    文件:TargetChooserDialog.java   
public void customizeCellRenderer(JTree tree,
                                  Object value,
                                  boolean selected,
                                  boolean expanded,
                                  boolean leaf,
                                  int row,
                                  boolean hasFocus) {
  if (value instanceof DefaultMutableTreeNode) {
    final DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)value;
    final Object userObject = treeNode.getUserObject();
    if (userObject instanceof AntBuildFile) {
      append(((AntBuildFile)userObject).getPresentableName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
    }
    else if (userObject instanceof AntTargetNodeDescriptor) {
      final AntTargetNodeDescriptor descriptor = (AntTargetNodeDescriptor)userObject;
      final AntBuildTarget antTarget = descriptor.getAntTarget();
      final String antTargetName = antTarget.getName();
      append(antTargetName, SimpleTextAttributes.REGULAR_ATTRIBUTES);
      boolean isMeta = antTarget instanceof MetaTarget;
      setIcon(isMeta ? ApacheAntIcons.MetaTarget : ApacheAntIcons.Target);
    }
  }
}
项目:intellij-ce-playground    文件:AntRunConfiguration.java   
public boolean acceptSettings(AntBuildTarget target) {
  VirtualFile virtualFile = target.getModel().getBuildFile().getVirtualFile();
  if (virtualFile == null) return false;
  mySettings.myFileUrl = virtualFile.getUrl();
  mySettings.myTargetName = target.getName();
  return true;
}
项目:intellij-ce-playground    文件:AntBeforeRunTask.java   
public boolean isRunningTarget(AntBuildTarget target) {
  final VirtualFile vFile = target.getModel().getBuildFile().getVirtualFile();
  if (vFile == null) {
    return false;
  }
  if (myAntFileUrl == null || !FileUtil.pathsEqual(myAntFileUrl, vFile.getUrl())) {
    return false;
  }
  return Comparing.equal(myTargetName, target.getName());
}
项目:intellij-ce-playground    文件:AntArtifactProperties.java   
private void runAntTarget(CompileContext compileContext, final Artifact artifact) {
  if (myExtensionProperties.myEnabled) {
    final Project project = compileContext.getProject();
    final AntBuildTarget target = findTarget(AntConfiguration.getInstance(project));
    if (target != null) {
      final DataContext dataContext = SimpleDataContext.getProjectContext(project);
      List<BuildFileProperty> properties = getAllProperties(artifact);
      final boolean success = AntConfigurationImpl.executeTargetSynchronously(dataContext, target, properties);
      if (!success) {
        compileContext.addMessage(CompilerMessageCategory.ERROR, "Cannot build artifact '" + artifact.getName() + "': ant target '" + target.getDisplayName() + "' failed with error", null, -1, -1);
      }
    }
  }
}
项目:intellij-ce-playground    文件:AntBeforeRunTaskProvider.java   
public boolean executeTask(DataContext context, RunConfiguration configuration, ExecutionEnvironment env, AntBeforeRunTask task) {
  final AntBuildTarget target = findTargetToExecute(task);
  if (target != null) {
    return AntConfigurationImpl.executeTargetSynchronously(context, target);
  }
  return true;
}
项目:intellij-ce-playground    文件:TargetChooserDialog.java   
public TargetChooserDialog(final Project project, final AntBuildTarget selectedTarget) {
  super(project, false);
  myProject = project;
  mySelectedTarget = selectedTarget;
  setTitle(AntBundle.message("ant.target.choser.title"));
  init();
}
项目:intellij-ce-playground    文件:TargetChooserDialog.java   
private DefaultMutableTreeNode processFileTargets(final AntBuildTarget[] targets, final AntBuildFile buildFile, final DefaultMutableTreeNode buildFileNode) {
  DefaultMutableTreeNode result = null;
  for (AntBuildTarget target : targets) {
    if (target.getName() == null) continue;
    final AntTargetNodeDescriptor descriptor = new AntTargetNodeDescriptor(target, buildFile);
    final DefaultMutableTreeNode node = new DefaultMutableTreeNode(descriptor);
    if (isSelected(descriptor)){
      result = node;
    }
    buildFileNode.add(node);
  }
  return result;
}
项目:tools-idea    文件:AntBeforeRunTask.java   
public boolean isRunningTarget(AntBuildTarget target) {
  final VirtualFile vFile = target.getModel().getBuildFile().getVirtualFile();
  if (vFile == null) {
    return false;
  }
  if (myAntFileUrl == null || !FileUtil.pathsEqual(myAntFileUrl, vFile.getUrl())) {
    return false;
  }
  return Comparing.equal(myTargetName, target.getName());
}
项目:tools-idea    文件:AntArtifactProperties.java   
private void runAntTarget(CompileContext compileContext, final Artifact artifact) {
  if (myExtensionProperties.myEnabled) {
    final Project project = compileContext.getProject();
    final AntBuildTarget target = findTarget(AntConfiguration.getInstance(project));
    if (target != null) {
      final DataContext dataContext = SimpleDataContext.getProjectContext(project);
      List<BuildFileProperty> properties = getAllProperties(artifact);
      final boolean success = AntConfigurationImpl.executeTargetSynchronously(dataContext, target, properties);
      if (!success) {
        compileContext.addMessage(CompilerMessageCategory.ERROR, "Cannot build artifact '" + artifact.getName() + "': ant target '" + target.getDisplayName() + "' failed with error", null, -1, -1);
      }
    }
  }
}
项目:tools-idea    文件:AntBeforeRunTaskProvider.java   
public boolean executeTask(DataContext context, RunConfiguration configuration, ExecutionEnvironment env, AntBeforeRunTask task) {
  final AntBuildTarget target = findTargetToExecute(task);
  if (target != null) {
    return AntConfigurationImpl.executeTargetSynchronously(context, target);
  }
  return true;
}
项目:tools-idea    文件:AntBeforeRunTaskProvider.java   
@Nullable
private AntBuildTarget findTargetToExecute(AntBeforeRunTask task) {
  final String fileUrl = task.getAntFileUrl();
  final String targetName = task.getTargetName();
  if (fileUrl == null || targetName == null) {
    return null;
  }
  final VirtualFile vFile = VirtualFileManager.getInstance().findFileByUrl(fileUrl);
  if (vFile == null) {
    return null;
  }
  final AntConfigurationImpl antConfiguration = (AntConfigurationImpl)AntConfiguration.getInstance(myProject);
  for (AntBuildFile buildFile : antConfiguration.getBuildFiles()) {
    if (vFile.equals(buildFile.getVirtualFile())) {
      final AntBuildTarget target = buildFile.getModel().findTarget(targetName);
      if (target != null) {
        return target;
      }
      for (AntBuildTarget metaTarget : antConfiguration.getMetaTargets(buildFile)) {
        if (targetName.equals(metaTarget.getName())) {
          return metaTarget;
        }
      }
      return null;
    }
  }
  return null;
}
项目:tools-idea    文件:TargetChooserDialog.java   
public TargetChooserDialog(final Project project, final AntBuildTarget selectedTarget) {
  super(project, false);
  myProject = project;
  mySelectedTarget = selectedTarget;
  setTitle(AntBundle.message("ant.target.choser.title"));
  init();
}
项目:tools-idea    文件:TargetChooserDialog.java   
private DefaultMutableTreeNode processFileTargets(final AntBuildTarget[] targets, final AntBuildFile buildFile, final DefaultMutableTreeNode buildFileNode) {
  DefaultMutableTreeNode result = null;
  for (AntBuildTarget target : targets) {
    if (target.getName() == null) continue;
    final AntTargetNodeDescriptor descriptor = new AntTargetNodeDescriptor(target, buildFile);
    final DefaultMutableTreeNode node = new DefaultMutableTreeNode(descriptor);
    if (isSelected(descriptor)){
      result = node;
    }
    buildFileNode.add(node);
  }
  return result;
}
项目:consulo-apache-ant    文件:AntExplorer.java   
private static AntBuildTarget[] getTargetObjectsFromPaths(TreePath[] paths) {
  final List<AntBuildTargetBase> targets = new ArrayList<AntBuildTargetBase>();
  for (final TreePath path : paths) {
    final Object userObject = ((DefaultMutableTreeNode)path.getLastPathComponent()).getUserObject();
    if (!(userObject instanceof AntTargetNodeDescriptor)) {
      continue;
    }
    final AntBuildTargetBase target = ((AntTargetNodeDescriptor)userObject).getTarget();
    targets.add(target);

  }
  return targets.toArray(new AntBuildTargetBase[targets.size()]);
}
项目:consulo-apache-ant    文件:AntExplorer.java   
private void doAction() {
  final TreePath[] paths = myTree.getSelectionPaths();
  if (paths == null) {
    return;
  }
  try {
    // try to remove build file
    if (paths.length == 1) {
      final DefaultMutableTreeNode node = (DefaultMutableTreeNode)paths[0].getLastPathComponent();
      if (node.getUserObject() instanceof AntBuildFileNodeDescriptor) {
        final AntBuildFileNodeDescriptor descriptor = (AntBuildFileNodeDescriptor)node.getUserObject();
        if (descriptor.getBuildFile().equals(getCurrentBuildFile())) {
          removeBuildFile();
          return;
        }
      }
    }
    // try to remove meta targets
    final AntBuildTarget[] targets = getTargetObjectsFromPaths(paths);
    final AntConfigurationBase antConfiguration = AntConfigurationBase.getInstance(myProject);
    for (final AntBuildTarget buildTarget : targets) {
      if (buildTarget instanceof MetaTarget) {
        for (final ExecutionEvent event : antConfiguration.getEventsForTarget(buildTarget)) {
          if (event instanceof ExecuteCompositeTargetEvent) {
            antConfiguration.clearTargetForEvent(event);
          }
        }
      }
    }
  }
  finally {
    myBuilder.queueUpdate();
    myTree.repaint();
  }
}
项目:consulo-apache-ant    文件:AntBeforeRunTask.java   
public boolean isRunningTarget(AntBuildTarget target) {
  final VirtualFile vFile = target.getModel().getBuildFile().getVirtualFile();
  if (vFile == null) {
    return false;
  }
  if (myAntFileUrl == null || !FileUtil.pathsEqual(myAntFileUrl, vFile.getUrl())) {
    return false;
  }
  return Comparing.equal(myTargetName, target.getName());
}
项目:consulo-apache-ant    文件:AntBuildFileImpl.java   
@Override
public boolean isTargetVisible(final AntBuildTarget target)
{
    final TargetFilter filter = findFilter(target.getName());
    if(filter == null)
    {
        return target.isDefault() || target.getNotEmptyDescription() != null;
    }
    return filter.isVisible();
}
项目:consulo-apache-ant    文件:AntArtifactProperties.java   
private void runAntTarget(CompileContext compileContext, final Artifact artifact) {
  if (myExtensionProperties.myEnabled) {
    final Project project = compileContext.getProject();
    final AntBuildTarget target = findTarget(AntConfiguration.getInstance(project));
    if (target != null) {
      final DataContext dataContext = SimpleDataContext.getProjectContext(project);
      List<BuildFileProperty> properties = getAllProperties(artifact);
      final boolean success = AntConfigurationImpl.executeTargetSynchronously(dataContext, target, properties);
      if (!success) {
        compileContext.addMessage(CompilerMessageCategory.ERROR, "Cannot build artifact '" + artifact.getName() + "': ant target '" + target.getDisplayName() + "' failed with error", null, -1, -1);
      }
    }
  }
}
项目:consulo-apache-ant    文件:AntBeforeRunTaskProvider.java   
public boolean executeTask(DataContext context, RunConfiguration configuration, ExecutionEnvironment env, AntBeforeRunTask task) {
  final AntBuildTarget target = findTargetToExecute(task);
  if (target != null) {
    return AntConfigurationImpl.executeTargetSynchronously(context, target);
  }
  return true;
}
项目:consulo-apache-ant    文件:AntBeforeRunTaskProvider.java   
@Nullable
private AntBuildTarget findTargetToExecute(AntBeforeRunTask task) {
  final String fileUrl = task.getAntFileUrl();
  final String targetName = task.getTargetName();
  if (fileUrl == null || targetName == null) {
    return null;
  }
  final VirtualFile vFile = VirtualFileManager.getInstance().findFileByUrl(fileUrl);
  if (vFile == null) {
    return null;
  }
  final AntConfigurationImpl antConfiguration = (AntConfigurationImpl)AntConfiguration.getInstance(myProject);
  for (AntBuildFile buildFile : antConfiguration.getBuildFiles()) {
    if (vFile.equals(buildFile.getVirtualFile())) {
      final AntBuildTarget target = buildFile.getModel().findTarget(targetName);
      if (target != null) {
        return target;
      }
      for (AntBuildTarget metaTarget : antConfiguration.getMetaTargets(buildFile)) {
        if (targetName.equals(metaTarget.getName())) {
          return metaTarget;
        }
      }
      return null;
    }
  }
  return null;
}
项目:consulo-apache-ant    文件:TargetChooserDialog.java   
public TargetChooserDialog(final Project project, final AntBuildTarget selectedTarget) {
  super(project, false);
  myProject = project;
  mySelectedTarget = selectedTarget;
  setTitle(AntBundle.message("ant.target.choser.title"));
  init();
}
项目:consulo-apache-ant    文件:TargetChooserDialog.java   
private DefaultMutableTreeNode processFileTargets(final AntBuildTarget[] targets, final AntBuildFile buildFile, final DefaultMutableTreeNode buildFileNode) {
  DefaultMutableTreeNode result = null;
  for (AntBuildTarget target : targets) {
    if (target.getName() == null) continue;
    final AntTargetNodeDescriptor descriptor = new AntTargetNodeDescriptor(target, buildFile);
    final DefaultMutableTreeNode node = new DefaultMutableTreeNode(descriptor);
    if (isSelected(descriptor)){
      result = node;
    }
    buildFileNode.add(node);
  }
  return result;
}
项目:intellij-ce-playground    文件:AntExecuteBeforeRunDialog.java   
public AntExecuteBeforeRunDialog(final Project project, final AntBuildTarget target) {
  super(project);
  myTarget = target;
  init();
}
项目:intellij-ce-playground    文件:AntRunConfiguration.java   
@Override
public String suggestedName() {
  AntBuildTarget target = getTarget();
  return target != null ? target.getDisplayName() : "";
}
项目:intellij-ce-playground    文件:AntRunConfiguration.java   
public AntBuildTarget getTarget() {
  return GlobalAntConfiguration.getInstance().findTarget(getProject(), mySettings.myFileUrl, mySettings.myTargetName);
}
项目:intellij-ce-playground    文件:TargetFilter.java   
public void updateDescription(AntBuildTarget target) {
  if (target == null) return;
  myDescription = target.getNotEmptyDescription();
}
项目:intellij-ce-playground    文件:TargetFilter.java   
public static TargetFilter fromTarget(AntBuildTarget target) {
  TargetFilter filter = new TargetFilter(target.getName(), target.isDefault());
  filter.myDescription = target.getNotEmptyDescription();
  filter.myVisible = (filter.myDescription != null);
  return filter;
}
项目:intellij-ce-playground    文件:AntBeforeRunTaskProvider.java   
@Override
public Icon getTaskIcon(AntBeforeRunTask task) {
  AntBuildTarget antTarget = findTargetToExecute(task);
  return antTarget instanceof MetaTarget ? AntIcons.MetaTarget : AntIcons.Target;
}