netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Javascript: property of the class does not highlighted inside other function

Open qmegas opened this issue 3 years ago • 1 comments

Apache NetBeans version

Apache NetBeans 14

What happened

Here simple code that explains the problem:

class Foo {
	bar = {}; //Line 2
	
	test(someArray) {
		this.bar = {};  //Line 5
		someArray.forEach((val) => {
			this.bar[val] = 1;  //Line 7
		});
	}
}

When put cursor on class property in line 2 or 5, then it highlighted both on line 2 and 5, but not in line 7. Same vise versa, when put cursor on the property in line 7 it does not highlighted in line 2 or 5.

How to reproduce

See bug description for code to reproduce

Did this work correctly in an earlier version?

No

Operating System

Windows 10

JDK

16.0.1

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

qmegas avatar Jul 14 '22 12:07 qmegas

Thx for the info, reproducable.

Chris2011 avatar Aug 09 '22 20:08 Chris2011

@qmegas please check PR #5995, which should fix this issue. A test build is available from the PR summary page:

https://github.com/apache/netbeans/actions/runs/5100679715

or directly via:

https://github.com/apache/netbeans/suites/13194152319/artifacts/718900999

matthiasblaesing avatar May 28 '23 15:05 matthiasblaesing

@matthiasblaesing Confirm the fix

qmegas avatar May 28 '23 16:05 qmegas