Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » WikiText Templates and Content Assist(WikiText template does not show in Conent Assist when text is selected)
WikiText Templates and Content Assist [message #548411] 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 #548441 is a reply to message #548411] Wed, 21 July 2010 20:51 Go to previous messageGo to next 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
>
>
Re: WikiText Templates and Content Assist [message #548448 is a reply to message #548441] Wed, 21 July 2010 21:23 Go to previous messageGo to next message
Bill Blalock is currently offline Bill BlalockFriend
Messages: 119
Registered: July 2009
Location: Alabama
Senior Member
Thanks David!

> > 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.

You are right!

Do you know where the documentation of the the variables that WikiText templates can process is? "text" is not listed as a choice in the insert variable list. In some examples I saw other variables not on the insert variable list used in templates (for example the name of the document).

I checked the Galileo Context Help. "text" was not included in the Editor Template - Template variables help. I could not find any help on template variables in the WikiText documentation. I haven't check the Helio help yet.

Again, thanks for getting me unstuck on this problem!

Have a good one!!!

Re: WikiText Templates and Content Assist [message #548478 is a reply to message #548448] Thu, 22 July 2010 05:24 Go to previous message
David Green is currently offline David GreenFriend
Messages: 136
Registered: July 2009
Senior Member
Bill,

Glad it's working for you! As far as I know these variables are not
documented except for in the UI where you found the others. I'm not
sure why ${text} is not listed.

David

On 7/21/2010 2:23 PM, Bill Blalock wrote:
> Thanks David!
>
>> > 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.
>
> You are right!
>
> Do you know where the documentation of the the variables that WikiText
> templates can process is? "text" is not listed as a choice in the insert
> variable list. In some examples I saw other variables not on the insert
> variable list used in templates (for example the name of the document).
>
> I checked the Galileo Context Help. "text" was not included in the
> Editor Template - Template variables help. I could not find any help on
> template variables in the WikiText documentation. I haven't check the
> Helio help yet.
>
> Again, thanks for getting me unstuck on this problem!
>
> Have a good one!!!
>
>
Re: WikiText Templates and Content Assist [message #601727 is a reply to message #548441] Wed, 21 July 2010 21:23 Go to previous message
Bill Blalock is currently offline Bill BlalockFriend
Messages: 119
Registered: July 2009
Location: Alabama
Senior Member
Thanks David!

> > 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.

You are right!

Do you know where the documentation of the the variables that WikiText templates can process is? "text" is not listed as a choice in the insert variable list. In some examples I saw other variables not on the insert variable list used in templates (for example the name of the document).

I checked the Galileo Context Help. "text" was not included in the Editor Template - Template variables help. I could not find any help on template variables in the WikiText documentation. I haven't check the Helio help yet.

Again, thanks for getting me unstuck on this problem!

Have a good one!!!
Re: WikiText Templates and Content Assist [message #601740 is a reply to message #548448] Thu, 22 July 2010 05:24 Go to previous message
David Green is currently offline David GreenFriend
Messages: 136
Registered: July 2009
Senior Member
Bill,

Glad it's working for you! As far as I know these variables are not
documented except for in the UI where you found the others. I'm not
sure why ${text} is not listed.

David

On 7/21/2010 2:23 PM, Bill Blalock wrote:
> Thanks David!
>
>> > 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.
>
> You are right!
>
> Do you know where the documentation of the the variables that WikiText
> templates can process is? "text" is not listed as a choice in the insert
> variable list. In some examples I saw other variables not on the insert
> variable list used in templates (for example the name of the document).
>
> I checked the Galileo Context Help. "text" was not included in the
> Editor Template - Template variables help. I could not find any help on
> template variables in the WikiText documentation. I haven't check the
> Helio help yet.
>
> Again, thanks for getting me unstuck on this problem!
>
> Have a good one!!!
>
>
Previous Topic:Jira additional required Field
Next Topic:Technical question regarding the MarkupViewer
Goto Forum:
  


Current Time: Wed Apr 24 20:35:11 GMT 2024

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

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

Back to the top