Fix WorkspaceRoot encoding preference lookup and persistence - #2907
Open
deepika-u wants to merge 1 commit into
Open
Fix WorkspaceRoot encoding preference lookup and persistence#2907deepika-u wants to merge 1 commit into
deepika-u wants to merge 1 commit into
Conversation
Contributor
Author
|
@HeikoKlare - When you get some time, can you take a look at this please? |
There was a problem hiding this comment.
🟡 Changes recommended
Preference lookup and persistence error handling must preserve existing behavior and API contracts.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Modernizes WorkspaceRoot by replacing legacy preferences with IEclipsePreferences.
Changes:
- Uses scoped preferences for workspace encoding.
- Explicitly flushes updates and logs persistence failures.
File summaries
| File | Review |
|---|---|
resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceRoot.java |
Two moderate issues (2 votes each): default-scope encoding values are no longer resolved, and flush failures are logged instead of reported as CoreException per the API contract. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
deepika-u
force-pushed
the
use_ieclipsepreferences_instead
branch
2 times, most recently
from
September 9, 2026 11:02
56210df to
62e824c
Compare
deepika-u
force-pushed
the
use_ieclipsepreferences_instead
branch
from
September 9, 2026 11:04
62e824c to
3e60230
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two issues in how
WorkspaceRootreads and writes the workspace default encoding preference.getDefaultCharset() - now reads the encoding via
Platform.getPreferencesService()instead of the instance-scope nodedirectly, so it correctly falls back through the scope search order instead of only checking one scope.
setDefaultCharset() - removed the custom override. Since
WorkspaceRoot's path is alwaysIPath.ROOT, it now inheritsContainer#setDefaultCharset(String), which already delegates toCharsetManagerand reports save failures as aCoreExceptioninstead of silently logging them.Partially fixes
#497