blob: 93ee454d7314121c7fe2d7a5049f6849d58fad09 [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2007, 2019 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.redocs.wikitext.r.core.source;
import org.eclipse.statet.docmlet.wikitext.core.markup.IMarkupLanguage;
import org.eclipse.statet.docmlet.wikitext.core.source.IMarkupLanguagePartitioner;
import org.eclipse.statet.docmlet.wikitext.core.source.MarkupLanguageDocumentSetupParticipant1;
import org.eclipse.statet.docmlet.wikitext.core.source.WikitextPartitioner;
import org.eclipse.statet.docmlet.wikitext.core.source.extdoc.IExtdocMarkupLanguage;
/**
* The document setup participant for Wikitext-R documents.
*/
public class WikidocRweaveDocumentSetupParticipant extends MarkupLanguageDocumentSetupParticipant1 {
public WikidocRweaveDocumentSetupParticipant(final IExtdocMarkupLanguage markupLanguage) {
this(markupLanguage, false);
}
public WikidocRweaveDocumentSetupParticipant(final IExtdocMarkupLanguage markupLanguage,
final boolean templateMode) {
super(markupLanguage, (templateMode) ? IMarkupLanguage.TEMPLATE_MODE : 0);
}
@Override
public String getPartitioningId() {
return IWikitextRweaveDocumentConstants.WIKIDOC_R_PARTITIONING;
}
@Override
protected IMarkupLanguagePartitioner createDocumentPartitioner(final IMarkupLanguage markupLanguage) {
return new WikitextPartitioner(getPartitioningId(),
new WikidocRweavePartitionNodeScanner(markupLanguage, getMarkupLanguageMode()),
IWikitextRweaveDocumentConstants.WIKIDOC_R_CONTENT_TYPES );
}
}