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 90943 - Remove blank line (optional)
Summary: Remove blank line (optional)
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-12 12:08 UTC by belur_1d
Modified: 2016-08-05 10:16 UTC (History)
1 user (show)

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 belur_1d 2006-12-12 12:08:08 UTC
This is enhancement request.

Suppose a method has a  empty lines between code. Is it possible for netbeans
to remove these lines[empty] when formatting [Applicable within method level only
and NOT between methods.]

Say if some option can be added in editor options for formatting.
Default can be to leave as is. If the user enables it, then netbeans
can remove blank lines withing methods while formatting

Please do consider this issue before making any decision abt rejecting... -:)
Will be nice..
Comment 1 Martin Balin 2016-07-07 07:28:53 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 2 SebastianZ 2016-08-05 10:16:38 UTC
There is still no such option in 8.2 (Build 201608050002).

I'd expect this option to be available at Tools > Options > Editor > Formatting > <Language> > Blank Lines.

Example in JavaScript how this function is supposed to work (if set to 1):

Original source:

function function1() {
  let test = 'bla';



  return test;
}


function function2() {
  let variable1 = 1;


  let variable2 = 2;
  return variable1 + variable2;
}

Formatted source:

function function1() {
  let test = 'bla';

  return test;
}


function function2() {
  let variable1 = 1;

  let variable2 = 2;
  return variable1 + variable2;
}

This is valid for other languages like PHP, too.

Sebastian