Remove unused parameter
This commit is contained in:
@@ -68,7 +68,7 @@ public class JetRefactoringUtil {
|
|||||||
String text = file.getText();
|
String text = file.getText();
|
||||||
while (selectionStart < selectionEnd && Character.isSpaceChar(text.charAt(selectionStart))) ++selectionStart;
|
while (selectionStart < selectionEnd && Character.isSpaceChar(text.charAt(selectionStart))) ++selectionStart;
|
||||||
while (selectionStart < selectionEnd && Character.isSpaceChar(text.charAt(selectionEnd - 1))) --selectionEnd;
|
while (selectionStart < selectionEnd && Character.isSpaceChar(text.charAt(selectionEnd - 1))) --selectionEnd;
|
||||||
callback.run(findExpression(editor, file, selectionStart, selectionEnd));
|
callback.run(findExpression(file, selectionStart, selectionEnd));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int offset = editor.getCaretModel().getOffset();
|
int offset = editor.getCaretModel().getOffset();
|
||||||
@@ -181,8 +181,7 @@ public class JetRefactoringUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static JetExpression findExpression(@NotNull Editor editor, @NotNull PsiFile file,
|
public static JetExpression findExpression(@NotNull PsiFile file, int startOffset, int endOffset) throws IntroduceRefactoringException{
|
||||||
int startOffset, int endOffset) throws IntroduceRefactoringException{
|
|
||||||
PsiElement element = PsiTreeUtil.findElementOfClassAtRange(file, startOffset, endOffset, JetExpression.class);
|
PsiElement element = PsiTreeUtil.findElementOfClassAtRange(file, startOffset, endOffset, JetExpression.class);
|
||||||
if (element == null || element.getTextRange().getStartOffset() != startOffset ||
|
if (element == null || element.getTextRange().getStartOffset() != startOffset ||
|
||||||
element.getTextRange().getEndOffset() != endOffset) {
|
element.getTextRange().getEndOffset() != endOffset) {
|
||||||
|
|||||||
Reference in New Issue
Block a user