8000 Added Helper Methods to `PersonnelTableMouseAdapter` for Cleaner `Campaign` Access by IllianiBird · Pull Request #6472 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added Helper Methods to PersonnelTableMouseAdapter for Cleaner Campaign Access #6472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 28, 2025

Conversation

IllianiBird
Copy link
Collaborator
  • Introduced helper methods getCampaign() and getCampaignOptions() to streamline campaign data access.
  • Replaced multiple instances of gui.getCampaign() and gui.getCampaign().getCampaignOptions() with new helper methods for improved readability and maintainability.
  • Updated references throughout the various command cases to use the new helper methods consistently.

Dev Notes

This PR replaces 164 instances of gui.getCampaign() with the getCampaign() helper.
And 45 instances of gui.getCampaign().getCampaignOptions() with the getCampaignOptions() helper.

…mpaign` Access

- Introduced helper methods `getCampaign()` and `getCampaignOptions()` to streamline campaign data access.
- Replaced multiple instances of `gui.getCampaign()` and `gui.getCampaign().getCampaignOptions()` with new helper methods for improved readability and maintainability.
- Updated references throughout the various command cases to use the new helper methods consistently.
@IllianiBird IllianiBird added Refactoring Utility A new utility function or developer tool labels Mar 28, 2025
@IllianiBird IllianiBird self-assigned this Mar 28, 2025
Copy link
codecov bot commented Mar 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 11.27%. Comparing base (1e21588) to head (dc370c4).
Report is 32 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6472      +/-   ##
============================================
- Coverage     11.28%   11.27%   -0.01%     
  Complexity     6284     6284              
============================================
  Files          1072     1072              
  Lines        136404   136571     +167     
  Branches      21094    21107      +13     
============================================
+ Hits          15391    15403      +12     
- Misses       119477   119630     +153     
- Partials       1536     1538       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# Conflicts:
#	MekHQ/src/mekhq/gui/adapter/PersonnelTableMouseAdapter.java
…the main application frame within `PersonnelTableMouseAdapter`.

- Replaced all direct calls to `gui.getFrame()` with the new `getFrame` method for consistency and maintainability.
@IllianiBird
Copy link
Collaborator Author
  • Added a new getFrame method to simplify and centralize access to the main application frame within PersonnelTableMouseAdapter.
  • Replaced all direct calls to gui.getFrame() with the new getFrame method for consistency and maintainability.

@IllianiBird IllianiBird merged commit 1264955 into MegaMek:master Mar 28, 2025
6 checks passed
@IllianiBird IllianiBird deleted the campaignHelper branch March 31, 2025 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Utility A new utility function or developer tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0