Search in sources :

Example 1 with ContentState

use of org.eclipse.mylyn.wikitext.parser.markup.ContentState 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

DocumentBuilder (org.eclipse.mylyn.wikitext.parser.DocumentBuilder)1 Locator (org.eclipse.mylyn.wikitext.parser.Locator)1 EventDocumentBuilder (org.eclipse.mylyn.wikitext.parser.builder.EventDocumentBuilder)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 Test (org.junit.Test)1