wenchun / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

auto-adding scope #132

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As requested:

So, I was curious how I could help automatically specify where a scope
begins.

Basically, I have alot of widgets written from the dojo toolkit.

Now in dojo, you define a 'widget'  which is similar to a class, as
follows:

dojo.define("theWidgetName", null,
{
  myfunctionname : function() { },
  myfunctiontwo : function() { }

});

now, I have to do this for every widget:

dojo.define("theWidgetName", null,
{
  /** @scope theWidgetName */
  myfunctionname : function() { },
  myfunctiontwo : function() { }

});

to specify to jsdocs where to look for the functions, or else it wont
work. Now, the issue is there are lots of files, and we don't want to
have to add the same scope line to every file, so we want to make it
automatic.

I'm familiar with javascript, and was curious if you had any
suggestions on where to look to add a bit of code to automatically
assume that if it sees the dojo.define line, to 'place' a scope right
after.

Thanks ahead of time.

Original issue reported on code.google.com by mou...@gmail.com on 23 Apr 2008 at 1:55

GoogleCodeExporter commented 8 years ago
This was committed in revision 583.

The new plugin is app/plugins/functionCall.js

You can use the following syntax, but do note you still need to document the
namespace somewhere.

/**
    @namespace
    @name theWidgetName
 */
dojo.define("theWidgetName", null,
{
  myfunctionOne : function() { },
  myfunctionTwo : function() { }
});

Original comment by micmath on 23 Apr 2008 at 10:09

GoogleCodeExporter commented 8 years ago
There was no feedback on this issue in the last month so I am closing it.

Original comment by micmath on 27 May 2008 at 6:31