Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ant.internal.ui.editor.utils
Class ProjectHelper  view ProjectHelper download ProjectHelper.java

java.lang.Object
  extended byorg.apache.tools.ant.ProjectHelper
      extended byorg.apache.tools.ant.helper.ProjectHelper2
          extended byorg.eclipse.ant.internal.ui.editor.utils.ProjectHelper

public class ProjectHelper
extends org.apache.tools.ant.helper.ProjectHelper2

Derived from the original Ant ProjectHelper2 with help from the JAXPUtils class. This class provides parsing for using a String as a source and provides handlers that will continue parsing to completion upon hitting errors.


Nested Class Summary
static class ProjectHelper.ElementHandler
           
private static class ProjectHelper.ErrorHelper
           
private static class ProjectHelper.LexHandler
           
static class ProjectHelper.MainHandler
           
static class ProjectHelper.ProjectHandler
           
static class ProjectHelper.RootHandler
           
static class ProjectHelper.TargetHandler
           
 
Nested classes inherited from class org.apache.tools.ant.helper.ProjectHelper2
org.apache.tools.ant.helper.ProjectHelper2.AntHandler
 
Field Summary
private  java.io.File buildFile
          The buildfile that is to be parsed.
private static java.lang.String currentEntityName
           
private static java.lang.String currentEntityPath
           
private static int currentImportStackSize
           
private static org.apache.tools.ant.helper.ProjectHelper2.AntHandler elementHandler
           
private static org.eclipse.ant.internal.ui.editor.outline.AntModel fgAntModel
          The Ant Model
private static org.apache.tools.ant.util.FileUtils fu
          helper for path -> URI and URI -> path conversions.
private static org.xml.sax.ext.LexicalHandler lexicalHandler
           
private static org.apache.tools.ant.helper.ProjectHelper2.AntHandler mainHandler
           
private static org.apache.tools.ant.helper.ProjectHelper2.AntHandler projectHandler
           
private static org.apache.tools.ant.helper.ProjectHelper2.AntHandler targetHandler
           
 
Fields inherited from class org.apache.tools.ant.ProjectHelper
ANT_CORE_URI, ANT_CURRENT_URI, ANT_TYPE, ANTLIB_URI, HELPER_PROPERTY, SERVICE_ID
 
Constructor Summary
ProjectHelper(org.eclipse.ant.internal.ui.editor.outline.AntModel model)
           
 
Method Summary
static org.eclipse.ant.internal.ui.editor.outline.AntModel getAntModel()
           
private static org.apache.tools.ant.util.FileUtils getFileUtils()
           
private  org.xml.sax.XMLReader getNamespaceXMLReader()
          Returns a newly created SAX 2 XMLReader, which is namespace aware
private  javax.xml.parsers.SAXParserFactory getNSParserFactory()
          Returns the parser factory to use to create namespace aware parsers.
private  javax.xml.parsers.SAXParser newSAXParser(javax.xml.parsers.SAXParserFactory factory)
           
 void parse(org.apache.tools.ant.Project project, java.lang.Object source)
          Parse a source xml input.
 void parse(org.apache.tools.ant.Project project, java.lang.Object source, org.apache.tools.ant.helper.ProjectHelper2.RootHandler handler)
          Parses the project file, configuring the project as it goes.
static void setAntModel(org.eclipse.ant.internal.ui.editor.outline.AntModel antModel)
           
 void setBuildFile(java.io.File file)
          Sets the buildfile that is about to be parsed or null if parsing has completed.
 
Methods inherited from class org.apache.tools.ant.helper.ProjectHelper2
parseUnknownElement
 
Methods inherited from class org.apache.tools.ant.ProjectHelper
addLocationToBuildException, addText, addText, configure, configureProject, extractNameFromComponentName, extractUriFromComponentName, genComponentName, getContextClassLoader, getImportStack, getProjectHelper, parsePropertyString, replaceProperties, replaceProperties, storeChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fu

private static org.apache.tools.ant.util.FileUtils fu
helper for path -> URI and URI -> path conversions.


buildFile

private java.io.File buildFile
The buildfile that is to be parsed. Must be set if parsing is to be successful.


currentEntityName

private static java.lang.String currentEntityName

currentEntityPath

private static java.lang.String currentEntityPath

currentImportStackSize

private static int currentImportStackSize

fgAntModel

private static org.eclipse.ant.internal.ui.editor.outline.AntModel fgAntModel
The Ant Model


elementHandler

private static org.apache.tools.ant.helper.ProjectHelper2.AntHandler elementHandler

projectHandler

private static org.apache.tools.ant.helper.ProjectHelper2.AntHandler projectHandler

targetHandler

private static org.apache.tools.ant.helper.ProjectHelper2.AntHandler targetHandler

mainHandler

private static org.apache.tools.ant.helper.ProjectHelper2.AntHandler mainHandler

lexicalHandler

private static org.xml.sax.ext.LexicalHandler lexicalHandler
Constructor Detail

ProjectHelper

public ProjectHelper(org.eclipse.ant.internal.ui.editor.outline.AntModel model)
Method Detail

parse

public void parse(org.apache.tools.ant.Project project,
                  java.lang.Object source,
                  org.apache.tools.ant.helper.ProjectHelper2.RootHandler handler)
           throws org.apache.tools.ant.BuildException
Parses the project file, configuring the project as it goes.


setBuildFile

public void setBuildFile(java.io.File file)
Sets the buildfile that is about to be parsed or null if parsing has completed.


parse

public void parse(org.apache.tools.ant.Project project,
                  java.lang.Object source)
           throws org.apache.tools.ant.BuildException
Description copied from class: org.apache.tools.ant.helper.ProjectHelper2
Parse a source xml input.


setAntModel

public static void setAntModel(org.eclipse.ant.internal.ui.editor.outline.AntModel antModel)

getAntModel

public static org.eclipse.ant.internal.ui.editor.outline.AntModel getAntModel()

getFileUtils

private static org.apache.tools.ant.util.FileUtils getFileUtils()

getNamespaceXMLReader

private org.xml.sax.XMLReader getNamespaceXMLReader()
                                             throws org.apache.tools.ant.BuildException
Returns a newly created SAX 2 XMLReader, which is namespace aware

Since:
Ant 1.6 from org.apache.tools.ant.util.JAXPUtils

getNSParserFactory

private javax.xml.parsers.SAXParserFactory getNSParserFactory()
                                                       throws org.apache.tools.ant.BuildException
Returns the parser factory to use to create namespace aware parsers.

Since:
Ant 1.6 from org.apache.tools.ant.util.JAXPUtils

newSAXParser

private javax.xml.parsers.SAXParser newSAXParser(javax.xml.parsers.SAXParserFactory factory)
Since:
Ant 1.5 from org.apache.tools.ant.util.JAXPUtils