PluginApis.py

changeset 3
551bd94613ac
parent 1
9fc07b8c55b8
child 4
a27bb7a06650
equal deleted inserted replaced
2:f2746ef237ae 3:551bd94613ac
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the APIs plugin. 7 Module implementing the APIs plugin.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 import os 12 import os
11 import glob 13 import glob
12 14
13 from PyQt4.QtCore import QObject 15 from PyQt4.QtCore import QObject
15 # Start-of-Header 17 # Start-of-Header
16 name = "APIs Plugin" 18 name = "APIs Plugin"
17 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 19 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
18 autoactivate = True 20 autoactivate = True
19 deactivateable = True 21 deactivateable = True
20 version = "1.0.0" 22 version = "1.1.0"
21 className = "PluginApis" 23 className = "PluginApis"
22 packageName = "APIs" 24 packageName = "APIs"
23 shortDescription = "API files for auto-completion and call tips." 25 shortDescription = "API files for auto-completion and call tips."
24 longDescription = """This plug-in provides API files for auto-completion and""" \ 26 longDescription = """This plug-in provides API files for auto-completion and""" \
25 """ call tips that are often missing from distribution packages.""" 27 """ call tips that are often missing from distribution packages."""
34 """ 36 """
35 Module function to return the API files made available by this plugin. 37 Module function to return the API files made available by this plugin.
36 38
37 @return list of API filenames (list of string) 39 @return list of API filenames (list of string)
38 """ 40 """
39 if language in ["Python3", "Python2"]: 41 if language in ["Python3", "Python2", "Python"]:
40 apisDir = \ 42 apisDir = \
41 os.path.join(os.path.dirname(__file__), "APIs", "Python") 43 os.path.join(os.path.dirname(__file__), "APIs", "Python")
42 apis = glob.glob(os.path.join(apisDir, '*.api')) 44 apis = glob.glob(os.path.join(apisDir, '*.api'))
43 if language == "Python3": 45 if language == "Python3":
44 apisDir = \ 46 apisDir = \
61 """ 63 """
62 Constructor 64 Constructor
63 65
64 @param ui reference to the user interface object (UI.UserInterface) 66 @param ui reference to the user interface object (UI.UserInterface)
65 """ 67 """
66 super().__init__(ui) 68 super(PluginApis, self).__init__(ui)
67 self.__ui = ui 69 self.__ui = ui
68 70
69 def activate(self): 71 def activate(self):
70 """ 72 """
71 Public method to activate this plugin. 73 Public method to activate this plugin.

eric ide

mercurial