Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » WikiText Templates and Content Assist
WikiText Templates and Content Assist [message #601714] Wed, 21 July 2010 17:47 Go to next message
Bill Blalock is currently offline Bill BlalockFriend
Messages: 119
Registered: July 2009
Location: Alabama
Senior Member
Hi all...

I am trying to add to the WikiText content assist options with templates.

I added a simple template named <code> using the <code> template from the Java editor. The pattern is

<code>${word_selection}</code>${cursor}

I also tried

<code>${word_selection}${}</code>${cursor}

I want the <code> template to work in code assist like the build in <--comment.

When no text is selected <code> is included in the context assist list and works as described in the WikiText Users Guide.

When text is selected <code> is not included in the context assist list. This is frustrating as I'd like to clean up text I've written with code assist, enclosing selected text with <code></code> for example.

I've tried lots of variations and spent the morning searching eclipse.org and google in general for template examples.

What am I doing wrong?

In the Java Text Editor template what does ${} do in the pattern.

Thanks
Bill Blalock
Re: WikiText Templates and Content Assist [message #601724 is a reply to message #601714] Wed, 21 July 2010 20:51 Go to previous message
David Green is currently offline David GreenFriend
Messages: 136
Registered: July 2009
Senior Member
Bill,

Comments below:

On 7/21/2010 10:47 AM, Bill Blalock wrote:
> Hi all...
>
> I am trying to add to the WikiText content assist options with templates.
>
> I added a simple template named <code> using the <code> template from
> the Java editor. The pattern is
>
> <code>${word_selection}</code>${cursor}

try this:

<code>${text}</code>${cursor}

${text} will be replaced by the current text selection (if there is one)

I just tried it here and it works for me. Please let me know how it
works out for you.

David

> I also tried
> <code>${word_selection}${}</code>${cursor}
>
> I want the <code> template to work in code assist like the build in
> <--comment.
>
> When no text is selected <code> is included in the context assist list
> and works as described in the WikiText Users Guide.
>
> When text is selected <code> is not included in the context assist list.
> This is frustrating as I'd like to clean up text I've written with code
> assist, enclosing selected text with <code></code> for example.
>
> I've tried lots of variations and spent the morning searching
> eclipse.org and google in general for template examples.
>
> What am I doing wrong?
>
> In the Java Text Editor template what does ${} do in the pattern.
>
> Thanks
> Bill Blalock
>
>
Previous Topic:Jira additional required Field
Next Topic:Technical question regarding the MarkupViewer
Goto Forum:
  


Current Time: Thu Apr 25 23:57:31 GMT 2024

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

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

Back to the top