diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundary.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundary.C index 3d1c995018..a6867ebc22 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundary.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundary.C @@ -179,6 +179,13 @@ void Foam::helpTypes::helpBoundary::execute << "-field option must be specified when using the -fixedValue " << "option" << exit(FatalError); } + else + { + // TODO: strip scoping info if present? + // e.g. conditions with leading "compressible::" will not be found + // ".*[fF]vPatchField.*" + className + ".*" + displayDocOptions(".*[fF]vPatchField.*", false); + } } diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpFunctionObject/helpFunctionObject.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpFunctionObject/helpFunctionObject.C index 626a1a2e7b..0d6c1b1c1e 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpFunctionObject/helpFunctionObject.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpFunctionObject/helpFunctionObject.C @@ -78,6 +78,10 @@ void Foam::helpTypes::helpFunctionObject::execute { displayDoc(function, ".*[fF]unctionObject.*", true); } + else + { + displayDocOptions(".*[fF]unctionObject.*", true); + } } diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C index bff7d2d99c..1443089aa7 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C @@ -37,6 +37,53 @@ namespace Foam // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // +void Foam::helpType::displayDocOptions +( + const string& searchStr, + const bool exactMatch +) const +{ + const dictionary& docDict = debug::controlDict().subDict("Documentation"); + List docDirs(docDict.lookup("doxyDocDirs")); + + label i = -1; + forAll(docDirs, dirI) + { + if (isDir(docDirs[dirI].expand())) + { + i = dirI; + break; + } + } + + if (i != -1) + { + Info<< "Found doxygen help in " << docDirs[i].c_str() << nl << endl; + + string docBrowser = getEnv("FOAM_DOC_BROWSER"); + if (docBrowser.empty()) + { + docDict.lookup("docBrowser") >> docBrowser; + } + + doxygenXmlParser parser + ( + docDirs[i]/"../DTAGS", + "tagfile", + searchStr, + exactMatch + ); + + Info<< "Valid types include:" << nl << SortableList(parser.toc()); + } + else + { + Info<< "No Doxygen sources found under search paths: " + << docDirs << endl; + } +} + + void Foam::helpType::displayDoc ( const word& className, diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.H b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.H index 8c4e03c6e8..d1ccf14c62 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.H +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.H @@ -58,6 +58,13 @@ class helpType protected: + //- Display the list of documentation options + void displayDocOptions + ( + const string& searchStr, + const bool exactMatch + ) const; + //- Display the help documentation in a browser void displayDoc (