oop - MATLAB doesn't show help for user-created class private methods and properties -
this problem:
- create class , set access private of properties or methods.
use
doc
command created class. auto-generate documentation comments , show in built-in browser.doc classname
the problem documentation private properties , methods not shown in browser. there way overcome problem?
so spent 10 minutes using debugger, jumping 1 function next, tracing execution path of simple doc myclass
call.
eventually lead me following file:
fullfile(toolboxdir('matlab'),'helptools','+helputils','isaccessible.m')
this function called during process of generating documentation class determine if class elements (including methods, properties, , events) publicly accessible , non-hidden. information used later on "cull" elements.
so if willing modify matlab's internal functions, , want docs show methods , properties regardless of scope, rewrite function say:
function b = isaccessible(classelement, elementkeyword) b = true; return % ... more code we'll never reach! end
of course, don't forget make backup of file in case changed mind later :)
(on recent windows, you'll need perform step administrative privileges)
as test, take sample class defined in this page , run doc someclass
. result:
Comments
Post a Comment