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 202462 - Bad method invocation completion in anonymous inner class
Summary: Bad method invocation completion in anonymous inner class
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 00:42 UTC by swpalmer
Modified: 2011-09-23 13:21 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 2011-09-22 00:42:48 UTC
Product Version = NetBeans IDE Dev (Build 201109202329)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) Client VM 21.0-b17

Starting with:

PropertyChangeListener listener = new PropertyChangeListener() {
	@Override
	public void propertyChange(final PropertyChangeEvent evt) {
		if (Platform.isFxApplicationThread())
			swing2FxPropertyChange(evt);
		else {
			Platform.runLater(new Runnable() {
					@Override
				public void run() {
					swing2FxP(evt)
				}
			});
		}
	}
	private void swing2FxPropertyChange(PropertyChangeEvent evt) {
		// do something useful
	}
};

Cursor is after "swing2FxP" in the run() method... ctrl-apce to invoke code completion. Result is:

	swing2FxPropertyChangeevt)(;

.. see how parenthesis are reversed and the parameter "evt" comes before them.
Comment 1 Jiri Prox 2011-09-22 08:05:37 UTC
It is not related to inner classes 
Easiest steps to reproduce:

invoke CC at | and select charAt (note, that there must be omitted semicolon at the end of the line)

"".cha|(1)
Comment 2 Dusan Balek 2011-09-22 08:56:30 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/054bc586b422
Comment 3 Quality Engineering 2011-09-23 13:21:11 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/054bc586b422
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #202462: Bad method invocation completion in anonymous inner class - fixed.