51 (boolean) |
51 (boolean) |
52 @return base classes information (dictionary of list of strings) |
52 @return base classes information (dictionary of list of strings) |
53 """ |
53 """ |
54 bases = {} |
54 bases = {} |
55 self.includePrivate = includePrivate |
55 self.includePrivate = includePrivate |
56 classNames = sorted(self.module.classes.keys()) |
56 classNames = sorted(self.module.classes) |
57 for className in classNames: |
57 for className in classNames: |
58 if ( |
58 if ( |
59 not self.__isPrivate(self.module.classes[className]) |
59 not self.__isPrivate(self.module.classes[className]) |
60 and className not in bases |
60 and className not in bases |
61 ): |
61 ): |
80 """ |
80 """ |
81 from eric7.QScintilla.Editor import Editor |
81 from eric7.QScintilla.Editor import Editor |
82 |
82 |
83 moduleNameStr = "{0}".format(self.moduleName) |
83 moduleNameStr = "{0}".format(self.moduleName) |
84 |
84 |
85 for globalName in sorted(self.module.globals.keys()): |
85 for globalName in sorted(self.module.globals): |
86 if not self.__isPrivate(self.module.globals[globalName]): |
86 if not self.__isPrivate(self.module.globals[globalName]): |
87 if self.module.globals[globalName].isPublic(): |
87 if self.module.globals[globalName].isPublic(): |
88 iconId = Editor.AttributeID |
88 iconId = Editor.AttributeID |
89 elif self.module.globals[globalName].isProtected(): |
89 elif self.module.globals[globalName].isProtected(): |
90 iconId = Editor.AttributeProtectedID |
90 iconId = Editor.AttributeProtectedID |
96 |
96 |
97 def __addClassesAPI(self): |
97 def __addClassesAPI(self): |
98 """ |
98 """ |
99 Private method to generate the api section for classes. |
99 Private method to generate the api section for classes. |
100 """ |
100 """ |
101 classNames = sorted(self.module.classes.keys()) |
101 classNames = sorted(self.module.classes) |
102 for className in classNames: |
102 for className in classNames: |
103 if not self.__isPrivate(self.module.classes[className]): |
103 if not self.__isPrivate(self.module.classes[className]): |
104 self.__addClassVariablesAPI(className) |
104 self.__addClassVariablesAPI(className) |
105 self.__addMethodsAPI(className) |
105 self.__addMethodsAPI(className) |
106 |
106 |
111 @param className name of the class containing the method (string) |
111 @param className name of the class containing the method (string) |
112 """ |
112 """ |
113 from eric7.QScintilla.Editor import Editor |
113 from eric7.QScintilla.Editor import Editor |
114 |
114 |
115 _class = self.module.classes[className] |
115 _class = self.module.classes[className] |
116 methods = sorted(_class.methods.keys()) |
116 methods = sorted(_class.methods) |
117 if "__init__" in methods: |
117 if "__init__" in methods: |
118 methods.remove("__init__") |
118 methods.remove("__init__") |
119 if _class.isPublic(): |
119 if _class.isPublic(): |
120 iconId = Editor.ClassID |
120 iconId = Editor.ClassID |
121 elif _class.isProtected(): |
121 elif _class.isProtected(): |
158 """ |
158 """ |
159 from eric7.QScintilla.Editor import Editor |
159 from eric7.QScintilla.Editor import Editor |
160 |
160 |
161 _class = self.module.classes[className] |
161 _class = self.module.classes[className] |
162 classNameStr = "{0}{1}.".format(self.moduleName, className) |
162 classNameStr = "{0}{1}.".format(self.moduleName, className) |
163 for variable in sorted(_class.globals.keys()): |
163 for variable in sorted(_class.globals): |
164 if not self.__isPrivate(_class.globals[variable]): |
164 if not self.__isPrivate(_class.globals[variable]): |
165 if _class.globals[variable].isPublic(): |
165 if _class.globals[variable].isPublic(): |
166 iconId = Editor.AttributeID |
166 iconId = Editor.AttributeID |
167 elif _class.globals[variable].isProtected(): |
167 elif _class.globals[variable].isProtected(): |
168 iconId = Editor.AttributeProtectedID |
168 iconId = Editor.AttributeProtectedID |
174 """ |
174 """ |
175 Private method to generate the api section for functions. |
175 Private method to generate the api section for functions. |
176 """ |
176 """ |
177 from eric7.QScintilla.Editor import Editor |
177 from eric7.QScintilla.Editor import Editor |
178 |
178 |
179 funcNames = sorted(self.module.functions.keys()) |
179 funcNames = sorted(self.module.functions) |
180 for funcName in funcNames: |
180 for funcName in funcNames: |
181 if not self.__isPrivate(self.module.functions[funcName]): |
181 if not self.__isPrivate(self.module.functions[funcName]): |
182 if self.module.functions[funcName].isPublic(): |
182 if self.module.functions[funcName].isPublic(): |
183 iconId = Editor.MethodID |
183 iconId = Editor.MethodID |
184 elif self.module.functions[funcName].isProtected(): |
184 elif self.module.functions[funcName].isProtected(): |