-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
plugin.py
53 lines (42 loc) · 1.52 KB
/
plugin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2009- Spyder Project Contributors
#
# Distributed under the terms of the MIT License
# (see spyder/__init__.py for details)
# -----------------------------------------------------------------------------
"""
Run Plugin.
"""
# Local imports
from spyder.api.plugins import Plugins, SpyderPluginV2
from spyder.api.translations import get_translation
from spyder.plugins.run.confpage import RunConfigPage
# Localization
_ = get_translation('spyder')
# --- Plugin
# ----------------------------------------------------------------------------
class Run(SpyderPluginV2):
"""
Run Plugin.
"""
NAME = "run"
# TODO: Fix requires to reflect the desired order in the preferences
REQUIRES = [Plugins.Preferences]
CONTAINER_CLASS = None
CONF_SECTION = NAME
CONF_WIDGET_CLASS = RunConfigPage
CONF_FILE = False
# --- SpyderPluginV2 API
# ------------------------------------------------------------------------
def get_name(self):
return _("Run")
def get_description(self):
return _("Manage run configuration.")
def get_icon(self):
return self.create_icon('run')
def register(self):
preferences = self.get_plugin(Plugins.Preferences)
preferences.register_plugin_preferences(self)
# --- Public API
# ------------------------------------------------------------------------