Sat, 23 Feb 2013 15:07:44 +0100
Modified the code to do lazy import.
--- a/AssistantEric/APIsManager.py Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/APIsManager.py Sat Feb 23 15:07:44 2013 +0100 @@ -20,10 +20,7 @@ from E5Gui.E5Application import e5App import QScintilla.Lexers -from QScintilla.Editor import Editor -from DocumentationTools.APIGenerator import APIGenerator -import Utilities.ModuleParser import Utilities import Preferences @@ -164,6 +161,7 @@ classNameStr = "{0}{1}.".format(moduleName, className) for variable in sorted(_class.attributes.keys()): if not _class.attributes[variable].isPrivate(): + from QScintilla.Editor import Editor if _class.attributes[variable].isPublic(): id = Editor.AttributeID elif _class.attributes[variable].isProtected(): @@ -183,6 +181,7 @@ bases = [] if self.__language == ApisNameProject: + import Utilities.ModuleParser try: module = Utilities.ModuleParser.readModule( os.path.join(self.__projectPath, apiFile), @@ -190,6 +189,7 @@ caching=False) language = module.getType() if language: + from DocumentationTools.APIGenerator import APIGenerator apiGenerator = APIGenerator(module) apis = apiGenerator.genAPI(True, "", True) if os.path.basename(apiFile).startswith("Ui_"):
--- a/AssistantEric/Assistant.py Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Assistant.py Sat Feb 23 15:07:44 2013 +0100 @@ -17,10 +17,7 @@ from .APIsManager import APIsManager, ApisNameProject -from QScintilla.Editor import Editor - import Preferences -from Utilities.ModuleParser import Module AcsAPIs = 0x0001 AcsDocument = 0x0002 @@ -54,6 +51,7 @@ self.__lastContext = None self.__lastFullContext = None + from QScintilla.Editor import Editor self.__fromDocumentID = Editor.FromDocumentID def activate(self): @@ -309,6 +307,7 @@ col -= 1 prefix = editor.getWordLeft(line, col) if editor.isPy2File() or editor.isPy3File(): + from Utilities.ModuleParser import Module src = editor.text() fn = editor.getFileName() if fn is None: @@ -508,6 +507,8 @@ prefixFound = False if prefix and module: + from QScintilla.Editor import Editor + line, col = editor.getCursorPosition() if prefix in ["cls", "self"]: prefixFound = True @@ -715,6 +716,7 @@ col -= 1 prefix = editor.getWordLeft(line, col) if editor.isPy2File() or editor.isPy3File(): + from Utilities.ModuleParser import Module src = editor.text() fn = editor.getFileName() if fn is None:
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.APIsManager.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.APIsManager.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Plugin_Assistant_Eric.AssistantEric.APIsManager</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.Assistant.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.Assistant.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Plugin_Assistant_Eric.AssistantEric.Assistant</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.AutoCompletionEricPage.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.AutoCompletionEricPage.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.AutoCompletionEricPage</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.CallTipsEricPage.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.CallTipsEricPage.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.CallTipsEricPage</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.PluginAssistantEric.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.PluginAssistantEric.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Plugin_Assistant_Eric.PluginAssistantEric</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.AssistantEric.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.AssistantEric.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Plugin_Assistant_Eric.AssistantEric</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Plugin_Assistant_Eric</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/AssistantEric/Documentation/source/index.html Wed Jan 02 10:52:45 2013 +0100 +++ b/AssistantEric/Documentation/source/index.html Sat Feb 23 15:07:44 2013 +0100 @@ -1,8 +1,7 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<!DOCTYPE html> <html><head> <title>Table of contents</title> +<meta charset="UTF-8"> <style> body { background: #EDECE6;
--- a/ChangeLog Wed Jan 02 10:52:45 2013 +0100 +++ b/ChangeLog Sat Feb 23 15:07:44 2013 +0100 @@ -1,5 +1,9 @@ ChangeLog --------- +Version 2.4.0: +- bug fixes +- modified code to do lazy import + Version 2.3.2: - bug fixes - little enhancement for the Python2 and Python3 support
--- a/PluginAssistantEric.py Wed Jan 02 10:52:45 2013 +0100 +++ b/PluginAssistantEric.py Sat Feb 23 15:07:44 2013 +0100 @@ -23,7 +23,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "2.3.2" +version = "2.4.0" className = "AssistantEricPlugin" packageName = "AssistantEric" shortDescription = "Alternative autocompletion and calltips provider."