Skip to content

Commit

Permalink
devonfw#759: review rework (JavaDoc)
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed Jan 13, 2025
1 parent b7b0d10 commit 3db4692
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public abstract class FileMerger extends AbstractWorkspaceMerger {
public FileMerger(IdeContext context) {

super(context);
this.legacySupport = IdeVariables.IDE_VARIABLE_SYNTAX_LEGACY_SUPPORT_ENABLED.get(context).booleanValue();
this.legacySupport = Boolean.TRUE.equals(IdeVariables.IDE_VARIABLE_SYNTAX_LEGACY_SUPPORT_ENABLED.get(context));
}

/**
Expand Down Expand Up @@ -106,6 +106,10 @@ protected boolean doUpgradeTextContent(Path workspaceFile) throws IOException {
return modified;
}

/**
* @param content the content from a workspace template file that may contain legacy stuff like old variable syntax.
* @return the given {@link String} with potential legacy constructs being resolved.
*/
protected String upgradeWorkspaceContent(String content) {

VariableSyntax syntax = VariableSyntax.CURLY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,10 @@ private Status(boolean inverse, boolean addNewProperties) {

}

public static class JsonPrettyPrinter extends DefaultPrettyPrinter {
/**
* Extends {@link DefaultPrettyPrinter} to get nicely formatted JSON output.
*/
private static class JsonPrettyPrinter extends DefaultPrettyPrinter {

public JsonPrettyPrinter() {
DefaultPrettyPrinter.Indenter indenter = new DefaultIndenter(" ", "\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public interface WorkspaceMerger {
*/
void inverseMerge(Path workspace, EnvironmentVariables variables, boolean addNewProperties, Path update);

/**
* @param workspace the {@link Path} to the {@link com.devonfw.tools.ide.context.IdeContext#FOLDER_WORKSPACE workspace} with IDE templates to upgrade
* (migrate and replace legacy constructs).
*/
void upgrade(Path workspace);

}

0 comments on commit 3db4692

Please sign in to comment.