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 222177 - Navigator displays generated names in types
Summary: Navigator displays generated names in types
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 226535 (view as bug list)
Depends on:
Blocks: 222129
  Show dependency tree
 
Reported: 2012-11-15 09:22 UTC by Petr Pisl
Modified: 2013-03-15 01:46 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 Petr Pisl 2012-11-15 09:22:02 UTC
Have a simple code:

define(function(require) {
    var Page = require('layergloss/models/Page');
    var test = new Page();
});

In the navigator you can see the type of variable test _L1.Page. The is misleading for user and shouldn't be displayed.
Comment 1 Petr Pisl 2012-11-15 09:48:01 UTC
The _L1 comes from the parser. It's an internal name for the anonymous function, where the Page is declared. In the model the Page is referenced through full qualified name _L1.Page . 

The simple fix for this is that we can cut all namespace names that are composed as _Lxxx where xxx is a number in the navigator. In such case we have to expect that nobody will name a function _Lxxx :). 

The better solution would be to extend the type with an descriptor, that will contain information about the parts, but it will be much harder.
Comment 2 Quality Engineering 2012-12-14 02:41:28 UTC
Integrated into 'main-golden', will be available in build *201212140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/aff215862206
User: Petr Pisl <ppisl@netbeans.org>
Log: #222177 - Navigator displays generated names in types
Comment 3 Vladimir Riha 2013-01-04 08:47:42 UTC
Another still reproducible case is:


function Humla() {
    this.utils.loadScripts(function() {
        readConfig(function e(mainConfig, suplConfig) {
            humla.controler.keys = true ? 1 : mainConfig.data.keys;
        });
    });
}

and check type of "keys" in Navigator

Product Version: NetBeans IDE Dev (Build web-main-9627-on-20130103)
Comment 4 Vladimir Riha 2013-03-04 14:46:06 UTC
*** Bug 226535 has been marked as a duplicate of this bug. ***
Comment 5 Petr Pisl 2013-03-14 01:30:22 UTC
I have start to work on this issue to eliminate all occurrences of "strange" types from the navigator and cc items. It needs more work. Unfortunately there is not as much time as I need to put fix to the first patch
Comment 6 Petr Pisl 2013-03-14 14:57:57 UTC
Should be fixed in web-main:
http://hg.netbeans.org/web-main/rev/73a3ae09b5fd

The fix cover only the navigator. There has to be done a refactoring to share code between navigator and code completion items to share same display methods.
Comment 7 Quality Engineering 2013-03-15 01:46:24 UTC
Integrated into 'main-golden', will be available in build *201303142300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/73a3ae09b5fd
User: Petr Pisl <ppisl@netbeans.org>
Log: #222177 - Navigator displays generated names in types