mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not trigger usages from gutter mouse shortcuts
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user