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 245966

Summary: Try to understand shims
Product: javascript Reporter: Vladimir Riha <vriha>
Component: RequireJSAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description Vladimir Riha 2014-07-24 13:23:33 UTC
If I had declared some shims like


requirejs.config({
    shim: {
        backbone: {
            deps: ['jquery', 'underscore'],
            exports: 'Backbone'
        },
        underscore: {
            exports: '_'
        }
    }
});


and then load the modules:

define(function (require) {
    var backbone = require('backbone'),
    backbone.

});


it would be nice if for "backbone.", I'd get the code completion/go to navigation as for "Backbone" which is a global object declared in backbone.js. Naive idea is:
 - IDE parses the shim configuration
 - if e.g. 

underscore: {
            exports: '_'
        }

  is found, then once I require the "underscore" module, IDE would offer code completion for _ object (so the same as if I wrote "_.")

Thanks