Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDE

Release with new features and bugfixes:

* https://github.com/devonfw/IDEasy/issues/1298[#1298]: Support for extra tool version
* https://github.com/devonfw/IDEasy/issues/1349[#1349]: Fix XML merge warning message to include file paths for better debugging
* https://github.com/devonfw/IDEasy/issues/1473[#1473]: option --skip-updates not working
* https://github.com/devonfw/IDEasy/issues/536[#536]: IDEasy complete tries to match commandlets twice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,33 @@ default String getToolEdition(String tool) {
*/
VersionIdentifier getToolVersion(String tool);

/**
* @param tool the name of the tool (e.g. "java").
* @return the {@link VersionIdentifier} with the extra version of the tool to use. May also be a {@link VersionIdentifier#isPattern() version pattern}. Will be
* {@code null} if undefined.
*/
default VersionIdentifier getExtraToolVersion(String tool) {
String variable = getExtraToolVersionVariable(tool);
String value = get(variable);
if (value == null) {
return null;
}
return VersionIdentifier.of(value);
}

/**
* @param tool the name of the tool (e.g. "java").
* @return the edition of the extra tool to use. Will be {@code null} if undefined.
*/
default String getExtraToolEdition(String tool) {
String variable = getExtraToolEditionVariable(tool);
String value = get(variable);
if (value == null) {
return null;
}
return value;
}

/**
* @return the {@link EnvironmentVariablesType type} of this {@link EnvironmentVariables}.
*/
Expand Down Expand Up @@ -274,6 +301,24 @@ static String getToolEditionVariable(String tool) {
return getToolVariablePrefix(tool) + "_EDITION";
}

/**
* @param tool the name of the tool.
* @return the name of the extra version variable.
*/
static String getExtraToolVersionVariable(String tool) {

return "EXTRA_" + getToolVariablePrefix(tool) + "_VERSION";
}

/**
* @param tool the name of the tool.
* @return the name of the extra edition variable.
*/
static String getExtraToolEditionVariable(String tool) {

return "EXTRA_" + getToolVariablePrefix(tool) + "_EDITION";
}

/**
* @param tool the name of the tool.
* @return the given {@code tool} name in UPPER_CASE without hyphen characters.
Expand Down
Loading
Loading