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 241669 - Autocomplete is not aware of JavaFX patterns when offering to generate methods
Summary: Autocomplete is not aware of JavaFX patterns when offering to generate methods
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-11 03:02 UTC by swpalmer
Modified: 2016-07-07 07:30 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 swpalmer 2014-02-11 03:02:21 UTC
Product Version = NetBeans IDE Dev (Build 201402100001)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b69

Consider:

public class Model {
	private final StringProperty description = new SimpleStringProperty();

	public Model() {}

	public String getDescription() { return description.get(); }
	public void setDescription(String desc) { description.set(desc); }
	public StringProperty descriptionProperty() { return description; }
	
}

Invoking autocomplete via CTRL-SPACE on an empty line in the Model class will pop up a list of suggestions including:

	public StringProperty getDescription() - generate

but the getter for the description property is already present and it is correctly returning String not StringProperty.  Worse is that accepting this suggestion and generating that method results in an error, since there are now two no-arg getDescription methods.   Autocomplete should be made aware of the JavaFX observable property pattern and autocomplete shouldn't insert code that conflicts with existing code.
Comment 1 Martin Balin 2016-07-07 07:30:34 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss