Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » [wikitext] How to use MarkupLanguageConfiguration?
[wikitext] How to use MarkupLanguageConfiguration? [message #772064] Wed, 28 December 2011 23:10 Go to next message
Edwin Park is currently offline Edwin ParkFriend
Messages: 124
Registered: July 2009
Senior Member
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'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.

Thanks,
Edwin
Re: [wikitext] How to use MarkupLanguageConfiguration? [message #772440 is a reply to message #772064] Thu, 29 December 2011 19:49 Go to previous messageGo to next message
David Green is currently offline David GreenFriend
Messages: 136
Registered: July 2009
Senior Member
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
>
Re: [wikitext] How to use MarkupLanguageConfiguration? [message #772444 is a reply to message #772440] Thu, 29 December 2011 20:01 Go to previous messageGo to next message
David Green is currently offline David GreenFriend
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
>>
>
Re: [wikitext] How to use MarkupLanguageConfiguration? [message #772453 is a reply to message #772444] Thu, 29 December 2011 20:34 Go to previous message
Edwin Park is currently offline Edwin ParkFriend
Messages: 124
Registered: July 2009
Senior Member
Thanks David. I'm using the workaround you mentioned. I posted a bug for the MarkupLanguageConfiguration: https://bugs.eclipse.org/bugs/show_bug.cgi?id=367633

Edwin
Previous Topic:Distributed issue tracking with Mylyn?
Next Topic:Am i using the mylyn context in the right way?
Goto Forum:
  


Current Time: Thu Apr 25 17:14:10 GMT 2024

Powered by FUDForum. Page generated in 0.03191 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top