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 151107 - Code completion incorrectly adds square brackets in some cases
Summary: Code completion incorrectly adds square brackets in some cases
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Strupl
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2008-10-23 10:04 UTC by Alexandr Scherbatiy
Modified: 2008-10-24 10:59 UTC (History)
0 users

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 2008-10-23 10:04:23 UTC
JavaFX_NB_Plugin_NB65_promoted: #48 2008-10-23_03-01-09.zip

  Product Version         = NetBeans IDE 6.5 RC1 (Build 200810171318)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.5.0_09; Java HotSpot(TM) Client VM 1.5.0_09-b03; Sun Microsystems Inc.

Steps to reproduce:

- Copy the code to the editor:
----------------------------------------------------
import javafx.scene.shape.Polygon;

Polygon{
   str
}
----------------------------------------------------
- Position cursor after 'str' and press <Ctrl+Space>
- Select stroke from the list

The result is 
----------------------------------------------------
import javafx.scene.shape.Polygon;

Polygon{
   stroke: []
}
----------------------------------------------------

JavaFXApplication3\src\javafxapplication3\Main.fx:12: array required, but javafx.scene.paint.Paint found
   stroke: []
1 error
BUILD FAILED (total time: 2 seconds)
Comment 1 Alexandr Scherbatiy 2008-10-23 10:07:53 UTC
One more example:

------------------------------------------
class A{
    public var nums: Number[];
    public var num: Number;
}

var a = A{
    
}
------------------------------------------

- Go to 'A{}', type 'nu', press <Ctrl+Space> 
  and select 'num
------------------------------------------
var a = A{
    num: []
}' 
------------------------------------------

JavaFXApplication3\src\javafxapplication3\Main.fx:15: array required, but double found
    num: []
1 error
Comment 2 David Strupl 2008-10-23 13:03:14 UTC
Regression caused by the fix for
http://www.netbeans.org/issues/show_bug.cgi?id=122854
changeset
http://hg.netbeans.org/javafx/rev/d44678b04911
Comment 3 David Strupl 2008-10-23 15:43:32 UTC
Fixed by changeset 1612:25dd1db6c9a1
Comment 4 Alexandr Scherbatiy 2008-10-24 10:59:09 UTC
verified in the promoted build 2008-10-24_03-01-09.zip