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.
Summary: | Embedded newlines in VM properties | ||
---|---|---|---|
Product: | java | Reporter: | peterhull90 <peterhull90> |
Component: | Project | Assignee: | Tomas Zezula <tzezula> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jkovalsky, vkhashin |
Priority: | P3 | ||
Version: | 4.x | ||
Hardware: | PC | ||
OS: | Windows 8 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
solution
solution2 |
Description
peterhull90
2014-10-16 09:32:13 UTC
Yes it's a bug. The new line should be just wrapping. Created attachment 153489 [details]
solution
This is good idea to have multiline field on VM options. But saving text format is not trivial task, also customize dialog should be used formatting too. So I have removed opportunity to moving text on next line by pressing "Enter" key. Also I have added focus moving to next field from JTextArea, and added "..." after word "Customize" on the button, because this button invokes dialog. Created attachment 153823 [details]
solution2
I think it will not be too hard to store formatting while customizing vm options in dialog. So the solution2 is better. Option 2 is certainly a lot shorter. I'm not familiar with the NB code base but will that change affect other parts of the system too? Yes. I know what that code uses in web application project too, maybe in all ant projects. But this changes only replace formatting character "\n" to whitespace and do it for VM options and application arguments. I note that this is still present in 8.1rc2. I am going to integrate the solution #1. The solution #2 works only when compile on save is enabled. When the compile on save is disabled the copyMultiValue is not used at all, the property is loaded by Ant (including the new lines) the problem will appear again. The solution #2 can be changed not to remove the new lines before run but remove them when the property is saved into the project.properties. This will work but the formatting will be lost after save of properties. So I think that the solution #1 is better. At least it's much better than the actual state. Thanks a lot for the patch! Fixed jet-main b3da58e18186. Again thanks for the patch! And thank you both for solving this one. I look forward to seeing it in the next release! Integrated into 'main-silver', will be available in build *201603150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b3da58e18186 User: Tomas Zezula <tzezula@netbeans.org> Log: #247971:Embedded newlines in VM properties |