Git Product home page Git Product logo

Comments (11)

nene avatar nene commented on August 25, 2024

The Gnt.model.Task.SubTask is by definition in Gnt.model.Task namespace. There's no need for a @namespace tag. Actually in the code you gave there's even no need for @Class and @extends - JSDuck can detect these things automatically for you.

If you're wondering why the class tree looks like this:

Gnt
  model
    Task
    Task.SubTask

And not like this:

Gnt
  model
    Task
      SubTask

...then this is on purpose. That's how it was implemented in ext-doc and I wanted JSDuck to create exactly the same tree structure.

This might be a subject to change in the future, but I'm not going to bother changing it for now. Of course, you're welcome to submit a patch.

from jsduck.

canonic-epicure avatar canonic-epicure commented on August 25, 2024

@namespace tag in ext-doc was converting the tree structure to:

Gnt
    model
        Task
            SubTask

from jsduck.

nene avatar nene commented on August 25, 2024

That's interesting to know. I always wondered what's the use of the @namespace tag - apparently a purely presentational.

My take on this is that I either make this tree behave in one or the other way, but I'm not going to add another @tag for that.

from jsduck.

canonic-epicure avatar canonic-epicure commented on August 25, 2024

The idea of the @namespace of tag, is that it allows to have a namespaces, started with the upper-cased letter. Its not only presentational. If, by occasion, I will have several classes in such namespace, the docs for the higher level namespace will contain unnecessary information.

from jsduck.

canonic-epicure avatar canonic-epicure commented on August 25, 2024

Any chance you can consider to implement the @namespace tag? I'm working on the project where all namespaces starts with the upper-case letter - and they end up as the raw list in the documentation.

from jsduck.

nene avatar nene commented on August 25, 2024

I'm still reluctant to support @namespace tag, but I could enhance the algorithm that renders the class tree.

For example I could implement it so that when there is no class Foo.Bar, it would be considered a namespace and the tree would be rendered as:

Foo
    Bar
        Baz

But in case there is class Foo.Bar, the tree would look like:

Foo
    Bar
    Bar.Baz

Would that solve you problem?

from jsduck.

canonic-epicure avatar canonic-epicure commented on August 25, 2024

Nope, in the project I'm working on, there are all 3 - Foo, Foo.Bar and Foo.Bar.Baz classes. There also other classes in Foo namespace, most of them are namespaces in the same time (have inner classes like Foo.Quix.Blorg etc)..

And this is what I have as result: http://bryntum.com/temp/demo1.png

from jsduck.

nene avatar nene commented on August 25, 2024

Hmmm... OK.

Now I'm thinking of making all the namespaces expandable, ignoring whether they are a class or not. Ext JS 4 has only few classes like this, so the change would be barely noticable. Ext JS 3 has some more, but it's not really very important any more to have the tree look exactly the same.

This would also get rid of the special case of how the root "Ext" class is handled.

from jsduck.

canonic-epicure avatar canonic-epicure commented on August 25, 2024

Sounds promising!

from jsduck.

nene avatar nene commented on August 25, 2024

Implemented in aad238b

from jsduck.

canonic-epicure avatar canonic-epicure commented on August 25, 2024

Oh, great! Thanks a lot

from jsduck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.