| Age | Commit message (Collapse) | Author |
|
- Document core classes: VSTask, VSMessage, VSInternalProcess
- Document event interfaces: VSAbstractEvent, VSCopyableEvent, VSTime
- Document timestamp events: VSTimestampTriggeredEvent, VSLamportTimestampEvent
- Document protocol framework: VSAbstractProtocol methods
- Document VSSimulator and VSRegisteredEvents
- Add detailed method descriptions with parameter and return value docs
- Include usage examples and cross-references between related classes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
- Create base exception classes:
- VSSimulatorException: Base checked exception for all simulator errors
- VSSimulatorRuntimeException: Base unchecked exception for unrecoverable errors
- Refactor existing exceptions to extend from base class:
- VSEventNotCopyableException: Now includes better error messages
- VSParseIntegerVectorException: Added constructors with cause support
- VSNegativeNumberException: Added field name and value parameters
- Add new specific exception types:
- VSConfigurationException: For configuration errors
- VSSerializationException: For save/load operations
- VSProcessException: For process-related errors
- VSProtocolException: For protocol execution errors
- Create VSErrorHandler utility class:
- Centralized error logging and user notification
- Consistent error handling patterns
- Helper methods for warning and error dialogs
- Update exception handling in code:
- VSClassLoader: Better error messages and specific exception handling
- Timestamp events: Catch RuntimeException for custom actions
- All 132 unit tests pass
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Major improvements:
1. Replace instanceof checks with polymorphic methods in VSAbstractEvent hierarchy
- Added isInternalEvent(), isMessageReceiveEvent(), etc. methods
- Added getEventPriority() for clean event ordering
- Added shouldIncreaseTimestamps() to control timestamp behavior
- Refactored VSTask to use these polymorphic methods
2. Extract magic numbers and strings to constants
- Created VSConstants class for centralized configuration values
- Added event priority constants (PRIORITY_HIGHEST, PRIORITY_HIGH, etc.)
- Extracted string constants like CLASS_PREFIX
- Moved magic numbers to named constants (PERCENTAGE_RANGE, etc.)
3. Update tests to work with new polymorphic approach
- Fixed mocking in VSTaskTest to return correct values
- All 132 tests passing
These changes improve maintainability, reduce coupling, and make the codebase
more self-documenting. The polymorphic approach eliminates type checking and
makes it easier to add new event types.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
|