Skip to content

Commit

Permalink
Merge branch 'main' into feature/914_setup_should_create_bashrc
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-cap authored Jan 16, 2025
2 parents 8b9b5a5 + c32ef4d commit 7ac7fc3
Show file tree
Hide file tree
Showing 52 changed files with 1,293 additions and 788 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ 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/915[#915]: custom-tools not working
* https://github.com/devonfw/IDEasy/issues/916[#916]: download is missing status code error handling
* https://github.com/devonfw/IDEasy/issues/757[#757]: Support to allow settings in code repository
* https://github.com/devonfw/IDEasy/issues/826[#826]: Fix git settings check when settings folder is empty
* https://github.com/devonfw/IDEasy/issues/894[#894]: Fix ide.bat printing for initialization and error output
* https://github.com/devonfw/IDEasy/issues/759[#759]: Add UpgradeSettingsCommandlet for the upgrade of legacy devonfw-ide settings to IDEasy
* https://github.com/devonfw/IDEasy/issues/498[#498]: Improvement of XML merger: resolve before merge
* https://github.com/devonfw/IDEasy/issues/691[#691]: XMLMerger can not handle merge of subnodes properly

The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/18?closed=1[milestone 2025.01.001].

Expand All @@ -31,6 +34,7 @@ Then run the `setup` and all should work fine.

Release with new features and bugfixes:

* https://github.com/devonfw/IDEasy/issues/734[#734]: Improve ProcessResult: get out and err in order
* https://github.com/devonfw/IDEasy/issues/764[#764]: Fix IDEasy in CMD
* https://github.com/devonfw/IDEasy/issues/774[#774]: HTTP proxy support not working properly
* https://github.com/devonfw/IDEasy/issues/792[#792]: Honor new variable IDE_OPTIONS in ide command wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ public void setCwd(Path userDir, String workspace, Path ideHome) {
this.downloadPath = this.userHome.resolve("Downloads/ide");

this.path = computeSystemPath();
this.customToolRepository = CustomToolRepositoryImpl.of(this);
}

private String getMessageIdeHomeFound() {
Expand Down Expand Up @@ -352,6 +351,9 @@ public ToolRepository getDefaultToolRepository() {
@Override
public CustomToolRepository getCustomToolRepository() {

if (this.customToolRepository == null) {
this.customToolRepository = CustomToolRepositoryImpl.of(this);
}
return this.customToolRepository;
}

Expand Down Expand Up @@ -1130,5 +1132,6 @@ public IdeStartContextImpl getStartContext() {
*/
public void reload() {
this.variables = null;
this.customToolRepository = null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private String resolveRecursive(String value, Object source, int recursion, Abst
if (context.syntax == null) {
resolved = resolveWithSyntax(value, source, recursion, resolvedVars, context, VariableSyntax.SQUARE);
if (context.legacySupport) {
resolved = resolveWithSyntax(value, source, recursion, resolvedVars, context, VariableSyntax.CURLY);
resolved = resolveWithSyntax(resolved, source, recursion, resolvedVars, context, VariableSyntax.CURLY);
}
} else {
resolved = resolveWithSyntax(value, source, recursion, resolvedVars, context, context.syntax);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public final int merge(Path setup, Path update, EnvironmentVariables variables,
try {
doMerge(setup, update, variables, workspace);
} catch (Exception e) {
this.context.error(e, "Failed to merge workspace file {}", workspace);
this.context.error(e, "Failed to merge workspace file {} with update template {} and setup file {}!", workspace, update, setup);
return 1;
}
return 0;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.devonfw.tools.ide.merge.xmlmerger;

import java.nio.file.Path;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

/**
* A wrapper for an XML {@link org.w3c.dom.Document}
*/
public class XmlMergeDocument {

private final Document document;

private final Path path;

/**
* The constructor.
*
* @param document the {@link #getDocument() document}.
* @param path the {@link #getPath() path}.
*/
public XmlMergeDocument(Document document, Path path) {

super();
this.document = document;
this.path = path;
}

/**
* @return the XML {@link Document}.
*/
public Document getDocument() {

return this.document;
}

/**
* @return the {@link Path} to the file from which the {@link #getDocument() document} was loaded.
*/
public Path getPath() {

return this.path;
}

/**
* @return the {@link Document#getDocumentElement() root} {@link Element} of the {@link #getDocument() document}.
*/
public Element getRoot() {

return this.document.getDocumentElement();
}

/**
* @return a {@link NodeList} with all {@link Element}s of this {@link Document}.
*/
public NodeList getAllElements() {

return this.document.getElementsByTagName("*");
}

@Override
public String toString() {

return this.path.toString();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.devonfw.tools.ide.merge.xmlmerger;

/**
* {@link RuntimeException} for errors related to {@link XmlMerger}.
*/
public class XmlMergeException extends RuntimeException {

/**
* The constructor.
*
* @param message the {@link #getMessage() message}.
*/
public XmlMergeException(String message) {

super(message);
}

/**
* The constructor.
*
* @param message the {@link #getMessage() message}.
* @param cause the {@link #getCause() cause}.
*/
public XmlMergeException(String message, Throwable cause) {

super(message, cause);
}
}
Loading

0 comments on commit 7ac7fc3

Please sign in to comment.