This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
New files created from templates are created having unix \n newline separators.
Yes, they are. Why do you think it's wrong? It's not a P2 IMO - downgrading to P3.
If a new file is created on a system, it MUST contain correct, system-dependent line separators. I don't understand your question: it is obviously wrong to separate lines with \n on Windows just as it is wrong to separate lines with \r\n on unix. Why would we let Netbeans look so amateur in this easy-to-fix aspect?
What files - all, Java, text, other? Part can be in loaders where template instantiating is done. Modules that have special handling may need to fix it in their own code.
Bug affects at least all Java templates. I created an ANT file and it was OK. Owners of templates should each check their own ones.
msandor, where is your logic? When you say "Bug affects at least all Java, ANT file was OK" why you believe there is a bug in datasystems?
I do not know where the bug is, that's why I filed this issue against "ide" module.
Do all the lines in the newly generated file contain unix EOLs, or just some of them? Could you please attach such file?
Created attachment 21888 [details] Generated Main class
As I said, I observed this bug only with Java files.
That is because you have build NetBeans on Windows platform so your templates already have CR/LF. Try official build which is build on Solaris.
Both official RC1 and custom 4.2dev build contain the bug ... and new files do NOT have CR/LF, that is the problem.
Tomas' comment was related to why with ant it works and with java it does not. There are two problems - java replaces CRLF from templates by LF even if the templates are correct. This problem is specific to java dataobject. The second problem is that generally when NB were built on Linux, templates do not contain CRLF (they contain LF instead) and this is not corrected when a new file from template is created - you did not experience this second problem probably because you built NB on Windows. This may be a problem in case of zip installation of NetBeans. This needs to be fixed in core. After discussion with Jarda we came up with the following plan. We will fix the first problem and then reassign this to him to fix the second problem.
*** Issue 37669 has been marked as a duplicate of this issue. ***
This bug is now fixed for Java files. Checking in org/netbeans/modules/java/IndentFileEntry.java; /cvs/java/src/org/netbeans/modules/java/IndentFileEntry.java,v <-- IndentFileEntry.java new revision: 1.13; previous revision: 1.12 done Assingning to openide to fix the problem for non java files.
There are no templates in openide to fix.
*** Issue 12010 has been marked as a duplicate of this issue. ***