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

项目:intellij-ce-playground    文件:AntDomProject.java   
@Nullable
public final Sdk getTargetJdk() {
  final XmlTag tag = getXmlTag();
  final PsiFile containingFile = tag.getContainingFile();
  final AntBuildFileImpl buildFile = (AntBuildFileImpl)AntConfigurationBase.getInstance(containingFile.getProject()).getAntBuildFile(containingFile);
  if (buildFile != null) {
    String jdkName = AntBuildFileImpl.CUSTOM_JDK_NAME.get(buildFile.getAllOptions());
    if (jdkName == null || jdkName.length() == 0) {
      jdkName = AntConfigurationImpl.DEFAULT_JDK_NAME.get(buildFile.getAllOptions());
    }
    if (jdkName != null && jdkName.length() > 0) {
      return ProjectJdkTable.getInstance().findJdk(jdkName);
    }
  }
  return ProjectRootManager.getInstance(tag.getProject()).getProjectSdk();
}
项目:tools-idea    文件:AntDomProject.java   
@Nullable
public final Sdk getTargetJdk() {
  final XmlTag tag = getXmlTag();
  final PsiFile containingFile = tag.getContainingFile();
  final AntBuildFileImpl buildFile = (AntBuildFileImpl)AntConfigurationBase.getInstance(containingFile.getProject()).getAntBuildFile(containingFile);
  if (buildFile != null) {
    String jdkName = AntBuildFileImpl.CUSTOM_JDK_NAME.get(buildFile.getAllOptions());
    if (jdkName == null || jdkName.length() == 0) {
      jdkName = AntConfigurationImpl.DEFAULT_JDK_NAME.get(buildFile.getAllOptions());
    }
    if (jdkName != null && jdkName.length() > 0) {
      return ProjectJdkTable.getInstance().findJdk(jdkName);
    }
  }
  return ProjectRootManager.getInstance(tag.getProject()).getProjectSdk();
}
项目:consulo-apache-ant    文件:AntDomProject.java   
@Nullable
public final Sdk getTargetJdk() {
  final XmlTag tag = getXmlTag();
  final PsiFile containingFile = tag.getContainingFile();
  final AntBuildFileImpl buildFile = (AntBuildFileImpl)AntConfigurationBase.getInstance(containingFile.getProject()).getAntBuildFile(containingFile);
  if (buildFile != null) {
    String jdkName = AntBuildFileImpl.CUSTOM_JDK_NAME.get(buildFile.getAllOptions());
    if (jdkName == null || jdkName.length() == 0) {
      jdkName = AntConfigurationImpl.DEFAULT_JDK_NAME.get(buildFile.getAllOptions());
    }
    if (jdkName != null && jdkName.length() > 0) {
      return SdkTable.getInstance().findSdk(jdkName);
    }
  }
  return AntJavaSdkUtil.getBundleSdk();
}
项目: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);
      }
    }
  }
}
项目: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);
      }
    }
  }
}
项目: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    文件:BuildFilePropertiesPanel.java   
@Override
public void reset(AbstractProperty.AbstractPropertyContainer options)
{
    String autoselectJdk = AntConfigurationImpl.DEFAULT_JDK_NAME.get(options);
    myJDKsController.setRenderer(new AntUIUtil.JavaSdkdkRenderer(true, autoselectJdk));
    super.reset(options);
    myJDKsController.resetList(null);
    myProjectDefaultAnt = AntConfigurationImpl.DEFAULT_ANT.get(options);
    updateDefaultAnt();
}
项目:consulo-apache-ant    文件:BuildFilePropertiesPanel.java   
@Override
public void apply(AbstractProperty.AbstractPropertyContainer options)
{
    AntConfigurationImpl.DEFAULT_ANT.set(options, myProjectDefaultAnt);
    super.apply(options);
}