net.sf.antcontrib.cpptasks.ide
Class ProjectDef
DataType
net.sf.antcontrib.cpptasks.ide.ProjectDef
public final class ProjectDef
extends DataType
Requests the creation of an IDE project file. Experimental.
Implementation status: msdev5, msdev6 and cbuilderx
generate reasonable project files for simple projects,
xcode and msdev7 and msdev71 capture source file lists and
a few settings.
void | execute() - Required by documentation generator.
|
void | execute(CCTask task, List sources, Hashtable targets, TargetInfo linkTarget) - Executes the task.
|
String | getName() - Get name.
|
File | getObjdir() - Gets the object files directory.
|
void | getObjdir(File oDir) - Sets the directory used for object files.
|
boolean | getOverwrite() - Gets whether an existing project file should be overwritten,
default is true.
|
boolean | isActive() - Determine if this def should be used.
|
void | setClassname(String className) - Class name for a user-supplied project writer.
|
void | setFailonerror(boolean value) - Sets whether a failure to write the project file should cause the
task to fail.
|
void | setIf(String propName) - Sets the property name for the 'if' condition.
|
void | setName(String value) - Set name.
|
void | setOutfile(File outfile) - Sets the name for the generated project file.
|
void | setOverwrite(boolean value) - Sets whether an existing project file should be overwritten,
default is true.
|
void | setType(ProjectWriterEnum value) - Set project type.
|
void | setUnless(String propName) - Set the property name for the 'unless' condition.
|
ProjectDef
public ProjectDef()
Constructor.
execute
public void execute()
Required by documentation generator.
execute
public void execute(CCTask task,
List sources,
Hashtable targets,
TargetInfo linkTarget)
Executes the task. Compiles the given files.
task
- cc tasksources
- source files (includes headers)targets
- compilation targetslinkTarget
- link target
getName
public String getName()
Get name.
getObjdir
public File getObjdir()
Gets the object files directory.
getObjdir
public void getObjdir(File oDir)
Sets the directory used for object files. If not specified,
the object files directory from cc task will be used.
oDir
- object file directory.
getOverwrite
public boolean getOverwrite()
Gets whether an existing project file should be overwritten,
default is true. If false and the project file exists,
the value of failonerror will determine if the task fails.
isActive
public boolean isActive()
Determine if this def should be used.
Definition will be active if the "if" variable (if specified) is set and
the "unless" variable (if specified) is not set and that all reference
or extended definitions are active
- true if processor is active
setClassname
public void setClassname(String className)
Class name for a user-supplied project writer. Use the "type"
attribute to specify built-in project writer implementations.
className
- full class name
setFailonerror
public void setFailonerror(boolean value)
Sets whether a failure to write the project file should cause the
task to fail. Default is true.
setIf
public void setIf(String propName)
Sets the property name for the 'if' condition.
The configuration will be ignored unless the property is defined.
The value of the property is insignificant, but values that would imply
misinterpretation ("false", "no") will throw an exception when
evaluated.
propName
- name of property
setName
public void setName(String value)
Set name.
setOutfile
public void setOutfile(File outfile)
Sets the name for the generated project file.
outfile
- output file name
setOverwrite
public void setOverwrite(boolean value)
Sets whether an existing project file should be overwritten,
default is true. If false and the project file exists,
the value of failonerror will determine if the task fails.
setType
public void setType(ProjectWriterEnum value)
Set project type.
cbuilderx | Borland C++BuilderX |
msvc5 | Microsoft Visual C++ 97 |
msvc6 | Microsoft Visual C++ 6 |
msvc7 | Microsoft Visual C++.NET |
msvc71 | Microsoft Visual C++.NET 2003 |
msvc8 | Microsoft Visual C++ 2005 |
xcode | Apple Xcode |
setUnless
public void setUnless(String propName)
Set the property name for the 'unless' condition.
If named property is set, the configuration will be ignored.
The value of the property is insignificant, but values that would imply
misinterpretation ("false", "no") of the behavior will throw an
exception when evaluated.
propName
- name of property
Copyright B) 2001-2006 Ant-Contrib project. All Rights Reserved.