use of org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument in project webtools.sourceediting by eclipse.
the class DTDDocumentLoader method newEncodedDocument.
protected IEncodedDocument newEncodedDocument() {
IStructuredDocument document = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
DTDStructuredDocumentReParser reParser = new DTDStructuredDocumentReParser();
reParser.setStructuredDocument(document);
if (document instanceof BasicStructuredDocument) {
((BasicStructuredDocument) document).setReParser(reParser);
}
return document;
}
use of org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument in project webtools.sourceediting by eclipse.
the class TestObjects method testEndedFlag.
public void testEndedFlag() {
BasicStructuredDocumentRegion region = new BasicStructuredDocumentRegion();
region.setParentDocument(new BasicStructuredDocument());
boolean deleted = region.isDeleted();
boolean ended = region.isEnded();
region.setEnded(!ended);
assertEquals(!ended, region.isEnded());
assertEquals(deleted, region.isDeleted());
}
use of org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument in project webtools.sourceediting by eclipse.
the class CSSDocumentLoader method newEncodedDocument.
protected IEncodedDocument newEncodedDocument() {
// DMW: I copied this from CSSModelImple ...
// but am not sure its right
IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
CSSStructuredDocumentReParser reParser = new CSSStructuredDocumentReParser();
reParser.setStructuredDocument(structuredDocument);
((BasicStructuredDocument) structuredDocument).setReParser(reParser);
return structuredDocument;
}
use of org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument in project webtools.sourceediting by eclipse.
the class AbstractUndoManagerTest method createDocument.
private IDocument createDocument(String contents) {
IModelHandler handler = ModelHandlerRegistry.getInstance().getHandlerForContentTypeId("org.eclipse.core.runtime.xml");
BasicStructuredDocument document = (BasicStructuredDocument) handler.getDocumentLoader().createNewStructuredDocument();
document.set(contents);
// return new Document(contents);
return document;
}
Aggregations