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 249647 - Option to code-fold blocks of code to the same line when starting on next line.
Summary: Option to code-fold blocks of code to the same line when starting on next line.
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-05 17:37 UTC by HaniiPuppy
Modified: 2015-03-31 08:17 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description HaniiPuppy 2015-01-05 17:37:55 UTC
At the minute, if you type blocks of code on the next line rather than on the same line*, the code folds to the line after the statement**. It would be useful/handy to have an option in the preferences to save space by allowing for code to fold to the same line as the code-block header rather than on the next line.


*

void someMethod()
{

}

as opposed to:

void someMethod() {

}


**

void someMethod()
{ ... }

rather than

void someMethod() { ... }
Comment 1 Svata Dedic 2015-03-31 08:17:41 UTC
This feature should be implemented by individual fold providers. In general the option could allow to include whitespaces preceding the actual fold start to be included in the fold. 

Requires a SPI so that fold provider can introduce its options gui OR an SPI to manifest provider's capabilities, so that common gui can disable unsupported optons and folding defaults can be formed for the mime type.

Utility can be provided for fold providers, to transform a fold before entering it into the hierarchy, which could respect this (or other text-based) option.