Search in sources :

Example 1 with HeadingBlock

use of org.eclipse.mylyn.wikitext.mediawiki.internal.block.HeadingBlock in project mylyn.docs by eclipse.

the class MediaWikiLanguage method addStandardBlocks.

@Override
protected void addStandardBlocks(List<Block> blocks, List<Block> paragraphBreakingBlocks) {
    // IMPORTANT NOTE: Most items below have order dependencies.  DO NOT REORDER ITEMS BELOW!!
    blocks.add(new HeadingBlock());
    blocks.add(new ListBlock());
    blocks.add(new TableBlock());
    if (hasPreformattedBlock()) {
        // preformatted blocks are lines that start with a single space, and thus are non-optimal for
        // repository usage.
        blocks.add(new PreformattedBlock());
    }
    blocks.add(new SourceBlock());
    blocks.add(new TableOfContentsBlock());
    blocks.add(new EscapeBlock());
    blocks.add(new CommentBlock());
    blocks.add(new BehaviorSwitchBlock());
    for (Block block : blocks) {
        if (block instanceof ParagraphBlock || block instanceof CommentBlock) {
            continue;
        }
        paragraphBreakingBlocks.add(block);
    }
}
Also used : ListBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.ListBlock) TableOfContentsBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.TableOfContentsBlock) SourceBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.SourceBlock) CommentBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.CommentBlock) TableBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.TableBlock) PreformattedBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.PreformattedBlock) BehaviorSwitchBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.BehaviorSwitchBlock) HeadingBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.HeadingBlock) TableOfContentsBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.TableOfContentsBlock) PreformattedBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.PreformattedBlock) SourceBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.SourceBlock) TableBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.TableBlock) CommentBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.CommentBlock) ParagraphBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.ParagraphBlock) BehaviorSwitchBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.BehaviorSwitchBlock) ListBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.ListBlock) Block(org.eclipse.mylyn.wikitext.parser.markup.Block) EscapeBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.EscapeBlock) ParagraphBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.ParagraphBlock) HeadingBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.HeadingBlock) EscapeBlock(org.eclipse.mylyn.wikitext.mediawiki.internal.block.EscapeBlock)

Aggregations

BehaviorSwitchBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.BehaviorSwitchBlock)1 CommentBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.CommentBlock)1 EscapeBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.EscapeBlock)1 HeadingBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.HeadingBlock)1 ListBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.ListBlock)1 ParagraphBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.ParagraphBlock)1 PreformattedBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.PreformattedBlock)1 SourceBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.SourceBlock)1 TableBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.TableBlock)1 TableOfContentsBlock (org.eclipse.mylyn.wikitext.mediawiki.internal.block.TableOfContentsBlock)1 Block (org.eclipse.mylyn.wikitext.parser.markup.Block)1