tweezy23 / anyedittools

Automatically exported from code.google.com/p/anyedittools
2 stars 0 forks source link

Fix line delimiters (CRLF to LF etc) does not respect default workspace settings #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For example, on my windows machine I set up default settings for workspace to 
use UTF-8 as encoding and unix-style line endings, but unless you set the same 
per-project AnyEdit will save file with line endings that are default for 
platform (eg. despite unix line endings in prefs it will save 'em as CRLFs)

What steps will reproduce the problem?
1. On windows platform set General/Workspace/New text file line delimiter to be 
unix
2. In General/Editors/AnyEdit Tools/Auto - Convert enable "Fix line delimiters"
3. Open file with unix line endings, edit and save it

What is the expected output? What do you see instead?
File should be saved with unix line endings, but instead it will be saved with 
windows line endings (all LFs will be replaced by CRLFs).

What version of the product are you using? On what operating system?
Described above is true at least for Eclipse 4.4 (I'm currently using 4.4.1) 
with latest AnyEdit Tools (2.4.12)

Original issue reported on code.google.com by Yury.Bul...@gmail.com on 20 Feb 2015 at 10:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello, I have Eclipse Luna (eclipse.buildId=4.4.2.M20150204-1700) with AnyEdit 
v2.14.12 installed.

I use Win 7. I selected Unix line delimiters in Window -> Options -> General -> 
Workspace.
There are several lines in workspace file 
(workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cor
e.runtime.prefs):
eclipse.preferences.version=1
line.separator=\n

But I have problems when editing files:
1. Is it ok, that in File -> Convert Line Delimiters To... Windows has 
[default]? Or [default] should be against line delimiter which is selected in 
Preferences?

2. If I check "Fix line Delimiters" in AnyEdit settings, then on saving a file 
all my line delimiters become Windows style (\r\n) despite the fact that 
checkbox tooltip says that it should use Workspace settings and Preferences 
line delimiter is set to Unix?

3. If I uncheck "Fix line Delimiters" option, then on saving a file my last 
line gets Windows style (\r\n) delimiter If I hadn't empty line at the end of 
file and "Create new line at the end of file" option's checked.

I believe this happened after update to 2.4.12
Also, as it's said, setting per project settings for line delimiters seems 
fixes the problem.

Original comment by roman.a....@gmail.com on 3 Mar 2015 at 6:44

GoogleCodeExporter commented 9 years ago
Yep. 
Sorry guys, I'm only using projects with settings and so didn't noticed that.
I will provide fix soon.
Regards,
Andrey

Original comment by iloveeclipse on 3 Mar 2015 at 7:29

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 86a8f13a5385.

Original comment by iloveeclipse on 3 Mar 2015 at 7:54

GoogleCodeExporter commented 9 years ago
Guys,

please validate. 
I've uploaded new 2.4.13 version with the fix to the update site.
Regards,
Andrey

Original comment by iloveeclipse on 3 Mar 2015 at 8:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thank you, my problem is solved.
I believe that Issue #102 is a duplicate to this issue.

Original comment by roman.a....@gmail.com on 3 Mar 2015 at 8:57

GoogleCodeExporter commented 9 years ago
Issue 102 has been merged into this issue.

Original comment by iloveeclipse on 3 Mar 2015 at 8:57