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 211826

Summary: Insert Code... ->Add Property... should support JavaFX2 properties
Product: javafx Reporter: Petr Somol <psomol>
Component: EditorAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED FIXED    
Severity: normal CC: psomol
Priority: P3    
Version: 7.2   
Hardware: All   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 199283    

Description Petr Somol 2012-04-27 07:54:56 UTC
Current Insert code...->Add Property... is SE centric. JavaFX2 introduces new property types and conventions, that are commonly used in FX development.

See Example1 at http://docs.oracle.com/javafx/2/binding/jfxpub-binding.htm

NetBeans should support adding FX properties like SimpleDoubleProperty etc and the respective setters/getters. Note that in FX it is standard to have three of them instead of two (the third one being a getter not of value but of the property itself):

    // Define a variable to store the property
    private DoubleProperty amountDue = new SimpleDoubleProperty();
 
    // Define a getter for the property's value
    public final double getAmountDue(){return amountDue.get();}
 
    // Define a setter for the property's value
    public final void setAmountDue(double value){amountDue.set(value);}
 
     // Define a getter for the property itself
    public DoubleProperty amountDueProperty() {return amountDue;}
Comment 1 Ralph Ruijs 2012-06-18 15:48:07 UTC
Changeset: 73517b3d6ab2
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2012-06-18 17:46
Message:   Issue #211826 - Insert Code... ->Add Property... should support JavaFX2 properties
Comment 2 Quality Engineering 2012-06-22 04:48:49 UTC
Integrated into 'main-golden', will be available in build *201206220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/73517b3d6ab2
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #211826 - Insert Code... ->Add Property... should support JavaFX2 properties