com.pnp.xfeature.project
Class AntHelper

java.lang.Object
  extended by com.pnp.xfeature.project.AntHelper

public class AntHelper
extends java.lang.Object

Helper class to run ant targets through the ant launch configuration

Usage:
  AntHelper helper = new AntHelper(new File("build.xml"));
  helper.execute( null, "target1, target2" );
  ...
  helper.execute( null, "target3" );
 

Author:
ibirrer
See Also:
org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchCbonfigurationConstants, org.eclipse.ui.externaltools.internal.model.IExternalToolConstants

Constructor Summary
AntHelper(IFile antFile, IFile featureModelFile, java.lang.String projectName, java.lang.String antFileFullPath)
           
 
Method Summary
 ILaunch execute(IProgressMonitor monitor, java.lang.String antTargets, boolean launchInBackground, boolean captureOutput)
           
 IFile getAntFile()
           
 IFile getFeatureModelFileName()
           
 java.lang.String getToolArguments()
           
 java.util.Map getUserProperties()
           
 void setAntFile(IFile file)
           
 void setToolArguments(java.lang.String string)
           
 void setUserProperties(java.util.Map map)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntHelper

public AntHelper(IFile antFile,
                 IFile featureModelFile,
                 java.lang.String projectName,
                 java.lang.String antFileFullPath)
Method Detail

execute

public ILaunch execute(IProgressMonitor monitor,
                       java.lang.String antTargets,
                       boolean launchInBackground,
                       boolean captureOutput)
                throws CoreException
Parameters:
monitor - can be null
antTargets - Comma separated list of ant targets to be run
Returns:
Returns null if execution failed
Throws:
CoreException

getAntFile

public IFile getAntFile()

getToolArguments

public java.lang.String getToolArguments()

getUserProperties

public java.util.Map getUserProperties()

setAntFile

public void setAntFile(IFile file)

setToolArguments

public void setToolArguments(java.lang.String string)

setUserProperties

public void setUserProperties(java.util.Map map)

getFeatureModelFileName

public IFile getFeatureModelFileName()


Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.