Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse Templates: Escape < and > ?
icon5.gif  Eclipse Templates: Escape < and > ? [message #810830] Thu, 01 March 2012 10:53 Go to next message
Simon Mising name is currently offline Simon Mising name
Messages: 12
Registered: December 2011
Junior Member
Hi,
simple question:

I've created a new template.xml file for my plugin (extending org.eclipse.ui.editors.templates).

My question is:
Can I use < and > within the template?
For example:

...
<template name="Example" description="Example" id="example" context="own" enabled="true" autoinsert="false">

this is a simple test with < and >

</template>
...


This example does not work. How can I escape < and > to use them in my template?

Thanks for your help.
Re: Eclipse Templates: Escape < and > ? [message #810880 is a reply to message #810830] Thu, 01 March 2012 11:38 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
Try:
&lt; for <
and
&gt; for >
Re: Eclipse Templates: Escape < and > ? [message #811437 is a reply to message #810880] Fri, 02 March 2012 05:45 Go to previous messageGo to next message
Simon Mising name is currently offline Simon Mising name
Messages: 12
Registered: December 2011
Junior Member
Thanks, worked!

Thread can be closed.
Re: Eclipse Templates: Escape < and > ? [message #811525 is a reply to message #811437] Fri, 02 March 2012 08:14 Go to previous message
Libor Jelinek is currently offline Libor Jelinek
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Another option should be enclose element content between <![CDATA[ and ]]>. In this case, you don't have to replace < or >.
Previous Topic:Updating selection when removing lines from table
Next Topic:Common Navigator Framework - Where is "Filters" option?
Goto Forum:
  


Current Time: Tue Jul 22 23:46:29 EDT 2014

Powered by FUDForum. Page generated in 0.02260 seconds