From 774667e2ef71b9f69b6e36d2d81e9a78ee4ba5b8 Mon Sep 17 00:00:00 2001 From: "Anna.Kozlova" Date: Wed, 12 Jul 2017 15:10:00 +0200 Subject: [PATCH] don't alt-f1 on scratches (IDEA-175587) --- .../src/com/intellij/ide/scopeView/ScopePaneSelectInTarget.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/ide/scopeView/ScopePaneSelectInTarget.java b/platform/lang-impl/src/com/intellij/ide/scopeView/ScopePaneSelectInTarget.java index 99d00a895cd4..51c28521530d 100644 --- a/platform/lang-impl/src/com/intellij/ide/scopeView/ScopePaneSelectInTarget.java +++ b/platform/lang-impl/src/com/intellij/ide/scopeView/ScopePaneSelectInTarget.java @@ -20,6 +20,7 @@ import com.intellij.ide.SelectInContext; import com.intellij.ide.SelectInManager; import com.intellij.ide.StandardTargetWeights; import com.intellij.ide.impl.ProjectViewSelectInTarget; +import com.intellij.ide.scratch.ScratchUtil; import com.intellij.openapi.project.Project; import com.intellij.packageDependencies.DependencyValidationManager; import com.intellij.psi.PsiElement; @@ -53,6 +54,7 @@ public class ScopePaneSelectInTarget extends ProjectViewSelectInTarget { @Nullable private NamedScope getContainingScope(@Nullable PsiFile file) { if (file == null) return null; + if (ScratchUtil.isScratch(file.getVirtualFile())) return null; NamedScopesHolder scopesHolder = DependencyValidationManager.getInstance(myProject); for (NamedScope scope : ScopeViewPane.getShownScopes(myProject)) { PackageSet packageSet = scope.getValue();