Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
breskeby committed Jan 8, 2025
1 parent 015e53a commit 1fcde08
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
9 changes: 0 additions & 9 deletions build-tools-internal/src/main/groovy/elasticsearch.ide.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,6 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
}
}

/**
* Parses a given XML file, applies a set of changes, and writes those changes back to the original file.
*
* @param path Path to existing XML file
* @param action Action to perform on parsed XML document
* @param preface optional front matter to add after the XML declaration
* but before the XML document, e.g. a doctype or comment
*/

Pair<File, IncludedBuild> locateElasticsearchWorkspace(Gradle gradle) {
if (gradle.parent == null) {
// See if any of these included builds is the Elasticsearch gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,26 @@ static Node parseXml(String xmlPath) throws IOException, SAXException, ParserCon
return xml;
}


/**
* Parses a given XML file, applies a set of changes, and writes those changes back to the original file.
*
* @param path Path to existing XML file
* @param action Action to perform on parsed XML document
* but before the XML document, e.g. a doctype or comment
*/
static void modifyXml(String xmlPath, Action<? super Node> action) throws IOException, ParserConfigurationException, SAXException {
modifyXml(xmlPath, action, null);
}

/**
* Parses a given XML file, applies a set of changes, and writes those changes back to the original file.
*
* @param path Path to existing XML file
* @param action Action to perform on parsed XML document
* @param preface optional front matter to add after the XML declaration
* but before the XML document, e.g. a doctype or comment
*/
static void modifyXml(String xmlPath, Action<? super Node> action, String preface) throws IOException, ParserConfigurationException,
SAXException {
File xmlFile = new File(xmlPath);
Expand Down

0 comments on commit 1fcde08

Please sign in to comment.