use of org.eclipse.jst.jsp.core.internal.parser.JSPReParser in project webtools.sourceediting by eclipse.
the class JSPDocumentLoader method newEncodedDocument.
/**
* This method must return a new instance of IStructuredDocument, that has
* been initialized with appropriate parser. For many loaders, the
* (default) parser used is known for any input. For others, the correct
* parser (and its initialization) is normall dependent on the content of
* the file. This no-argument method should assume "empty input" and would
* therefore return the default parser for the default contentType. If the
* parser is to handle tag libraries, it must have a TaglibSupport object
* with a valid URIResolver and this IStructuredDocument attached to it
* before the contents are set on the IStructuredDocument.
*/
protected IEncodedDocument newEncodedDocument() {
IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
((BasicStructuredDocument) structuredDocument).setReParser(new JSPReParser());
// structuredDocument.setDocumentPartitioner(new
// JSPJavaDocumentPartioner());
// even though this is an "empty model" ... we want it to have at
// least
// the
// default embeddeded content type handler
EmbeddedTypeHandler embeddedType = getJSPDefaultEmbeddedType();
embeddedType.initializeParser(structuredDocument.getParser());
return structuredDocument;
}
use of org.eclipse.jst.jsp.core.internal.parser.JSPReParser in project webtools.sourceediting by eclipse.
the class JSPModelLoader method newStructuredDocument.
/**
* This method must return a new instance of IStructuredDocument, that has
* been initialized with appropriate parser. For many loaders, the
* (default) parser used is known for any input. For others, the correct
* parser (and its initialization) is normall dependent on the content of
* the file. This no-argument method should assume "empty input" and would
* therefore return the default parser for the default contentType.
*
* If the parser is to handle tag libraries, it must have a TaglibSupport
* object with a valid URIResolver and this IStructuredDocument attached
* to it before the contents are set on the IStructuredDocument.
*/
public IStructuredDocument newStructuredDocument() {
IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
((BasicStructuredDocument) structuredDocument).setReParser(new JSPReParser());
// structuredDocument.setDocumentPartitioner(new
// JSPJavaDocumentPartioner());
// even though this is an "empty model" ... we want it to have at
// least the
// default embeddeded content type handler
EmbeddedTypeHandler embeddedType = getJSPDefaultEmbeddedType(null);
embeddedType.initializeParser(structuredDocument.getParser());
return structuredDocument;
}
Aggregations