@Override public void beginBlock(BlockType type, Attributes attributes) { for (DocumentBuilder builder : builders) { builder.beginBlock(type, attributes); } }
@Override protected void beginBlock() { Attributes attributes = new Attributes(); builder.beginBlock(BlockType.QUOTE, attributes); }
@Override protected void beginBlock() { Attributes attributes = new Attributes(); builder.beginBlock(BlockType.QUOTE, attributes); }
@Override protected void beginBlock() { Attributes attributes = new Attributes(); builder.beginBlock(BlockType.PREFORMATTED, attributes); }
@Override protected void beginBlock() { builder.beginBlock(BlockType.PREFORMATTED, new Attributes()); }
private void openOne(Attributes attributes) { if (!quoteBlockState.isEmpty()) { BlockState blockState = quoteBlockState.peek(); if (blockState.paraOpen) { blockState.paraOpen = false; builder.endBlock(); } } builder.beginBlock(BlockType.QUOTE, attributes); quoteBlockState.push(new BlockState()); }
private void openOne(Attributes attributes) { if (!quoteBlockState.isEmpty()) { BlockState blockState = quoteBlockState.peek(); if (blockState.paraOpen) { blockState.paraOpen = false; builder.endBlock(); } } builder.beginBlock(BlockType.QUOTE, attributes); quoteBlockState.push(new BlockState()); }
@Override protected void beginBlock() { if (title != null) { Attributes attributes = new Attributes(); attributes.setTitle(title); builder.beginBlock(BlockType.PANEL, attributes); } Attributes attributes = new Attributes(); Attributes preAttributes = new Attributes(); if (language != null) { // chili-style class and atlassian-style class attributes.setCssClass(language + " code-" + language); //$NON-NLS-1$ } builder.beginBlock(BlockType.PREFORMATTED, preAttributes); builder.beginBlock(BlockType.CODE, attributes); }
@Override public int processLineContent(String line, int offset) { if (blockLineCount++ == 0) { offset = matcher.start(1); builder.beginBlock(BlockType.PARAGRAPH, new Attributes()); } else { Matcher endMatcher = endPattern.matcher(line); if (endMatcher.matches()) { setClosed(true); return endMatcher.start(1); } } builder.characters(offset == 0 ? line : line.substring(offset)); builder.characters("\n"); //$NON-NLS-1$ return -1; }
@Override public int processLineContent(String line, int offset) { if (blockLineCount++ == 0) { offset = matcher.start(1); builder.beginBlock(BlockType.PREFORMATTED, new Attributes()); } else { Matcher endMatcher = endPattern.matcher(line); if (endMatcher.matches()) { setClosed(true); return endMatcher.start(1); } } builder.characters(offset == 0 ? line : line.substring(offset)); builder.characters("\n"); //$NON-NLS-1$ return -1; }
@Override public int processLineContent(String line, int offset) { if (blockLineCount++ == 0) { offset = matcher.start(1); builder.beginBlock(BlockType.PREFORMATTED, new Attributes()); } else { Matcher endMatcher = endPattern.matcher(line); if (endMatcher.matches()) { setClosed(true); return endMatcher.start(1); } } builder.characters(offset == 0 ? line : line.substring(offset)); builder.characters("\n"); //$NON-NLS-1$ return -1; }
@Override public int processLineContent(String line, int offset) { if (blockLineCount++ == 0) { offset = matcher.start(1); ((TWikiLanguage) markupLanguage).setLiteralMode(true); builder.beginBlock(BlockType.PARAGRAPH, new Attributes()); } else { Matcher endMatcher = endPattern.matcher(line); if (endMatcher.matches()) { setClosed(true); return endMatcher.start(1); } } markupLanguage.emitMarkupLine(parser, state, line, offset); builder.characters("\n"); //$NON-NLS-1$ return -1; }
@Override protected void beginBlock() { Attributes attributes = new Attributes(); builder.beginBlock(BlockType.PREFORMATTED, attributes); // Set a flag that signals to nesting-capable blocks (e.g. TableBlock) // that they must not try to parse inside this literal layout block. getMarkupLanguage().setCurrentBlockHasLiteralLayout(true); }
@Override protected int processLineContent(String line, int offset) { if (blockLineCount++ == 0) { Attributes attributes = new Attributes(); attributes.setCssClass("javaStackTrace"); //$NON-NLS-1$ builder.beginBlock(BlockType.PREFORMATTED, attributes); } else { if (!STACK_TRACE_PATTERN.matcher(line).matches()) { setClosed(true); return 0; } } builder.characters(offset > 0 ? line.substring(offset) : line); builder.characters("\n"); //$NON-NLS-1$ return -1; }
@Override public int processLineContent(String line, int offset) { if (blockLineCount == 0) { Attributes attributes = new Attributes(); offset = matcher.start(1); builder.beginBlock(BlockType.QUOTE, attributes); builder.beginBlock(BlockType.PARAGRAPH, new Attributes()); } if (markupLanguage.isEmptyLine(line)) { setClosed(true); return 0; } if (blockLineCount != 0) { builder.lineBreak(); } ++blockLineCount; getMarkupLanguage().emitMarkupLine(getParser(), state, line, offset); return -1; }
private void emitToc(OutlineItem item) { if (item.getChildren().isEmpty()) { return; } Attributes nullAttributes = new Attributes(); builder.beginBlock(BlockType.NUMERIC_LIST, new Attributes()); for (OutlineItem child : item.getChildren()) { builder.beginBlock(BlockType.LIST_ITEM, nullAttributes); builder.link('#' + child.getId(), child.getLabel()); emitToc(child); builder.endBlock(); } builder.endBlock(); }
@Override protected int processLineContent(String line, int offset) { if (blockLineCount++ == 0) { Attributes attributes = new Attributes(); attributes.setCssClass("eclipseErrorDetails"); //$NON-NLS-1$ builder.beginBlock(BlockType.PREFORMATTED, attributes); } else { if (markupLanguage.isEmptyLine(line)) { setClosed(true); return 0; } } builder.characters(offset > 0 ? line.substring(offset) : line); builder.characters("\n"); //$NON-NLS-1$ return -1; }
private void emitToc(OutlineItem item) { if (item.getChildren().isEmpty()) { return; } if ((item.getLevel() + 1) > maxLevel) { return; } Attributes nullAttributes = new Attributes(); builder.beginBlock(BlockType.NUMERIC_LIST, new Attributes(null, null, "list-style: " + style + ";", null)); //$NON-NLS-1$ //$NON-NLS-2$ for (OutlineItem child : item.getChildren()) { builder.beginBlock(BlockType.LIST_ITEM, nullAttributes); builder.link('#' + child.getId(), child.getLabel()); emitToc(child); builder.endBlock(); } builder.endBlock(); }
protected void emitToc(OutlineItem item) { if (item.getChildren().isEmpty()) { return; } if ((item.getLevel() + 1) > maxLevel) { return; } Attributes nullAttributes = new Attributes(); builder.beginBlock(BlockType.NUMERIC_LIST, new Attributes(null, null, "list-style: " + style + ";", null)); //$NON-NLS-1$ //$NON-NLS-2$ for (OutlineItem child : item.getChildren()) { builder.beginBlock(BlockType.LIST_ITEM, nullAttributes); builder.link('#' + child.getId(), child.getLabel()); emitToc(child); builder.endBlock(); } builder.endBlock(); }
private void emitToc(OutlineItem item) { if (item.getChildren().isEmpty()) { return; } if ((item.getLevel() + 1) > maxLevel) { return; } Attributes nullAttributes = new Attributes(); builder.beginBlock(BlockType.NUMERIC_LIST, new Attributes(null, null, "list-style: " + style + ";", null)); //$NON-NLS-1$ //$NON-NLS-2$ for (OutlineItem child : item.getChildren()) { builder.beginBlock(BlockType.LIST_ITEM, nullAttributes); builder.link('#' + child.getId(), child.getLabel()); emitToc(child); builder.endBlock(); } builder.endBlock(); }