Java: Autoformat.

This commit is contained in:
Anders Schack-Mulligen
2020-01-22 14:12:04 +01:00
parent fb90c2ba52
commit 9b7a728609
63 changed files with 425 additions and 310 deletions

View File

@@ -114,11 +114,9 @@ class AndroidComponentXmlElement extends XMLElement {
string getResolvedComponentName() {
if getComponentName().matches(".%")
then
result = getParent()
.(XMLElement)
.getParent()
.(AndroidManifestXmlElement)
.getPackageAttributeValue() + getComponentName()
result =
getParent().(XMLElement).getParent().(AndroidManifestXmlElement).getPackageAttributeValue() +
getComponentName()
else result = getComponentName()
}

View File

@@ -18,7 +18,8 @@ class AntTarget extends XMLElement {
* This is a utility method used for extracting individual dependencies.
*/
string getDependsString() {
result = "," +
result =
"," +
this
.getAttributeValue("depends")
.replaceAll(" ", "")

View File

@@ -66,7 +66,8 @@ class Pom extends ProtoPom {
/** Gets a Maven coordinate of the form `groupId:artifactId:version`. */
string getCoordinate() {
result = this.getGroup().getValue() + ":" + this.getArtifact().getValue() + ":" +
result =
this.getGroup().getValue() + ":" + this.getArtifact().getValue() + ":" +
this.getVersion().getValue()
}
@@ -195,8 +196,8 @@ class Pom extends ProtoPom {
relativePath = "src"
|
// Resolve the relative path against the base directory for this POM
result.getAbsolutePath() = normalize(getFile().getParentContainer().getAbsolutePath() + "/" +
relativePath)
result.getAbsolutePath() =
normalize(getFile().getParentContainer().getAbsolutePath() + "/" + relativePath)
)
}
@@ -411,7 +412,8 @@ class MavenRepoJar extends File {
exists(MavenRepo mr | mr.getAJarFile() = this |
// Assuming the standard layout, the first part of the directory structure from the maven
// repository will be the groupId converted to a path by replacing "." with "/".
result = getParentContainer()
result =
getParentContainer()
.getParentContainer()
.getParentContainer()
.getAbsolutePath()

View File

@@ -100,11 +100,8 @@ class XMLParent extends @xmlparent {
* left to right, separated by a space.
*/
string allCharactersString() {
result = concat(string chars, int pos |
xmlChars(_, chars, this, pos, _, _)
|
chars, " " order by pos
)
result =
concat(string chars, int pos | xmlChars(_, chars, this, pos, _, _) | chars, " " order by pos)
}
/** Gets the text value contained in this XML parent. */