|
|
Re: [wikitext] How to use MarkupLanguageConfiguration? [message #772444 is a reply to message #772440] |
Thu, 29 December 2011 20:01 |
David Green Messages: 136 Registered: July 2009 |
Senior Member |
|
|
I forgot to mention: as a workaround, blocks can easily be added by
subclassing the markup language of choice. To do this you would
reference the markup language class name directly in your Ant script
like this:
<wikitext-to-eclipse-help
markupLanguage="com.example.wikitext.ExtendedTextileLanguage" ...>
Your subclass can override addBlockExtensions as follows:
public class ExtendedTextileLanguage extends TextileLanguage {
@Override
protected void addBlockExtensions(List<Block> blocks, List<Block>
paragraphBreakingBlocks) {
blocks.add(new MySpecializedCustomBlock());
super.addBlockExtensions(blocks, paragraphBreakingBlocks);
}
}
I hope that helps,
David
On 12/29/2011 11:49 AM, David Green wrote:
> Edwin,
>
> On 12/28/2011 3:10 PM, Edwin Park wrote:
>> Hi,
>>
>> I'm trying to use MarkupLanguageConfiguration to provide support for
>> custom blocks. I'm trying to follow the instructions under Markup
>> Language Customization here:
>> http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.mylyn.wikitext.help.ui%2Fhelp%2FMarkup-Conversion.html
>>
>>
>>
>> I tried creating my own subclass of MarkupLanguageConfiguration as it
>> says in the last example, but when I try to add a
>> <languageConfiguration> block, Ant complains that wikitext-to-html does
>> not allow a child element called languageConfiguration.
>
> I see the same problem. Please file a bug and I'll look into it.
>
>> I'm also curious about the standard <markupLanguageConfiguration> tag -
>> is it possible to use this to contribute block extensions? I noticed
>> that MarkupLanguageConfiguration has an addBlockExtensions method.
>
> The addBlockExtensions method is not designed for use with Ant. You'll
> need to subclass MarkupLanguageConfiguration and call that method in the
> constructor.
>
> David
>
>
>> Thanks,
>> Edwin
>>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03249 seconds