src/eric7/Plugins/PluginVcsSubversion.py

branch
eric7
changeset 10437
2f70ca07f0af
parent 10331
c1a2ff7e3575
child 10439
21c28b0f9e41
equal deleted inserted replaced
10436:f6881d10e995 10437:2f70ca07f0af
48 """ 48 """
49 Public method to support the display of some executable info. 49 Public method to support the display of some executable info.
50 50
51 @return dictionary containing the data to query the presence of 51 @return dictionary containing the data to query the presence of
52 the executable 52 the executable
53 @rtype dict
53 """ 54 """
54 exe = "svn" 55 exe = "svn"
55 if OSUtilities.isWindowsPlatform(): 56 if OSUtilities.isWindowsPlatform():
56 exe += ".exe" 57 exe += ".exe"
57 58
74 def getVcsSystemIndicator(): 75 def getVcsSystemIndicator():
75 """ 76 """
76 Public function to get the indicators for this version control system. 77 Public function to get the indicators for this version control system.
77 78
78 @return dictionary with indicator as key and a tuple with the vcs name 79 @return dictionary with indicator as key and a tuple with the vcs name
79 (string) and vcs display string (string) 80 and vcs display string
80 """ 81 @rtype dict
81 ##global pluginTypename 82 """
82 data = {} 83 data = {}
83 exe = "svn" 84 exe = "svn"
84 if OSUtilities.isWindowsPlatform(): 85 if OSUtilities.isWindowsPlatform():
85 exe += ".exe" 86 exe += ".exe"
86 if FileSystemUtilities.isinpath(exe): 87 if FileSystemUtilities.isinpath(exe):
91 92
92 def displayString(): 93 def displayString():
93 """ 94 """
94 Public function to get the display string. 95 Public function to get the display string.
95 96
96 @return display string (string) 97 @return display string
98 @rtype str
97 """ 99 """
98 exe = "svn" 100 exe = "svn"
99 if OSUtilities.isWindowsPlatform(): 101 if OSUtilities.isWindowsPlatform():
100 exe += ".exe" 102 exe += ".exe"
101 if FileSystemUtilities.isinpath(exe): 103 if FileSystemUtilities.isinpath(exe):
109 111
110 def createConfigurationPage(configDlg): # noqa: U100 112 def createConfigurationPage(configDlg): # noqa: U100
111 """ 113 """
112 Module function to create the configuration page. 114 Module function to create the configuration page.
113 115
114 @param configDlg reference to the configuration dialog (QDialog) 116 @param configDlg reference to the configuration dialog
117 @type QDialog
115 @return reference to the configuration page 118 @return reference to the configuration page
119 @rtype SubversionPage
116 """ 120 """
117 from eric7.Plugins.VcsPlugins.vcsSubversion.ConfigurationPage import SubversionPage 121 from eric7.Plugins.VcsPlugins.vcsSubversion.ConfigurationPage import SubversionPage
118 122
119 global subversionCfgPluginObject 123 global subversionCfgPluginObject
120 124
127 def getConfigData(): 131 def getConfigData():
128 """ 132 """
129 Module function returning data as required by the configuration dialog. 133 Module function returning data as required by the configuration dialog.
130 134
131 @return dictionary with key "zzz_subversionPage" containing the relevant 135 @return dictionary with key "zzz_subversionPage" containing the relevant
136 @rtype dict
132 data 137 data
133 """ 138 """
134 return { 139 return {
135 "zzz_subversionPage": [ 140 "zzz_subversionPage": [
136 QCoreApplication.translate("VcsSubversionPlugin", "Subversion"), 141 QCoreApplication.translate("VcsSubversionPlugin", "Subversion"),
159 164
160 def __init__(self, ui): 165 def __init__(self, ui):
161 """ 166 """
162 Constructor 167 Constructor
163 168
164 @param ui reference to the user interface object (UI.UserInterface) 169 @param ui reference to the user interface object
170 @type UserInterface
165 """ 171 """
166 from eric7.Plugins.VcsPlugins.vcsSubversion.ProjectHelper import ( 172 from eric7.Plugins.VcsPlugins.vcsSubversion.ProjectHelper import (
167 SvnProjectHelper, 173 SvnProjectHelper,
168 ) 174 )
169 175
187 def getProjectHelper(self): 193 def getProjectHelper(self):
188 """ 194 """
189 Public method to get a reference to the project helper object. 195 Public method to get a reference to the project helper object.
190 196
191 @return reference to the project helper object 197 @return reference to the project helper object
198 @rtype SvnProjectHelper
192 """ 199 """
193 return self.__projectHelperObject 200 return self.__projectHelperObject
194 201
195 def initToolbar(self, ui, toolbarManager): 202 def initToolbar(self, ui, toolbarManager):
196 """ 203 """
197 Public slot to initialize the VCS toolbar. 204 Public slot to initialize the VCS toolbar.
198 205
199 @param ui reference to the main window (UserInterface) 206 @param ui reference to the main window
207 @type UserInterface
200 @param toolbarManager reference to a toolbar manager object 208 @param toolbarManager reference to a toolbar manager object
201 (EricToolBarManager) 209 @type EricToolBarManager
202 """ 210 """
203 if self.__projectHelperObject: 211 if self.__projectHelperObject:
204 self.__projectHelperObject.initToolbar(ui, toolbarManager) 212 self.__projectHelperObject.initToolbar(ui, toolbarManager)
205 213
206 def activate(self): 214 def activate(self):
207 """ 215 """
208 Public method to activate this plugin. 216 Public method to activate this plugin.
209 217
210 @return tuple of reference to instantiated viewmanager and 218 @return tuple of reference to instantiated viewmanager and
211 activation status (boolean) 219 activation status
220 @rtype tuple of (Subversion, bool)
212 """ 221 """
213 from eric7.Plugins.VcsPlugins.vcsSubversion.subversion import Subversion 222 from eric7.Plugins.VcsPlugins.vcsSubversion.subversion import Subversion
214 223
215 self.__object = Subversion(self, self.__ui) 224 self.__object = Subversion(self, self.__ui)
216 225
241 def getPreferences(self, key): 250 def getPreferences(self, key):
242 """ 251 """
243 Public method to retrieve the various settings. 252 Public method to retrieve the various settings.
244 253
245 @param key the key of the value to get 254 @param key the key of the value to get
255 @type str
246 @return the requested setting 256 @return the requested setting
257 @rtype Any
247 """ 258 """
248 if key in ["StopLogOnCopy"]: 259 if key in ["StopLogOnCopy"]:
249 return Preferences.toBool( 260 return Preferences.toBool(
250 Preferences.getSettings().value( 261 Preferences.getSettings().value(
251 "Subversion/" + key, self.__subversionDefaults[key] 262 "Subversion/" + key, self.__subversionDefaults[key]
267 def setPreferences(self, key, value): 278 def setPreferences(self, key, value):
268 """ 279 """
269 Public method to store the various settings. 280 Public method to store the various settings.
270 281
271 @param key the key of the setting to be set 282 @param key the key of the setting to be set
283 @type str
272 @param value the value to be set 284 @param value the value to be set
285 @type Any
273 """ 286 """
274 Preferences.getSettings().setValue("Subversion/" + key, value) 287 Preferences.getSettings().setValue("Subversion/" + key, value)
275 288
276 def getServersPath(self): 289 def getServersPath(self):
277 """ 290 """
278 Public method to get the filename of the servers file. 291 Public method to get the filename of the servers file.
279 292
280 @return filename of the servers file (string) 293 @return filename of the servers file
294 @rtype str
281 """ 295 """
282 return getServersPath() 296 return getServersPath()
283 297
284 def getConfigPath(self): 298 def getConfigPath(self):
285 """ 299 """
286 Public method to get the filename of the config file. 300 Public method to get the filename of the config file.
287 301
288 @return filename of the config file (string) 302 @return filename of the config file
303 @rtype str
289 """ 304 """
290 return getConfigPath() 305 return getConfigPath()
291 306
292 def prepareUninstall(self): 307 def prepareUninstall(self):
293 """ 308 """

eric ide

mercurial