DefaultCompilerDriver Class
- public class DefaultCompilerDriver
extends Object
implements ICompilerDriver
The default compiler driver specifies default compiler interactions for
compiler-recognized document types. This behavior generally consists
of syntax coloring and error reporting within the source editor.
This default behavior does NOT include the creation of an IDE-side
parse/structure tree. For this functionality, a document type must supply a
compiler driver implementation that returns a valid
ILanguageBuilder
interface from the
createBuilder
method. See JavaCompilerDriver
for an example.
Note that a providing a compiler driver on a document type is only useful if
that document type is recognized by the compiler framework. This functionality
is generally achieved by writing a compiler language extension or by mapping
a new document type to an existing language extension via the compiler's
'javelin-config.xml' configuation file.
-
Hierarchy
-
Object
DefaultCompilerDriver
-
All Implemented Interfaces
-
ICompilerDriver
-
Direct Known Subclasses
-
JavaCompilerDriver
, XmlCompilerDriver
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_doc
protected ISourceDocument
_doc
DefaultCompilerDriver
public DefaultCompilerDriver(ISourceDocument
doc)
- Creates a default compiler driver for the specified document.
createBuilder() Method
public ILanguageBuilder
createBuilder()
Returns a builder object used by the compiler to generate IDE-side
parse trees. By default, document types do not supply a builder.
Returns
- null
getAvailableFeatures() Method
public Class
[] getAvailableFeatures()
Returns the set of compiler features that should be made available
on this document. The default set includes the following:
Token Info Feature: allows access to tokenization information
for this driver's document.
Node Info Feature: allows access to langauge transition information
for this driver's document.
Source Info Feature: allows access to source editor features such as auto-completion.
Structure Info Feature: allows access to structure tree information
for this driver's document. Note that while this feature is supported
by default, it is only useful to a DefaultCompilerDriver
derivation that returns a valid
ILanguageBuilder
interface from the
createBuilder
method. See JavaCompilerDriver
for an example.
Returns
- an array of classes that implement the IFeature
interface.
isFeatureAvailable(Class) Method
public boolean isFeatureAvailable(Class
featureClass)
Determines whether the given feature is in the available features
list for this driver.
Parameters
-
featureClass
- The class object for the feature in question.
Returns
- true if featureClass is an available feature.