2 * Copyright 2000-2016 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com.jetbrains.python.console;
18 import com.intellij.execution.Executor;
19 import com.intellij.openapi.extensions.Extensions;
20 import icons.PythonIcons;
21 import org.jetbrains.annotations.NotNull;
22 import org.jetbrains.annotations.Nullable;
27 * Created by Yuli Fiterman on 9/11/2016.
29 public class PyConsoleToolWindowExecutor extends Executor {
32 public static final String ID = "PyConsoleToolWindowExecutor";
33 public static final String TOOLWINDOW_ID = "Python Console";
36 public static PyConsoleToolWindowExecutor findInstance() {
37 for (Executor t : Extensions.getExtensions(INTERNAL_EXECUTOR_EXTENSION_NAME)) {
38 if (PyConsoleToolWindowExecutor.class.isInstance(t)) {
39 return (PyConsoleToolWindowExecutor)t;
47 public String getToolWindowId() {
52 public Icon getToolWindowIcon() {
53 return PythonIcons.Python.PythonConsoleToolWindow;
58 public Icon getIcon() {
59 return PythonIcons.Python.PythonConsoleToolWindow;
63 public Icon getDisabledIcon() {
68 public String getDescription() {
74 public String getActionName() {
75 return "Run Python Console";
80 public String getId() {
86 public String getStartActionText() {
87 return "Starting Python Console";
91 public String getContextActionId() {
96 public String getHelpId() {