[ 6 posts ]

Wei Wang

YUI Contributor

  • Username: Shinwei
  • Joined: Wed Oct 27, 2010 1:45 pm
  • Posts: 91
  • GitHub: onlywei
  • Gists: onlywei
  • Offline
  • Profile
Tags:

YUIDoc @Override tag

Post Posted: Wed May 09, 2012 4:11 pm
+0-
Is there some special way I'm supposed to be using the @Override tag?

I have some custom classes that extend other classes, and sometimes I have methods inside the custom subclasses that override the ones in the original class.

Sometimes I just use:

Code:
/**
 * Description
 *
 * @Override
 * @method methodname
 */


And it works fine. It displays one method that has an override note.

Other times it just doesn't work at all and displays both methods separately.

Is there some trick I'm not getting?

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: YUIDoc @Override tag

Post Posted: Wed May 09, 2012 4:45 pm
+0-
In the current YUIDoc 0.3.x there is no such tag as `@override`. AFAIK there never was a tag for that.

Wei Wang

YUI Contributor

  • Username: Shinwei
  • Joined: Wed Oct 27, 2010 1:45 pm
  • Posts: 91
  • GitHub: onlywei
  • Gists: onlywei
  • Offline
  • Profile
Tags:

Re: YUIDoc @Override tag

Post Posted: Thu May 10, 2012 6:03 am
+0-
How is this effect achieved then?

Quote:
renderFields ()
Inherited from class1 but overwritten in thisfile.js:143
New overwritten description.


I see this happening in one of my subclasses but not others, when the method names are the same...

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile

Re: YUIDoc @Override tag

Post Posted: Thu May 10, 2012 6:07 am
+0-
If you use the `@extends` tag and point to the class that you extended YUIDoc fixes it all for you.

Example:
http://yuilibrary.com/yui/docs/api/classes/DD.Drag.html
http://yuilibrary.com/yui/docs/api/file ... js.html#l7

Note the "Extends: Base" part..

Wei Wang

YUI Contributor

  • Username: Shinwei
  • Joined: Wed Oct 27, 2010 1:45 pm
  • Posts: 91
  • GitHub: onlywei
  • Gists: onlywei
  • Offline
  • Profile
Tags:

Re: YUIDoc @Override tag

Post Posted: Thu May 10, 2012 6:53 am
+0-
I am using @extends and pointing to the correct class.

YUIDoc is even loading all of the superclass methods that are not being defined in my subclass.

I'm getting duplicate methods instead of overwritten methods in some cases but not all:

Quote:
renderFields ()
Defined in thisfile.js:17
Description that is supposed to override the old one

renderFields ()
Inherited from Superclass: superclassfile.js:1207
Superclass description

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile
Tags:

Re: YUIDoc @Override tag

Post Posted: Thu May 10, 2012 6:55 am
+0-
Please file a repro case here:

https://github.com/yui/yuidoc/issues

Also note that YUIDoc has a support forum here:
https://groups.google.com/forum/?hl=en& ... rum/yuidoc
  [ 6 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum