Community
Participate
Working Groups
Build Identifier: 20100603-0907 Interface support is scheduled to become a standard feature of jsdoc toolkit from version 3, and has been implemented by some in the meantime using custom tags: http://code.google.com/p/jsdoc-toolkit/issues/detail?id=229 Support for Javscript 'interfaces' can be trivially added to Eclipse by doing the following: 1. Make @interface a synonym for @class 2. Make @implements a synonym for @extends Reproducible: Always
Created attachment 172722 [details] Interface test case
Hi Nitin, Any news on this? It seems like it should be a really quick win. Thanks, Dominic.
Perhaps somebody else is able to comment on this bug instead?
This would be a huge win for us, and is stopping our javascript content assistence working for the majority of our code.
There is more to it than simply treating the new tags like the old ones, isn't there? The issue in comment 0 implies we should actually treat the properties differently while populating interfaces.
Hi Nitin, What extra requirements are you referring to from comment 0? I've just read through the all the comments from the jsdoc-toolkit site and can't see any new requirements there. There was somebody who misunderstood how to create static methods in general, and conflated that issue with interface support, but that's all I can see that you might be referring to. I can certainly see that it would be possible to 'gold plate' this feature by treating interfaces specially, for example: * you might decide that new Interface() is an error * you might display an error if the user doesn't implement all the methods of an interface they claim to have implmented, However, in reality, I think both of these restrictions would actually be anti-features for most Javascript code bases. We for example throw an UnimplementInterfaceMethod exception in interface methods that clients have to implement, but don't bother for optional methods that don't have to be implemented, and so this restriction would force clients to create lot's of empty stub methods just to keep Eclipse happy. IMO, just treating these new tags as synonyms for classes will almost always be the right thing to do since they are just classes anyway. Again, if there's a requirement I'm missing here then I'd love to here about it so I can better understand the problem. Thanks, Dominic.