use of org.eclipse.mylyn.wikitext.parser.markup.IdGenerationStrategy in project mylyn.docs by eclipse.
the class AsciiDocContentState method putAttribute.
public void putAttribute(String attrName, String value) {
attributes.put(attrName, value);
IdGenerationStrategy generationStrategy = getIdGenerator().getGenerationStrategy();
if (generationStrategy instanceof AsciiDocIdGenerationStrategy) {
if (ATTRIBUTE_IDPREFIX.equals(attrName)) {
((AsciiDocIdGenerationStrategy) generationStrategy).setIdPrefix(value);
} else if (ATTRIBUTE_IDSEPARATOR.equals(attrName)) {
((AsciiDocIdGenerationStrategy) generationStrategy).setIdSeparator(value);
}
}
}
use of org.eclipse.mylyn.wikitext.parser.markup.IdGenerationStrategy in project mylyn.docs by eclipse.
the class MarkdownLanguageTest method testIdGenerationStrategy.
public void testIdGenerationStrategy() {
IdGenerationStrategy strategy = new MarkdownLanguage().getIdGenerationStrategy();
assertNotNull(strategy);
assertEquals(GfmIdGenerationStrategy.class, strategy.getClass());
}
use of org.eclipse.mylyn.wikitext.parser.markup.IdGenerationStrategy in project mylyn.docs by eclipse.
the class AsciiDocContentState method removeAttribute.
public void removeAttribute(String attrName) {
attributes.remove(attrName);
IdGenerationStrategy generationStrategy = getIdGenerator().getGenerationStrategy();
if (generationStrategy instanceof AsciiDocIdGenerationStrategy) {
if (ATTRIBUTE_IDPREFIX.equals(attrName)) {
((AsciiDocIdGenerationStrategy) generationStrategy).setIdPrefix(AsciiDocContentState.IDPREFIX_DEFAULT_VALUE);
} else if (ATTRIBUTE_IDSEPARATOR.equals(attrName)) {
((AsciiDocIdGenerationStrategy) generationStrategy).setIdSeparator(AsciiDocContentState.IDSEPARATOR_DEFAULT_VALUE);
}
}
}
Aggregations