Skip to content

Add support for merging user settings with plugin default - #472

Closed
GollapudiSrikanth wants to merge 1 commit into
spring-io:mainfrom
GollapudiSrikanth:srikanthgollapudi-allow-eclipse-project-specifics-settings-merged
Closed

GollapudiSrikanth wants to merge 1 commit into
spring-io:mainfrom
GollapudiSrikanth:srikanthgollapudi-allow-eclipse-project-specifics-settings-merged

Conversation

@GollapudiSrikanth

Copy link
Copy Markdown
Contributor

This PR adds 'mergedWith()' method to 'ProjectSettingsFile' that merges user-provided settings on top of the plugin's defaults. When a user file matches a default file by name, the properties are merged - with user values overriding defaults - rather than replacing the entire file

##Changes

  • Added mergedWith(ProjectSettingsFile overlay) method to ProjectSettingFile that loads both base and overlay as Properties, merges them, and returns a new ProjectSettingsFile with the combined content
  • Updated ProjectSettingsFilesLocator to merge user settings files with matching default files instead of replacing them
  • Added tests for the merge behaviour

Closes #444
image

Signed-off-by: Venkata Naga Sai Srikanth Gollapudi <42247688+GollapudiSrikanth@users.noreply.github.com>
@wilkinsona

Copy link
Copy Markdown
Contributor

Thanks for the PR, @GollapudiSrikanth. Unfortunately, I don't think we can adopt this approach as, if I'm reading things correctly, it will result in the files always being merged. That may be a breaking change for someone who's reliant on the current overriding behaviour. I'm going to close this one and we can consider options on #444.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Eclipse project-specific settings to be merged

2 participants