Skip to content

Commit e02bcad

Browse files
committed
eslint formatting
1 parent 424b084 commit e02bcad

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/atomJavaUtil.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ class AtomJavaUtil {
9494
// Find class name by a variable name given as prefix
9595
// TODO traverse brackets backwards to match correct scope (with regexp)
9696
// TODO handle 'this.varName' correctly
97-
matches = editor.getTextInRange([[bufferPosition.row - 10, 0], bufferPosition]).match(
98-
new RegExp('([A-Z][a-zA-Z0-9_]*)(<[A-Z][a-zA-Z0-9_<>, ]*>)?\\s'+prefix, 'g'));
99-
classSimpleName = matches[matches.length-1];
100-
classSimpleName = classSimpleName.replace(' '+prefix, '');
97+
classSimpleName = this._lastMatch(
98+
editor.getTextInRange([[bufferPosition.row - 10, 0], bufferPosition]),
99+
new RegExp('([A-Z][a-zA-Z0-9_]*)(<[A-Z][a-zA-Z0-9_<>, ]*>)?\\s' +
100+
prefix, 'g'));
101+
classSimpleName = classSimpleName.replace(' ' + prefix, '');
101102
classSimpleName = classSimpleName.replace(/\<.*\>/, '');
102103
isInstance = true;
103104
}

0 commit comments

Comments
 (0)