Bug 176906

Summary: Code formatting does not properly format function type
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: EditorAssignee: Anton Chechel <manowar>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: sustaining
Version: 6.x   
Target Milestone: 6.x   
Hardware: PC   
OS: Windows XP   
Whiteboard: 68patch1-verified
Issue Type: DEFECT Exception Report:
Bug Depends on:    
Bug Blocks: 173487    

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
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo