0

I have several modules organized in my app's namespace. I'm new to Netbeans, and having trouble getting it to properly recognize where they fit.

/**
 * Provides general utilities.
 * @param {object} util - window.myNamespace.util
 */
(function (util) {

  /** @private */
  var uniqueCounter = 0;

  /** Returns unique incrementing integer. */
  util.uniqueID = function() {
    uniqueCounter++;
    return uniqueCounter;
  };
}(window.myNamespace.util = window.myNamespace.util || {}));

Netbeans Navigator

I've tried several permutations of JSDoc @name, @namespace, @alias, @memberOf, etc on the IIFE and on the individual members, but nothing seems to move it correctly to window.vltTDT.util from Global util.

Product Version: NetBeans IDE 8.1 (Build 201510222201)

John
  • 115
  • 8
  • Possible duplicate of [Is there a "concise" way to do namespacing in JavaScript?](http://stackoverflow.com/questions/13021/is-there-a-concise-way-to-do-namespacing-in-javascript) – Paul Sweatte Dec 14 '16 at 17:30
  • Thank you. This question was not so much how to namespace, but rather if there was some way to hint to the IDE (specifically Netbeans) how the namespace is structured, for better code completion, navigation, etc. – John Dec 15 '16 at 20:01
  • Thanks for the clarification. You can try moving the @param annotation inside the parentheses `(/** @param {object} util */ function(util) {` as in an answer to a [similar question](http://stackoverflow.com/a/10948716/1113772). – Paul Sweatte Dec 15 '16 at 20:12

0 Answers0