Skip to content

Commit

Permalink
Fix token offsets in the presence of Javadocs (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
NebelNidas committed Apr 8, 2024
1 parent fa99b9c commit 0561455
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void ensureDecompiled() {

// Tokens
codeInfo.getCodeMetadata().searchDown(0, (pos, ann) -> {
processAnnotatedElement(pos, ann, cls.getCodeInfo());
processAnnotatedElement(pos, ann, codeInfo);
return null;
});
}
Expand Down Expand Up @@ -139,8 +139,8 @@ private void processAnnotatedElement(int pos, ICodeAnnotation ann, ICodeInfo cod
if (!var.getMth().collectArgsWithoutLoading().contains(var)) return;
Token token = new Token(pos, pos + var.getName().length(), var.getName());

if (pos == var.getDefPosition()) {
index.addDeclaration(token, paramEntryOf(var, codeInfo));
if (pos == var.getDefPosition()) {

Check failure on line 142 in enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java

View workflow job for this annotation

GitHub Actions / build (17-ubuntu)

'if' has incorrect indentation level 32, expected level should be 24.

Check failure on line 142 in enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java

View workflow job for this annotation

GitHub Actions / build (21-ubuntu)

'if' has incorrect indentation level 32, expected level should be 24.
index.addDeclaration(token, paramEntryOf(var, codeInfo));

Check failure on line 143 in enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java

View workflow job for this annotation

GitHub Actions / build (17-ubuntu)

'if' child has incorrect indentation level 40, expected level should be 32.

Check failure on line 143 in enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java

View workflow job for this annotation

GitHub Actions / build (21-ubuntu)

'if' child has incorrect indentation level 40, expected level should be 32.
} else {
index.addReference(token, paramEntryOf(var, codeInfo), methodEntryOf(var.getMth()));
}
Expand All @@ -161,7 +161,7 @@ private MethodEntry methodEntryOf(MethodNode mth) {
return jadxHelper.methodEntryOf(mth);
}

private LocalVariableEntry paramEntryOf(VarNode param, ICodeInfo codeInfo) {
private LocalVariableEntry paramEntryOf(VarNode param, ICodeInfo codeInfo) {

Check failure on line 164 in enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java

View workflow job for this annotation

GitHub Actions / build (17-ubuntu)

'method def modifier' has incorrect indentation level 16, expected level should be 8.

Check failure on line 164 in enigma/src/main/java/cuchaz/enigma/source/jadx/JadxSource.java

View workflow job for this annotation

GitHub Actions / build (21-ubuntu)

'method def modifier' has incorrect indentation level 16, expected level should be 8.
return jadxHelper.paramEntryOf(param, codeInfo);
}
}

0 comments on commit 0561455

Please sign in to comment.