Public API getTrace() and getProviders() in the data provider class#417
Public API getTrace() and getProviders() in the data provider class#417tuanvtdeptre199 wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR makes two data provider accessor methods public: ChangesData Provider Accessor Exposure
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/model/tree/TmfTreeCompositeDataProvider.java`:
- Around line 191-193: The public getProviders() currently returns the mutable
backing field fProviders allowing external mutation and bypassing
removeProvider(...) lifecycle/disposal semantics; change getProviders() to
return a defensive/unmodifiable view or copy (e.g., an unmodifiableList or a new
ArrayList copy of fProviders) so callers cannot modify the internal list
directly and must use add/removeProvider(...) to manage provider lifecycle.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4d223a78-2c7d-42e3-a101-6e8a630d25ea
📒 Files selected for processing (2)
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/model/AbstractTmfTraceDataProvider.javatmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/model/tree/TmfTreeCompositeDataProvider.java
What it does
Recently, I have wanted to improve my 3rd trace views to work with multiple trace packages from the different trace tools. So I want to public the API getProviders() from class TmfTreeCompositeDataProvider.java and getTrace() from class AbstractTmfTraceDataProvider.java
How to test
It does not change any logic code, just public some API, so all views in Trace Compass are expected to work normally.
Follow-ups
Review checklist
Summary by CodeRabbit