|
@@ -94,14 +94,19 @@ public class JavaParser extends Parser { |
|
|
((QualifiedName) nameObj).getFullyQualifiedName() : |
|
|
((QualifiedName) nameObj).getFullyQualifiedName() : |
|
|
((SimpleName) nameObj).getIdentifier(); |
|
|
((SimpleName) nameObj).getIdentifier(); |
|
|
List<Statement> statements = node.getBody().statements(); |
|
|
List<Statement> statements = node.getBody().statements(); |
|
|
Statement last = statements.get(statements.size() - 1); |
|
|
|
|
|
|
|
|
|
|
|
int sl = this.root.getLineNumber(node.getStartPosition()); |
|
|
int sl = this.root.getLineNumber(node.getStartPosition()); |
|
|
int sc = this.root.getColumnNumber(node.getStartPosition()); |
|
|
int sc = this.root.getColumnNumber(node.getStartPosition()); |
|
|
int el = this.root.getLineNumber(last.getStartPosition()); |
|
|
|
|
|
int ec = this.root.getColumnNumber(last.getStartPosition()); |
|
|
|
|
|
|
|
|
Integer el = null; |
|
|
|
|
|
Integer ec = null; |
|
|
|
|
|
|
|
|
data.put("coord", Symbols.createCoord(sl, sc, null, null)); |
|
|
|
|
|
|
|
|
if (statements.size() > 0) { |
|
|
|
|
|
Statement last = statements.get(statements.size() - 1); |
|
|
|
|
|
el = this.root.getLineNumber(last.getStartPosition()); |
|
|
|
|
|
ec = this.root.getColumnNumber(last.getStartPosition()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
data.put("coord", Symbols.createCoord(sl, sc, el, ec)); |
|
|
data.put("name", name); |
|
|
data.put("name", name); |
|
|
this._cache.push(data); |
|
|
this._cache.push(data); |
|
|
return true; |
|
|
return true; |
|
|