Bug 218164 - Compressed .java files
Compressed .java files
Status: NEW
Product: platform
Classification: Unclassified
Component: Templates
7.2
PC Windows 7
: P3 (vote)
: 8.0
Assigned To: Martin Entlicher
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-12 00:24 UTC by BGM
Modified: 2013-09-02 09:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo