goto: navigate in success case only (IDEA-182556)

This commit is contained in:
Anna.Kozlova
2017-12-28 14:59:10 +01:00
parent 6b89b7bdc7
commit 42a268c908
2 changed files with 6 additions and 6 deletions
@@ -388,8 +388,8 @@ public class MarkerType {
}
@Override
public void onFinished() {
super.onFinished();
public void onSuccess() {
super.onSuccess();
PsiElement oneElement = getTheOnlyOneElement();
if (oneElement instanceof NavigatablePsiElement) {
((NavigatablePsiElement)oneElement).navigate(true);
@@ -445,8 +445,8 @@ public class MarkerType {
}
@Override
public void onFinished() {
super.onFinished();
public void onSuccess() {
super.onSuccess();
PsiElement oneElement = getTheOnlyOneElement();
if (oneElement instanceof NavigatablePsiElement) {
((NavigatablePsiElement)oneElement).navigate(true);
@@ -71,8 +71,8 @@ public class GotoImplementationHandler extends GotoTargetHandler {
GotoData gotoData = new GotoData(source, targets, Collections.emptyList());
gotoData.listUpdaterTask = new ImplementationsUpdaterTask(gotoData, editor, offset, reference) {
@Override
public void onFinished() {
super.onFinished();
public void onSuccess() {
super.onSuccess();
PsiElement oneElement = getTheOnlyOneElement();
if (oneElement != null && navigateToElement(oneElement)) {
myPopup.cancel();