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 239146 - Go to declaration fails for parent controller
Summary: Go to declaration fails for parent controller
Status: RESOLVED WORKSFORME
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-05 09:37 UTC by Vladimir Riha
Modified: 2015-03-19 15:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (2.74 KB, application/zip)
2013-12-05 09:37 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-12-05 09:37:51 UTC
Created attachment 142854 [details]
sample project

Please try the attached sample project:
 - open index.html
 - Ctrl+Click on {{foo}} on line 26

=> in script.js should open with caret on line 25


This used to work in 7.4



Product Version: NetBeans IDE Dev (Build 201312050002)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Petr Pisl 2013-12-05 10:59:40 UTC
Problem in resolving types inside with. It' reproducible with this simple case:

fileA.ja:
var cls1 = {
    firstName: "test",
    foo: 2
};

var cls2 = {
    secondName: "baf"
};


fileB.js
prom = cls1;

with(prom) {
    console.log(firstName)
    prom = cls2;
    with(prom) {
        console.log(foo);
    }
}

If it's in the same file, then it works correctly.
Comment 2 Roman Svitanic 2015-03-19 15:54:11 UTC
(In reply to Vladimir Riha from comment #0)
> Please try the attached sample project:
>  - open index.html
>  - Ctrl+Click on {{foo}} on line 26
> 
> => in script.js should open with caret on line 25
> 

This works for me on:
Product Version: NetBeans IDE Dev (Build 1)
Java: 1.7.0_75; Java HotSpot(TM) 64-Bit Server VM 24.75-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_75-b13
System: Mac OS X version 10.10.2 running on x86_64; UTF-8; en_US (nb)
Comment 3 Roman Svitanic 2015-03-19 15:55:42 UTC
Sorry, I forgot about the issue with the build number. The build is from today March 19th. 2015.