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 227972 - JavaScript Ctrl+Click method navigator
Summary: JavaScript Ctrl+Click method navigator
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.3
Hardware: PC Windows 7 x64
: P3 normal with 2 votes (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-27 00:13 UTC by benno_007
Modified: 2015-08-05 01:20 UTC (History)
1 user (show)

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 benno_007 2013-03-27 00:13:23 UTC
Possibly related: #223899

Since upgrading from Netbeans 7.2 to 7.3, I have lost the ability to ctrl+click between the public methods of my namespaced javascript objects to navigate to the method call by ctrl+clicking on the function, in some cases.

Below are some test cases which show what works and what doesn't. The first two work as expected, its just the last one when a javascript object is namespaced that it stops working.

var newtest = function() {
	this.method = function() {
		alert('dosomething');
	};
	
	this.otherfunction = function() {
		// Ctrl+Click on method() will take you to this.method above.
		this.method();
	}
}

var a = new newtest();
// Ctrl click on a.method() navigates to newtest.method
a.method();

//======================================


function test() {
	this.method = function() {
		alert('dosomething');
	}
	
	this.otherfunction = function() {
		// Ctrl+Click on method() will take you to this.method above.
		this.method();
	}
}

var b = new test();
// Ctrl+Click on method will take you to test.method
b.method();

//======================================

var NS = {};
NS.test = function() {

	this.method = function() {
		alert('dosomething');
	}
	
	this.otherfunction = function() {
	// ctrl+click on this will NOT navigate to method
		this.method();
	}
};

var c = new NS.test();
// ctrl + click on this will NOT navigate to NS.test.method;
c.method();
// Ctrl click on this will navigate to NS.test.method though.
NS.test.method();


I REALLY need this for my 7000 line javascript order form object... Are you able to fix it in 7.3? Otherwise I'll have to downgrade to 7.2 :( which sucks because 7.3 fixed all my key maps which half were broken in 7.2!
Comment 1 Vladimir Riha 2013-03-27 09:24:03 UTC
In 73patched and Dev, from the 3rd example, this still doesn't work

var c = new NS.test();
// ctrl + click on this will NOT navigate to NS.test.method;
c.method();

The "this.method()" does work.




Product Version: NetBeans IDE Dev (Build web-main-10169-on-20130326)
Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b32
System: Linux version 3.2.0-39-generic-pae running on i386; UTF-8; en_US (nb)
Comment 2 Vladimir Riha 2013-06-27 10:32:48 UTC
The last problem is OK now


Product Version: NetBeans IDE Dev (Build web-main-10912-on-20130626)
Comment 3 peterkehl 2014-01-16 08:34:44 UTC
I'm getting a similar problem when Ctrl+click at this.nameOfMethod(anyParameterValues). It doesn't take me to the method's definition:

"use strict";
function MyClass() {}
MyClass.prototype.f= function() {};

MyClass.prototype.g= function() {
    this.f(); // If I Ctrl+click at f() called on this line, it won't take me to definition of f()
};

This problem exists in NetBeans 7.4, 8.0beta, 201401150002.

In case this can't be fixed together with bug #227972, please create a new bug or advise me and I'll create one.
Comment 4 Petr Pisl 2015-08-04 15:03:10 UTC
All described case now works in NB 8.1. Marking as fixed.
Comment 5 Quality Engineering 2015-08-05 01:20:23 UTC
Integrated into 'main-silver', will be available in build *201508050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c2cecdd861f2
User: Petr Pisl <ppisl@netbeans.org>
Log: #227972 - JavaScript Ctrl+Click method navigator