Search in sources :

Example 11 with BasicStructuredDocument

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;
}
Also used : DTDStructuredDocumentReParser(org.eclipse.wst.dtd.core.internal.text.DTDStructuredDocumentReParser) BasicStructuredDocument(org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument) IStructuredDocument(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)

Example 12 with BasicStructuredDocument

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());
}
Also used : BasicStructuredDocumentRegion(org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion) BasicStructuredDocument(org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument)

Example 13 with BasicStructuredDocument

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;
}
Also used : BasicStructuredDocument(org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument) IStructuredDocument(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument) CSSStructuredDocumentReParser(org.eclipse.wst.css.core.internal.text.CSSStructuredDocumentReParser)

Example 14 with BasicStructuredDocument

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;
}
Also used : BasicStructuredDocument(org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument) IModelHandler(org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler)

Aggregations

BasicStructuredDocument (org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument)14 IStructuredDocument (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)5 IModelHandler (org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler)3 BadLocationException (org.eclipse.jface.text.BadLocationException)2 IDocumentExtension3 (org.eclipse.jface.text.IDocumentExtension3)2 JSPReParser (org.eclipse.jst.jsp.core.internal.parser.JSPReParser)2 EmbeddedTypeHandler (org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler)2 BasicStructuredDocumentRegion (org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ITextFileBuffer (org.eclipse.core.filebuffers.ITextFileBuffer)1 ITextFileBufferManager (org.eclipse.core.filebuffers.ITextFileBufferManager)1 IFile (org.eclipse.core.resources.IFile)1 IPath (org.eclipse.core.runtime.IPath)1 IDocument (org.eclipse.jface.text.IDocument)1 TLDCMDocumentManager (org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager)1 CSSStructuredDocumentReParser (org.eclipse.wst.css.core.internal.text.CSSStructuredDocumentReParser)1 DTDStructuredDocumentReParser (org.eclipse.wst.dtd.core.internal.text.DTDStructuredDocumentReParser)1 BlockMarker (org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker)1 BlockTagParser (org.eclipse.wst.sse.core.internal.ltk.parser.BlockTagParser)1