Skip to content

Commit 9bd1c85

Browse files
committed
Use invoke instead of applyFix. Otherwise editor will be lost
1 parent a0e0ce9 commit 9bd1c85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/com/goide/psi/impl/imports/GoReferenceImporter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan
2+
* Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ public boolean autoImportReferenceAtCursor(@NotNull Editor editor, @NotNull PsiF
5353
if (reference instanceof GoReference) {
5454
GoImportPackageQuickFix fix = new GoImportPackageQuickFix(reference);
5555
if (fix.isAvailable(file.getProject(), editor, file)) {
56-
fix.applyFix();
56+
fix.invoke(file.getProject(), editor, file);
5757
return true;
5858
}
5959
}
@@ -75,7 +75,7 @@ public boolean autoImportReferenceAt(@NotNull Editor editor, @NotNull PsiFile fi
7575
GoImportPackageQuickFix fix = new GoImportPackageQuickFix(reference);
7676
Project project = file.getProject();
7777
if (fix.isAvailable(project, editor, file)) {
78-
fix.applyFix();
78+
fix.invoke(file.getProject(), editor, file);
7979
return true;
8080
}
8181
}

0 commit comments

Comments
 (0)