From 75d4dae73debfd194d173436e6fbe6db84bb574a Mon Sep 17 00:00:00 2001 From: Nikita Iarychenko Date: Fri, 18 Apr 2025 18:24:36 +0400 Subject: [PATCH] OPENIDE #164 Show "Scratch File" in File menu when opened java class (cherry picked from commit bb5d8b45618f3e0ee16ae80bf0ade8da76c77b14) (cherry picked from commit fcc58b4d16b256dd79c71271e26577bc036b1c10) (cherry picked from commit 3b51e65b7bd77311d17b68e19b7d12c8042a26a3) (cherry picked from commit f2f9453248010f34c34ae7a66a92d121fff95407) --- .../intellij/ide/scratch/ScratchFileActions.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/scratch/ScratchFileActions.java b/platform/lang-impl/src/com/intellij/ide/scratch/ScratchFileActions.java index 77b540414523..470decf88243 100644 --- a/platform/lang-impl/src/com/intellij/ide/scratch/ScratchFileActions.java +++ b/platform/lang-impl/src/com/intellij/ide/scratch/ScratchFileActions.java @@ -1,4 +1,7 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// +// Modified by Nikita Iarychenko at 2025 as part of the OpenIDE project(https://openide.ru). +// Any modifications are available on the same license terms as the original source code. package com.intellij.ide.scratch; import com.intellij.icons.AllIcons; @@ -105,7 +108,7 @@ public final class ScratchFileActions { return ourCurrentBuffer; } - static final class NewFileAction extends DumbAwareAction implements NewFileActionWithCategory { + static final class NewFileAction extends DumbAwareAction { private static final String ACTION_ID = "NewScratchFile"; private final NotNullLazyValue<@Nls String> myActionText = NotNullLazyValue.lazy(() -> { @@ -225,10 +228,10 @@ public final class ScratchFileActions { } } - @Override - public @NotNull String getCategory() { - return "Scratch"; - } + //@Override + //public @NotNull String getCategory() { + // return "Scratch"; + //} } static final class NewBufferAction extends DumbAwareAction {