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.
Product Version: NetBeans IDE 6.9.1 (Build 201007282301) Java: 1.6.0_21; Java HotSpot(TM) Client VM 17.0-b17 System: Windows XP version 5.1 running on x86; MS932; en (nb) I got the suggestion from community member in Japan. Please try the following codes in NetBeans editor and check code holding. =begin comment =end HEREDOC = <<EOS test EOS # == Foo class # sample class class Foo test end # === foo method # sample method def foo(args) test end ARRAY = [ ] HASH = { } ARRAY.each do |i| test end if cond test end case cond when true test end When I tried NetBeans 6.9.1, only followings are handled properly as code holding. =begin comment =end class Foo test end def foo(args) test end But others are not. Is it possible to improve for other cases?
Created attachment 102447 [details] code folding patch archive for ruby editor I made a patch for this issue and attached. Please review. 1. Changes The following types of "Collapse by Default" are added: - Literals - Control Structures The following folding items are added: - Comments (type of "Collapse by Default": Javadoc Comments) - Multi-line Comments - Embedded Documentation - Literals (type of "Collapse by Default": Literals) - Arrays - Hashes - Ranges - Here Document - Strings - Symbols - Regular Expressions - Command Expansion - Control Structures (type of "Collapse by Default": Control Structures) - Conditional Branches - Conditional Operator - Loops - Method call with block (Iterator) - Exception Handling 2. Specifications (Unlike Javadoc Comments) - Folded block show first line. - Single line block can't fold. 3. Known Issues - The following codes should NOT be collapsed but it can be collapsed. - Not a line comment <<EOS # But not a line comment, # be recognized as a line comment. EOS - The following codes should be collapsed but it can NOT be collapsed. - Multi-line Comments that folding length is 5 characters or less # #345 - Two-line embedded documentation =begin =end - Method call with hash foo(:a => 1, :b => 2) foo :a => 1, :b => 2 - begin ... end (while|until) ... begin end while cond begin end until cond - BEGIN or END block BEGIN { } END { } - The following codes are folded incorrectly. - Multiple conditional operator cond1 ? 1 : cond2 ? 2 : 3 - Multiple here documents print <<FIRST, <<SECOND First Here Document FIRST Second Here Document SECOND 4. Contents of zip file - netbeans_new Modified jar files. Overwrite NetBeans directory. - netbeans_old Original jar files. - nb691_ruby_folding.diff Difference from NetBeans 6.9.1. - folding_sample.rb Sample ruby script. 5. Notes - When you overwrite jar files, it may not be reflected. In that case, delete ${userdir}/var/cache and restart NetBeans. - Use at your own risk. Thanks,
Thank you very much Aoyagi-san for contributing the patch! Can anyone review please? He is a community member in Japan.
Thanks for the patch! The changes in the Ruby modules seem fine, just please make sure they don't cause any new unit test failures (there are several tests in the ruby editing module for code foldings). The changes in options.editor, editor.settings and csl need to be reviewed by their owners, so assigning to editor for further review.
Hello, I have reviewed the diff - it seems fine. The only remaining thing is that the following changed files csl.api/src/org/netbeans/modules/csl/api/ElementKind.java editor.settings/src/org/netbeans/api/editor/settings/SimpleValueNames.java contain API change that require: a. Note in apichanges.xml describing the addition (compatible, addition) b. increasing the spec version of the respective modules Passing back to ruby - feel free to apply the patch if the api changes are documented properly (both a. and b. please). Thanks for the patch and willing to improve the editor. David
@masaakiaoyagi: Do you plan to provide a final patch that addresses the concerns raised here, or do you expect me or someone else to do that? Thanks.
Thanks for reviews. I'm sorry I don't have much time to work on it now. Erno, could you help?
Hi team, Any plan to integrate the patch?
Savvy comments ! Coincidentally , if anyone need to merge PDF files , my secretary used a tool here <a href="http://www.altomerge.com/" >http://www.altomerge.com/</a>.