Skip to content
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

Revamp/949 move projectresourceset related classes to sbm support rewrite #950

Conversation

fabapp2
Copy link
Contributor

@fabapp2 fabapp2 commented Sep 29, 2023

Move ProjectResourceSet and related classes to sbm-support-rewrite and provide a new method ProjectResourceSet #apply(Recipe...).
The apply() method applies a recipe and merges the changes with the in-memory representation of OR AST.
This allows sequentially applying recipes while changes get reflected into the AST after each recipe.
ProjectResourceSetSerializer#writeChanges(ProjectResourceSet) synchronizes the changes with the FS (add, update, remove).

ProjectResourceSet projectResourceSet = projectResourceSetFactory.create(baseDir, sourceFiles);

Recipe r = ...
projectResourceSet.apply(r);

Recipe anotherRecipe = ...
projectResourceSet.apply(anotherRecipe);

serializer.writeChanges(projectResourceSet);

@fabapp2 fabapp2 linked an issue Sep 29, 2023 that may be closed by this pull request
@fabapp2 fabapp2 added type: enhancement New feature or request type: refactoring in: sbm-support-rewrite Issue is related to the sbm-support-rewrite compionent revamp labels Sep 29, 2023
@fabapp2 fabapp2 self-assigned this Sep 29, 2023
@fabapp2 fabapp2 changed the base branch from main to version/revamp September 29, 2023 07:08
@fabapp2 fabapp2 merged commit 2b7ffa7 into version/revamp Sep 29, 2023
@fabapp2 fabapp2 deleted the revamp/949-move-projectresourceset-related-classes-to-sbm-support-rewrite branch September 29, 2023 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: sbm-support-rewrite Issue is related to the sbm-support-rewrite compionent revamp type: enhancement New feature or request type: refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move ProjectResourceSet related classes to sbm-support-rewrite
1 participant