Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 186940 - "After Class" formatting option does not work correctly with closing tab ?>
"After Class" formatting option does not work correctly with closing tab ?>
Status: VERIFIED FIXED
Product: php
Classification: Unclassified
Component: Formatting & Indentation
6.x
PC Windows XP
: P3 (vote)
: TBD
Assigned To: Petr Pisl
issues@php
69patch1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-29 15:34 UTC by pcdinh
Modified: 2010-07-08 13:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pcdinh 2010-05-29 15:34:11 UTC
I have the following code

<?php

class NewTester
{
    
}
      <-- A blank line here and I hope that it is kept after the reformatting
?>


With "After Class" blank line formatting option is set to 1, I tried to reformat the above source code. The result is 

<?php

class NewTester
{
    
}      
?>

The original blank line is removed and no blank line is added as expected.

It does mean that "After Class" option does not force editor to add an additional blank line after the closing brace "}" of the class. 

However, if I add a function after the class's closing brace, it works again.

Before:

<?php

class NewTester
{
    
}



function doIt() 
{

}

?>

After:

<?php

class NewTester
{
    
}
   <-- A blank line here and it works
function doIt() 
{

}

?>

It means that "After Class" blank line formatting option does not work with closing PHP tag ?>
Comment 1 Petr Pisl 2010-05-31 14:47:48 UTC
Fixed in web-main clone. Should be available in the next daily build and also probably in the patch release of NB 6.9. 

There was a bug in the counting new lines before close tag. It always adds 0 new lines, now according the rules.
Comment 2 Filip Zamboj 2010-06-01 12:23:33 UTC
I reproduced issue in build from June 01, 2010. 
Product Version: NetBeans IDE Dev (Build 2010-06-01_09-04-11 )
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
Comment 3 Petr Pisl 2010-06-01 12:39:09 UTC
There is a problem in web-main continual build. The fix wasn't probably propagated yet. 

The detail of the yesterday commit is here: http://hg.netbeans.org/web-main?cmd=changeset;node=9bd8e736b93c
Comment 4 Filip Zamboj 2010-06-01 13:00:52 UTC
ok. thanks. will try again after problem problem with build is resolved
Comment 5 Quality Engineering 2010-06-03 06:13:45 UTC
Integrated into 'main-golden', will be available in build *201006030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9bd8e736b93c
User: Petr Pisl <ppisl@netbeans.org>
Log: #186940 -  "After Class" formatting option does not work correctly with closing tab ?>
Comment 6 Filip Zamboj 2010-06-03 14:54:56 UTC
verified in trunk (on changeset: 172399:0516319c111d)
Comment 7 Filip Zamboj 2010-06-03 14:55:44 UTC
can be ported to 6.9.1
Comment 8 rbalada 2010-06-16 09:59:55 UTC
Transplanted to release691 as 9bd8e736b93c
Comment 9 rbalada 2010-06-16 10:21:09 UTC
Correction, transplanted to release691 as 61eef4ef07b9
Comment 10 Jaromir Uhrik 2010-07-08 13:05:58 UTC
Verified in the following 6.9.1 build:

Product Version: NetBeans IDE 6.9.1 Dev (Build 201007062301)
Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01-279
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo