Search in sources :

Example 6 with Locator

use of org.eclipse.mylyn.wikitext.parser.Locator in project mylyn.docs by eclipse.

the class MultiplexingDocumentBuilderTest method setLocator.

@Test
public void setLocator() {
    DocumentBuilder delegateOne = new NoOpDocumentBuilder();
    DocumentBuilder delegateTwo = new NoOpDocumentBuilder();
    Locator locator = new ContentState();
    multiplexer = new MultiplexingDocumentBuilder(delegateOne, delegateTwo);
    multiplexer.setLocator(locator);
    assertSame(locator, delegateOne.getLocator());
    assertSame(locator, delegateTwo.getLocator());
}
Also used : NoOpDocumentBuilder(org.eclipse.mylyn.wikitext.parser.builder.NoOpDocumentBuilder) Locator(org.eclipse.mylyn.wikitext.parser.Locator) NoOpDocumentBuilder(org.eclipse.mylyn.wikitext.parser.builder.NoOpDocumentBuilder) DocumentBuilder(org.eclipse.mylyn.wikitext.parser.DocumentBuilder) MultiplexingDocumentBuilder(org.eclipse.mylyn.wikitext.parser.builder.MultiplexingDocumentBuilder) EventDocumentBuilder(org.eclipse.mylyn.wikitext.parser.builder.EventDocumentBuilder) MultiplexingDocumentBuilder(org.eclipse.mylyn.wikitext.parser.builder.MultiplexingDocumentBuilder) ContentState(org.eclipse.mylyn.wikitext.parser.markup.ContentState) Test(org.junit.Test)

Aggregations

Locator (org.eclipse.mylyn.wikitext.parser.Locator)6 Test (org.junit.Test)5 DocumentBuilder (org.eclipse.mylyn.wikitext.parser.DocumentBuilder)2 StringWriter (java.io.StringWriter)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 Line (org.eclipse.mylyn.wikitext.commonmark.internal.Line)1 Attributes (org.eclipse.mylyn.wikitext.parser.Attributes)1 MarkupParser (org.eclipse.mylyn.wikitext.parser.MarkupParser)1 EventDocumentBuilder (org.eclipse.mylyn.wikitext.parser.builder.EventDocumentBuilder)1 HtmlDocumentBuilder (org.eclipse.mylyn.wikitext.parser.builder.HtmlDocumentBuilder)1 MultiplexingDocumentBuilder (org.eclipse.mylyn.wikitext.parser.builder.MultiplexingDocumentBuilder)1 NoOpDocumentBuilder (org.eclipse.mylyn.wikitext.parser.builder.NoOpDocumentBuilder)1 ContentState (org.eclipse.mylyn.wikitext.parser.markup.ContentState)1 LocatorImpl (org.eclipse.mylyn.wikitext.util.LocatorImpl)1