This project now includes comprehensive Javadoc documentation generated with Doxygen. The documentation provides detailed information about all classes, methods, and API endpoints.
Open docs/html/index.html in your web browser to view the complete documentation.
- Main Class: GhidraMCPPlugin
- Package Overview: com.lauriewired Package
- All Classes: Class List
- File Browser: Source Files
Each class includes:
- Detailed Description: Purpose and functionality overview
- Usage Examples: Code snippets showing proper usage
- Thread Safety Notes: Information about concurrent access
- See Also References: Links to related classes and methods
Each method provides:
- Parameter Details: Type and purpose of each parameter
- Return Values: What the method returns and possible values
- Exception Information: When and why exceptions might be thrown
- Code Examples: Practical usage demonstrations
- Cross-References: Related methods and classes
HTTP endpoints include:
- Request Format: HTTP method, URL pattern, parameters
- Response Format: Expected output structure
- Error Conditions: Common failure scenarios
- Example Requests: Working examples with curl/HTTP
- Doxygen 1.12+ installed and in PATH
- Graphviz (dot) for generating diagrams (optional)
# From project root directory
doxygen DoxyfileThe Doxyfile contains all configuration options:
- INPUT: Source directories to scan
- OUTPUT_DIRECTORY: Where to place generated docs
- EXTRACT_ALL: Include private/protected members
- GENERATE_HTML: Create HTML output
- CLASS_GRAPH: Generate class hierarchy diagrams
/**
* Brief description of the method or class.
*
* Detailed description explaining the purpose, behavior,
* and any important implementation details.
*
* <h3>Usage Example:</h3>
* <pre>{@code
* // Example code showing proper usage
* String result = methodName("parameter");
* }</pre>
*
* @param paramName Description of parameter purpose and constraints
* @return Description of return value and possible states
* @throws ExceptionType When this exception occurs
* @see RelatedClass#relatedMethod()
* @since Version when this was added
*/- Start with Brief Summary: One-line description of purpose
- Provide Context: Explain when and why to use this
- Include Examples: Show realistic usage scenarios
- Document Thread Safety: Note any concurrency concerns
- Cross-Reference: Link to related functionality
- Explain Parameters: Describe constraints and expected values
- Cover Error Cases: Document when things can go wrong
GhidraMCPPlugin()- Constructor and server initializationstartServer()- HTTP server setup and endpoint registrationgetCurrentProgram()- Access to active Ghidra programdispose()- Clean shutdown and resource cleanup
decompileFunctionByName(String)- Generate C pseudocodedecompileFunctionByAddress(String)- Decompile by memory addressdisassembleFunction(String)- Get assembly listingrenameFunction(String, String)- Change function names
renameVariableInFunction(...)- Rename local variablessetFunctionPrototype(...)- Define function signaturessetLocalVariableType(...)- Set variable data types
getXrefsTo(String, int, int)- Find references to addressgetXrefsFrom(String, int, int)- Find references from addresslistDefinedStrings(...)- Extract string constants
parseQueryParams(HttpExchange)- Parse URL parameterspaginateList(List, int, int)- Apply pagination to resultssendResponse(HttpExchange, String)- Send HTTP responses
When adding new methods or endpoints:
- Follow the established Javadoc patterns
- Include practical usage examples
- Document thread safety considerations
- Add cross-references to related functionality
- Regenerate documentation:
doxygen Doxyfile
- Add missing parameter descriptions
- Include more detailed examples
- Fix broken cross-references
- Update version information
- Clarify complex algorithms
- All public methods documented
- Parameters and return values described
- Usage examples provided
- Thread safety noted where applicable
- Cross-references to related methods
- Error conditions documented
- Code examples compile and work
- Documentation appears in Quick Documentation (Ctrl+Q)
- Parameter hints use Javadoc descriptions
- Code completion shows method summaries
- Hover tooltips display Javadoc content
- Content assist includes parameter descriptions
- Help view shows detailed documentation
- Hover information includes method documentation
- IntelliSense enhanced with Javadoc details
- Go to Definition includes doc comments
- Regenerate docs after significant changes
- Update version numbers in package-info.java
- Review and improve unclear descriptions
- Add examples for new API patterns
- Run
doxygen Doxyfileand check for warnings - Verify all links work correctly
- Test examples in documentation
- Ensure diagrams generate properly
This documentation framework ensures that GhidraMCP maintains professional-grade documentation suitable for both end users and contributors in the digital forensics community.