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.

Bug 218164 - Compressed .java files
Summary: Compressed .java files
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Templates (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 00:24 UTC by BGM
Modified: 2013-09-02 09:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (53.88 KB, text/plain)
2012-09-12 00:24 UTC, BGM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BGM 2012-09-12 00:24:05 UTC
Product Version = NetBeans IDE 7.2 (Build 201207171143)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_05
Runtime = Java HotSpot(TM) Client VM 23.1-b03

Issue: When I alter a template (e.g., "Java Main Class" template), save the template, create a new project using the altered template and then using MS Notepad to view the .java file, the file is compressed into one long continuous code. When I used the template before making the alteration, and then using MS Notepad to view the .java file, the file was not compressed. It was displayed as it was in the IDE. Even the compressed .java displays correctly in the IDE, but compressed in Notepad. It seems to removing the 'returns/line feed/carriage returns' before saving to the .java file.

I am not sure if this is a bug or that I am doing something wrong, but it seems to me to be an issue that needs to be fixed.
Comment 1 BGM 2012-09-12 00:24:09 UTC
Created attachment 124190 [details]
IDE log
Comment 2 Jiri Prox 2012-09-13 11:08:13 UTC
When modifying template the result file is saved only with \n line endings instead of respecting the OS default line endings. This is definitely the bug


Temporary workaround:
Go to ${userdir}\config\Templates\Classes\ where are stored modified templates, open each file and save it with correct line endings (I use PSPad or Notepad++ to such conversion)
Comment 3 BGM 2012-09-13 23:46:43 UTC
Thank you for the workaround. Everything works now.