Remove unneeded editorComponentActive check from action update (EA-214574 - REWA: ToolWindowManagerImpl.isEditorComponentActive)

GitOrigin-RevId: 36c0e67b98bd0242b8e3db4227300cf7f6e95f43
This commit is contained in:
Dmitry Jemerov
2019-10-11 17:31:19 +00:00
committed by intellij-monorepo-bot
parent 15c4d4e435
commit d081fd2c2e
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2015 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide.bookmarks.actions;
import com.intellij.icons.AllIcons;
@@ -21,7 +7,6 @@ import com.intellij.ide.bookmarks.BookmarkManager;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindowManager;
import org.jetbrains.annotations.NotNull;
public class ToggleBookmarkAction extends BookmarksAction implements DumbAware, Toggleable {
@@ -34,8 +19,7 @@ public class ToggleBookmarkAction extends BookmarksAction implements DumbAware,
Project project = event.getProject();
DataContext dataContext = event.getDataContext();
event.getPresentation().setEnabled(project != null &&
(ToolWindowManager.getInstance(project).isEditorComponentActive() &&
CommonDataKeys.EDITOR.getData(dataContext) != null ||
(CommonDataKeys.EDITOR.getData(dataContext) != null ||
CommonDataKeys.VIRTUAL_FILE.getData(dataContext) != null));
if (ActionPlaces.TOUCHBAR_GENERAL.equals(event.getPlace())) {