-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/914_setup_should_create_bashrc
- Loading branch information
Showing
52 changed files
with
1,293 additions
and
788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
218 changes: 0 additions & 218 deletions
218
cli/src/main/java/com/devonfw/tools/ide/merge/xmlmerger/MergeStrategy.java
This file was deleted.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
cli/src/main/java/com/devonfw/tools/ide/merge/xmlmerger/XmlMergeDocument.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
cli/src/main/java/com/devonfw/tools/ide/merge/xmlmerger/XmlMergeException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
Oops, something went wrong.