Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Setting the "New text file line delimiter" preference(Eclipse line delimiter setting by a preference-task)
Setting the "New text file line delimiter" preference [message #1717733] Wed, 16 December 2015 11:40 Go to next message
Tim Schmid is currently offline Tim SchmidFriend
Messages: 3
Registered: December 2015
Junior Member
I'm currently working on an Oomph-Setup in which I want to set the preference "New text file line delimiter"("Preferences" -> "General" -> "Workspace" -> "New text file line delimiter") to "Other: Windows" so a Unix user wouldn't mess up code with a Unix line separator.
I'm trying to achieve this by the following preference-task:

<setupTask
xsi:type="setup:PreferenceTask"
id="preferences.general.workspace.lineDelimiter"
key="/instance/org.eclipse.core.runtime/line.separator"
value="\r\n">
<description>New text file line delimiter</description>
</setupTask>

I attached the result here.
index.php/fa/24340/0/
Somehow Eclipse doesn't get that and when I start the Eclipse-installation the second time, it escapes the line delimiter to "\\r\\n".

What did I forget/do wrong?

Thanks in advance,
Tim.
Re: Setting the "New text file line delimiter" preference [message #1717804 is a reply to message #1717733] Wed, 16 December 2015 19:48 Go to previous messageGo to next message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
Hi Tim,

did you try recording the preference change with the Oomph tooling and see what it suggests?

Andreas
Re: Setting the &quot;New text file line delimiter&quot; preference [message #1717862 is a reply to message #1717804] Thu, 17 December 2015 12:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Andreas,

Yes that should work. It's hard to create this manually because the
cell editor will normalize the line feed conventions so that it's very
hard if the whole purpose is to specify a string to set the line feed
convention using the literal characters. If you want to do this
manually, keep in mind that ${0x0} through ${0x1F} can be used as
variables that expand to the control characters that are otherwise hard
to enter manually.

On 16/12/2015 8:48 PM, Andreas Graf wrote:
> Hi Tim,
>
> did you try recording the preference change with the Oomph tooling and
> see what it suggests?
>
> Andreas
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Setting the &quot;New text file line delimiter&quot; preference [message #1717967 is a reply to message #1717862] Fri, 18 December 2015 09:39 Go to previous message
Tim Schmid is currently offline Tim SchmidFriend
Messages: 3
Registered: December 2015
Junior Member
Hey everyone,

recording it with the Oomph recorder didn't work for me (Eclipse was still escaping it after the first startup, but maybe I just did something wrong).
I fixed it with a resource creation of the preference file now.
The task looks as followed:

<setupTask
xsi:type="setup:ResourceCreationTask"
id="preferences.general.workspace.lineDelimiter"
content="eclipse.preferences.version=1&#xA;line.separator=\r\n"
targetURL="${workspace.location|uri}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.runtime.prefs"/>
</setupTask>

Regards and thanks for the help,
Tim.
Previous Topic:Project setup with sub projects
Next Topic:[Announcement] Save your preferences on the Eclipse.org server
Goto Forum:
  


Current Time: Thu Dec 26 11:17:50 GMT 2024

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

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

Back to the top