Repeated classes names on a large scale project and how we handle it on the generated HTML

55 views
Skip to first unread message

Bnaya Peretz

unread,
Jun 14, 2013, 11:48:33 PM6/14/13
to jsdoc...@googlegroups.com
We are developing pretty big project based on requirejs and backbone.
Each class is in its own file and the directory structure is corresponding the namespaces we are defining on jsdoc.
And we are losing the classes using requirejs, which serves practically as our namespace & auto load engine, Which its great.

Our directory structure is similar to that:
Photomania/App/Components/Header/Main.js
Photomania/App/Components/Header/View.js

Photomania/App/Components/User/Main.js
Photomania/App/Components/User/View.js

And the namespaces:
namespace Photomania

namespace App
memberOf Photomania

namespace Components
memberOf Photomania.App

namespace Header
memberOf Photomania.App.Components

class Main
memberOf Photomania.App.Components.Header

And so on...

So we are having more the one class with the same name.
On the current template generated html, the nav links text contains only the name of the entity. linkto(c.longname, c.name)
So its look very unorganized having multiple main and view entries (especially on classes and the namespaces list)

For now i've edited the template code and changed linkto(c.longname, c.name) to linkto(c.longname, c.longname
for some of the entities types and its looks much better.

I thought to add a configuration entry for that but i don't know when to start and how it will be the best way to implement it.
I can override linkto, and make the 'if' inside it, make a lot of if's on each call to linkto or change c.name to be equles to c.longname.
i think the first option will be the best.

It will be also nice to have a collapsible navigation for that.

Jeff Williams

unread,
Jun 15, 2013, 11:04:18 PM6/15/13
to Bnaya Peretz, jsdoc...@googlegroups.com
In the short term, editing the template is the easiest way to do this.

In the longer term, the default template will probably gain an optional tree view; see issue #43. I don't think this is being actively worked on right now, though.

Also, while I haven't been keeping close tabs on other JSDoc templates, I wouldn't be surprised if some of them include better navigation than what the default template currently offers.

- Jeff

--
You received this message because you are subscribed to the Google Groups "JSDoc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsdoc-users...@googlegroups.com.
To post to this group, send email to jsdoc...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsdoc-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages