do not trigger usages from gutter mouse shortcuts

This commit is contained in:
Egor.Ushakov
2016-02-26 15:04:41 +03:00
parent 5b3cddc143
commit 79a05c0bfc
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@ import com.intellij.lang.findUsages.EmptyFindUsagesProvider;
import com.intellij.lang.findUsages.LanguageFindUsages;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.EditorGutter;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
@@ -78,6 +79,10 @@ public class FindUsagesInFileAction extends AnAction {
return false;
}
if (EditorGutter.KEY.getData(dataContext) != null) {
return false;
}
Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
if (editor == null) {
UsageTarget[] target = UsageView.USAGE_TARGETS_KEY.getData(dataContext);