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.
It would be useful to add the following Macro by default to the editor: // <editor-fold defaultstate="collapsed" desc=" ${DESCRIPTION} "> ${selection line}${cursor} // </editor-fold> With this, in the editor you can select multiple lines and use the "light bulb" menu to Surround with... Code folding and get the opening/closing comments for code folding.
Yes, this could be useful. Thanks. Just for the record, you meant this to be added as a code template, right?
Yes, that's right.
moving opened issues from TM <= 6.1 to TM=Dev
Vita Stejskal agreed that he would review and integrate a patch for this issue contributed by the NetFIX [1] team. [1] http://wiki.netbeans.org/NetFIX
Created attachment 79105 [details] Simple patch for 6.7
Patch applied - http://hg.netbeans.org/jet-main/rev/f1a0c0ebfe62. Please consider adding the same template to other languages too. There might be different line comment character, but the rest of the template is the same. Thanks
No problems about other languages, but, which ones should I implement? I am thinking about JSP, XML and HTML. Which more? I think we should have one issue for each language, since the sources are from different components. Regards
I tested this feature for another languages as HTML, XML, SQL and so on, and it doesn't work for any one except Java. Can someone confirm it for me? Regards
Yes, I think the code-folding feature is only available in the Java editor.
"I am thinking about JSP, XML and HTML. Which more?" - Php, Ruby, Groovy, C/C++. Maybe others, but these plus those you mentioned are the main ones. "I think we should have one issue for each language" - this won't be neccessary. "I tested this feature for another languages as HTML, XML, SQL and so on, and it doesn't work for any one except Java." - Ah, it should generally work for all languages, but perhaps not all languages register this particular FoldManager. I'll try to find what languages do register it and let you know. If it's really only java, then I apologize for a false alarm and we will be able to close the issue.
I found the following languages (mimetypes) that are using CustomFoldManager, which is the one that recognizes <editor-fold> tags in comments: x-c, x-c++, x-h, x-php5, and x-java obviously. If you could add the template to them that would be great. If not, it's ok and I'll close the issue as FIXED. Thanks
I'll work on it soon. Thanks for advise and if I found any problem I let you know. Thanks
Integrated into 'main-golden', will be available in build *200904020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/f1a0c0ebfe62 User: Vita Stejskal <vstejskal@netbeans.org> Log: #125191 - Add "insert code folding comments" (applying NetFIX patch)
Created attachment 79325 [details] Patch for x-c, x-c++ and x-h
Created attachment 79328 [details] Patch for x-php5
I fixed for all languages. Regards
I'm fine to apply C++ patch
Just let me know about changesets. Thanks.
pushed into cnd-main http://hg.netbeans.org/cnd-main?cmd=changeset;node=c36d0ee6ef02 you will see when it is propagated into production (in this iz will appear comment from qa@netbeans org with changeset information)
Integrated into 'main-golden', will be available in build *200904050200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c36d0ee6ef02 User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixing #125191 - Add 'insert code folding comments' (applying NetFIX patch)
I pushed the php.editor changes - http://hg.netbeans.org/jet-main/rev/6e0d63c7adfc Thanks hmichel!
Integrated into 'main-golden', will be available in build *200904080201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6e0d63c7adfc User: Vita Stejskal <vstejskal@netbeans.org> Log: #125191: Add 'insert code folding comments'; applying NetFIX patch
Integrated into 'main-golden', will be available in build *200904081400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6e0d63c7adfc User: Vita Stejskal <vstejskal@netbeans.org> Log: #125191: Add 'insert code folding comments'; applying NetFIX patch
v.