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 176906 - Code formatting does not properly format function type
Summary: Code formatting does not properly format function type
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2009-11-16 07:08 UTC by Alexandr Scherbatiy
Modified: 2010-01-25 05:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-11-16 07:08:42 UTC
Steps to reproduce:

- Format the code
-----------------------------------------------------------
import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;


class FuncGraph extends CustomNode{

    var scale:Number = 1;
    var xMin: Number;
    var xMax: Number;
    var dx: Number = 1;
    var color: Color;

    var func: function(a: Number):Number;

    override function create():Node{

        var n = (xMax - xMin) / dx;

        Group{
            content: Polyline{
                stroke: color
                points: for(i in [0..n]) [(xMin + i * dx) * scale, - func(xMin + i * dx) * scale]
            }
        }
    }
}
-----------------------------------------------------------

The result is:
-----------------------------------------------------------
class FuncGraph extends CustomNode {

    var func: function( a: Number

      ): Number 
              ;

}
-----------------------------------------------------------
Comment 1 Alexandr Scherbatiy 2009-11-18 06:59:24 UTC
One more sample:
-----------------------------------------------------
import javafx.scene.Node;
import javafx.scene.input.MouseEvent;


class A{
    var node: Node;
    public function to(node:Node) {
        var f:function(e:MouseEvent):Void = node.onMousePressed;
    };

}

-----------------------------------------------------
Comment 2 Anton Chechel 2009-11-24 08:59:12 UTC
fixed
http://hg.netbeans.org/javafx/rev/1df1eb5acbdb
Comment 3 Alexandr Scherbatiy 2009-12-09 07:08:59 UTC
verified in NetBeans-JavaFX-Soma  #60
Comment 4 Petr Suchomel 2010-01-15 03:26:33 UTC
Fixed in release68_fixes
http://hg.netbeans.org/javafx/rev/ea6642b25cc1
Comment 5 Alexandr Scherbatiy 2010-01-25 05:44:56 UTC
Verified in NB 6.8 patch1 netbeans-6.8-201001241915-javafx-full.zip from
/builds/netbeans/6.8/fixes