Robot Framework Integrated Development Environment (RIDE)
__init__.py
Go to the documentation of this file.
1 # Copyright 2008-2015 Nokia Networks
2 # Copyright 2016- Robot Framework Foundation
3 #
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
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 
16 from .editor import PreferenceEditor
17 from .editors import GridEditorPreferences, TextEditorPreferences, TestRunnerPreferences
18 from .general import DefaultPreferences
19 from .imports import ImportPreferences
20 from .saving import SavingPreferences
21 from .settings import Settings, initialize_settings, RideSettings
22 from ..ui import ExcludePreferences
23 
24 
25 class Preferences():
26 
27  def __init__(self, settings):
28  self.settingssettings = settings
29  self._preference_panels_preference_panels = []
30  self._add_builtin_preferences_add_builtin_preferences()
31 
32  @property
33  preference_panels = property
34 
35  def preference_panels(self):
36  return self._preference_panels_preference_panels
37 
38  def add(self, preference_ui):
39  if preference_ui not in self._preference_panels_preference_panels:
40  self._preference_panels_preference_panels.append(preference_ui)
41 
42  def remove(self, panel_class):
43  if panel_class in self._preference_panels_preference_panels:
44  self._preference_panels_preference_panels.remove(panel_class)
45 
47  self.addadd(DefaultPreferences)
48  self.addadd(SavingPreferences)
49  self.addadd(ImportPreferences)
50  self.addadd(GridEditorPreferences)
51  self.addadd(TextEditorPreferences)
52  self.addadd(TestRunnerPreferences)
53  self.addadd(ExcludePreferences)
def add(self, preference_ui)
Definition: __init__.py:38
def __init__(self, settings)
Definition: __init__.py:27
def remove(self, panel_class)
Definition: __init__.py:42