WebStorm could support Module Pattern code a little better - or I'm missing something?

I use the module pattern in my JS code to allow for extending/replacing methods in later modules - so something like this

var MYMODULE = (function(my) {
     my.examplemethod = function () {
          //. stuff here
     return my;

so we can later

     MYMODULE = (function(my) {
          var _examplemethod = my.examplemethod;
          my.examplemethod = function() {
               // I can add stuff here...

Problem is that Webstorm interprets 'my' as being in the global scope - which it technically is - but it's also a BIG chunk of the code in MYMODULE (all the public methods and properties) - it's an "exported" global and it would be nice if WebStorm could recognise that and include it in the Structure view...

or is there a setting I've missed somewhere/some way to do this already?

Please sign in to leave a comment.