Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Snippets Contribution - adding an empty new line at the end of CDATA
Snippets Contribution - adding an empty new line at the end of CDATA [message #1843548] Thu, 05 August 2021 13:30 Go to next message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
Hi everyone,

I am having trouble to add an empty new line at the end of CDATA when defining the SnippetContributions.
  <extension point="org.eclipse.wst.common.snippets.SnippetContributions">
    <category description="%snippets.category.project_ac_conductors.description" extensions="*.xml" id="snippets.project_ac_conductors" label="%snippets.category.project_ac_conductors.label" smallicon="platform:/plugin/util/icons/obj16/transparent/AcConductor_16x16.png">
      <item id="snippets.project_ac_conductors.cw_cu80" label="%snippets.category.project_ac_conductors.item.cw_cu80.label" smallicon="platform:/plugin/util/icons/obj16/transparent/GroovedContactWire_16x16.png">
        <content>
<![CDATA[ 
<!-- grooved contact wire 80mm² Cu -->
<ToProperty toPos_km="${toPos_km}" equivalentRadius_mm="3.89" r20_Ohm_km="0.2221" temperatureCoefficient="0.00393" temperature_degreeCelsius="${temperature_degreeCelsius}" x_m="${x_m}" y_m="${y_m}" />
EMPTY NEW LINE
]]>
        </content>
variables go here but deleted as not relevant
      </item>
    </category>
  </extension>


The empty new line is marked with EMPTY NEW LINE in the code above.

I tried already all suggested on https://stackoverflow.com/questions/35504890/how-to-add-a-newline-line-break-in-xml-file but had no luck. I tried:
<br/>
&#xD;&#xA;


Any hint is appreciated!

Martin
Re: Snippets Contribution - adding an empty new line at the end of CDATA [message #1843552 is a reply to message #1843548] Thu, 05 August 2021 15:29 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4493
Registered: July 2009
Senior Member

You could try externalizing the content value. I wouldn't have expected that to be required, though.

_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Thu, 05 August 2021 15:42]

Report message to a moderator

Re: Snippets Contribution - adding an empty new line at the end of CDATA [message #1843633 is a reply to message #1843552] Wed, 11 August 2021 12:11 Go to previous message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
Thanks for your suggestion Nitin!
Unfortunately the behaviour does not change by using externalised strings with \n for new line.
Still no chance to get an empty new line :(.
Previous Topic:War Web-INF/classes without .class in Tomcat
Next Topic:@FacesConfig e JSF version2_3
Goto Forum:
  


Current Time: Thu Oct 10 20:31:04 GMT 2024

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

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

Back to the top