xml.completion
Class AntCompleteTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by xml.completion.AntCompleteTask
All Implemented Interfaces:
java.lang.Cloneable

public class AntCompleteTask
extends org.apache.tools.ant.Task

Creates a jEdit XML plugin XML-DTD file for Ant from the currently known tasks.


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
AntCompleteTask()
           
 
Method Summary
protected  boolean areNmtokens(java.lang.String[] s)
          Do the Strings all match the XML-NMTOKEN production?
 void execute()
          Build the antcomplete XML-DTD.
protected  boolean isNmtoken(java.lang.String s)
          Does this String match the XML-NMTOKEN production?
 void setOutput(java.io.File output)
          The output file.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntCompleteTask

public AntCompleteTask()
Method Detail

setOutput

public void setOutput(java.io.File output)
The output file.

Parameters:
output - the output file

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Build the antcomplete XML-DTD.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - if the XML-DTD cannot be written.

isNmtoken

protected boolean isNmtoken(java.lang.String s)
Does this String match the XML-NMTOKEN production?

Parameters:
s - the string to test
Returns:
true if the string matches the XML-NMTOKEN

areNmtokens

protected boolean areNmtokens(java.lang.String[] s)
Do the Strings all match the XML-NMTOKEN production?

Otherwise they are not suitable as an enumerated attribute, for example.

Parameters:
s - the array of string to test
Returns:
true if all the strings in the array math XML-NMTOKEN