Sun, 17 Jan 2010 19:22:18 +0000
First commit after porting to Python3.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/APIsManager.py Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,866 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2008 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing the APIsManager. +""" + +import os + +from PyQt4.QtCore import * +from PyQt4.QtSql import QSqlDatabase, QSqlQuery + +from E5Gui.E5Application import e5App + +import QScintilla.Lexers + +from DocumentationTools.APIGenerator import APIGenerator +import Utilities.ModuleParser +import Utilities +import Preferences + +WorkerStarted = QEvent.User + 2001 +WorkerFinished = QEvent.User + 2002 +WorkerAborted = QEvent.User + 2003 + +ApisNameProject = "__Project__" + +class DbAPIsWorker(QThread): + """ + Class implementing a worker thread to prepare the API database. + """ + populate_api_stmt = """ + INSERT INTO api (acWord, context, fullContext, signature, fileId, pictureId) + VALUES (:acWord, :context, :fullContext, :signature, :fileId, :pictureId) + """ + populate_del_api_stmt = """ + DELETE FROM api WHERE fileId = :fileId + """ + populate_file_stmt = """ + INSERT INTO file (file) VALUES (:file) + """ + update_file_stmt = """ + UPDATE file SET lastRead = :lastRead WHERE file = :file + """ + + file_loaded_stmt = """ + SELECT lastRead from file WHERE file = :file + """ + file_id_stmt = """ + SELECT id FROM file WHERE file = :file + """ + file_delete_id_stmt = """ + DELETE FROM file WHERE id = :id + """ + + def __init__(self, proxy, language, apiFiles, projectPath = ""): + """ + Constructor + + @param proxy reference to the object that is proxied (DbAPIs) + @param language language of the APIs object (string) + @param apiFiles list of API files to process (list of strings) + @param projectPath path of the project. Only needed, if the APIs + are extracted out of the sources of a project. (string) + """ + QThread.__init__(self) + + self.setTerminationEnabled(True) + + # Get the AC word separators for all of the languages that the editor supports. + # This has to be before we create a new thread, because access to GUI elements + # is not allowed from non-gui threads. + self.__wseps = {} + for lang in QScintilla.Lexers.getSupportedLanguages(): + lexer = QScintilla.Lexers.getLexer(lang) + if lexer is not None: + self.__wseps[lang] = lexer.autoCompletionWordSeparators() + + self.__proxy = proxy + self.__language = language + self.__apiFiles = apiFiles[:] + self.__aborted = False + self.__projectPath = projectPath + + def __autoCompletionWordSeparators(self, language): + """ + Private method to get the word separator characters for a language. + + @param language language of the APIs object (string) + @return word separator characters (list of strings) + """ + return self.__wseps.get(language, None) + + def abort(self): + """ + Public method to ask the thread to stop. + """ + self.__aborted = True + + def __loadApiFileIfNewer(self, apiFile): + """ + Private method to load an API file, if it is newer than the one read + into the database. + + @param apiFile filename of the raw API file (string) + """ + db = QSqlDatabase.database(self.__language) + db.transaction() + try: + query = QSqlQuery(db) + query.prepare(self.file_loaded_stmt) + query.bindValue(":file", apiFile) + query.exec_() + if query.next() and query.isValid(): + loadTime = QDateTime.fromString(query.value(0), Qt.ISODate) + else: + loadTime = QDateTime(1970, 1, 1, 0, 0) + del query + finally: + db.commit() + if self.__projectPath: + modTime = QFileInfo(os.path.join(self.__projectPath, apiFile)).lastModified() + else: + modTime = QFileInfo(apiFile).lastModified() + if loadTime < modTime: + self.__loadApiFile(apiFile) + + def __loadApiFile(self, apiFile): + """ + Private method to read a raw API file into the database. + + @param apiFile filename of the raw API file (string) + """ + if self.__language == ApisNameProject: + try: + module = Utilities.ModuleParser.readModule( + os.path.join(self.__projectPath, apiFile), + basename = self.__projectPath + os.sep, + caching = False) + language = module.getType() + if language: + apiGenerator = APIGenerator(module) + apis = apiGenerator.genAPI(True, "", True) + else: + apis = [] + except (IOError, ImportError): + apis = [] + else: + try: + apis = Utilities.readEncodedFile(apiFile)[0].splitlines(True) + except (IOError, UnicodeError): + apis = [] + language = None + + if len(apis) > 0: + self.__storeApis(apis, apiFile, language) + + def __storeApis(self, apis, apiFile, language): + """ + Private method to put the API entries into the database. + + @param apis list of api entries (list of strings) + @param apiFile filename of the file read to get the APIs (string) + @param language programming language of the file of the APIs (string) + """ + if language: + wseps = self.__autoCompletionWordSeparators(language) + else: + wseps = self.__proxy.autoCompletionWordSeparators() + if wseps is None: + return + + db = QSqlDatabase.database(self.__language) + db.transaction() + try: + query = QSqlQuery(db) + # step 1: create entry in file table and get the ID + query.prepare(self.populate_file_stmt) + query.bindValue(":file", apiFile) + query.exec_() + query.prepare(self.file_id_stmt) + query.bindValue(":file", apiFile) + query.exec_() + query.next() + id = int(query.value(0)) + + # step 2: delete all entries belonging to this file + query.prepare(self.populate_del_api_stmt) + query.bindValue(":fileId", id) + query.exec_() + + # step 3: load the given api file + query.prepare(self.populate_api_stmt) + for api in apis: + if self.__aborted: + break + + api = api.strip() + if len(api) == 0: + continue + + b = api.find('(') + if b == -1: + path = api + sig = "" + else: + path = api[:b] + sig = api[b:] + + while len(path) > 0: + acWord = "" + context = "" + fullContext = "" + pictureId = "" + + # search for word separators + index = len(path) + while index > 0: + index -= 1 + found = False + for wsep in wseps: + if path[:index].endswith(wsep): + found = True + break + if found: + if acWord == "": + # completion found + acWord = path[index:] + path = path[:(index - len(wsep))] + index = len(path) + fullContext = path + context = path + try: + acWord, pictureId = acWord.split("?", 1) + except ValueError: + pass + else: + context = path[index:] + break + # none found? + if acWord == "": + acWord = path + path = "" + + query.bindValue(":acWord", acWord) + query.bindValue(":context", context) + query.bindValue(":fullContext", fullContext) + query.bindValue(":signature", sig) + query.bindValue(":fileId", id) + query.bindValue(":pictureId", pictureId) + query.exec_() + + sig = "" + + if not self.__aborted: + # step 4: update the file entry + query.prepare(self.update_file_stmt) + query.bindValue(":lastRead", QDateTime.currentDateTime()) + query.bindValue(":file", apiFile) + query.exec_() + finally: + del query + if self.__aborted: + db.rollback() + else: + db.commit() + + def __deleteApiFile(self, apiFile): + """ + Private method to delete all references to an api file. + + @param apiFile filename of the raw API file (string) + """ + db = QSqlDatabase.database(self.__language) + db.transaction() + try: + query = QSqlQuery(db) + + # step 1: get the ID belonging to the api file + query.prepare(self.file_id_stmt) + query.bindValue(":file", apiFile) + query.exec_() + query.next() + id = int(query.value(0)) + + # step 2: delete all api entries belonging to this file + query.prepare(self.populate_del_api_stmt) + query.bindValue(":fileId", id) + query.exec_() + + # step 3: delete the file entry + query.prepare(self.file_delete_id_stmt) + query.bindValue(":id", id) + query.exec_() + finally: + del query + db.commit() + + def run(self): + """ + Public method to perform the threads work. + """ + QCoreApplication.postEvent(self.__proxy, QEvent(QEvent.Type(WorkerStarted))) + + db = QSqlDatabase.database(self.__language) + if db.isValid() and db.isOpen(): + # step 1: remove API files not wanted any longer + loadedApiFiles = self.__proxy.getApiFiles() + for apiFile in loadedApiFiles: + if not self.__aborted and apiFile not in self.__apiFiles: + self.__deleteApiFile(apiFile) + + # step 2: (re-)load api files + for apiFile in self.__apiFiles: + if not self.__aborted: + self.__loadApiFileIfNewer(apiFile) + + if self.__aborted: + QCoreApplication.postEvent(self.__proxy, QEvent(QEvent.Type(WorkerAborted))) + else: + QCoreApplication.postEvent(self.__proxy, QEvent(QEvent.Type(WorkerFinished))) + +class DbAPIs(QObject): + """ + Class implementing an API storage entity. + + @signal apiPreparationFinished() emitted after the API preparation has finished + @signal apiPreparationStarted() emitted after the API preparation has started + @signal apiPreparationCancelled() emitted after the API preparation has been + cancelled + """ + DB_VERSION = 3 + + create_mgmt_stmt = """ + CREATE TABLE mgmt + (format INTEGER) + """ + drop_mgmt_stmt = """DROP TABLE IF EXISTS mgmt""" + + create_api_stmt = """ + CREATE TABLE api + (acWord TEXT, + context TEXT, + fullContext TEXT, + signature TEXT, + fileId INTEGER, + pictureId INTEGER, + UNIQUE(acWord, fullContext, signature) ON CONFLICT IGNORE + ) + """ + drop_api_stmt = """DROP TABLE IF EXISTS api""" + + create_file_stmt = """ + CREATE TABLE file + (id INTEGER PRIMARY KEY AUTOINCREMENT, + file TEXT UNIQUE ON CONFLICT IGNORE, + lastRead TIMESTAMP DEFAULT CURRENT_TIMESTAMP + ) + """ + drop_file_stmt = """DROP TABLE IF EXISTS file""" + + create_acWord_idx = """CREATE INDEX acWord_idx on api (acWord)""" + drop_acWord_idx = """DROP INDEX IF EXISTS acWord_idx""" + + create_context_idx = """CREATE INDEX context_idx on api (context)""" + drop_context_idx = """DROP INDEX IF EXISTS context_idx""" + + create_fullContext_idx = """CREATE INDEX fullContext_idx on api (fullContext)""" + drop_fullContext_idx = """DROP INDEX IF EXISTS fullContext_idx""" + + create_file_idx = """CREATE INDEX file_idx on file (file)""" + drop_file_idx = """DROP INDEX IF EXISTS file_idx""" + + api_files_stmt = """ + SELECT file FROM file WHERE file LIKE '%.api' + """ + + ac_stmt = """ + SELECT DISTINCT acWord, fullContext, pictureId FROM api + WHERE acWord GLOB :acWord + ORDER BY acWord + """ + ac_context_stmt = """ + SELECT DISTINCT acWord, fullContext, pictureId FROM api + WHERE context = :context + ORDER BY acWord + """ + ct_stmt = """ + SELECT DISTINCT acWord, signature, fullContext FROM api + WHERE acWord = :acWord + """ + ct_context_stmt = """ + SELECT DISTINCT acWord, signature, fullContext FROM api + WHERE acWord = :acWord + AND context = :context + """ + ct_fullContext_stmt = """ + SELECT DISTINCT acWord, signature, fullContext FROM api + WHERE acWord = :acWord + AND fullContext = :fullContext + """ + format_select_stmt = """ + SELECT format FROM mgmt + """ + mgmt_insert_stmt = """ + INSERT INTO mgmt (format) VALUES (%d) + """ % DB_VERSION + + def __init__(self, language, parent = None): + """ + Constructor + + @param language language of the APIs object (string) + @param parent reference to the parent object (QObject) + """ + QObject.__init__(self, parent) + self.setObjectName("DbAPIs_%s" % language) + + self.__inPreparation = False + self.__worker = None + self.__workerQueue = [] + + self.__language = language + if self.__language == ApisNameProject: + self.__initAsProject() + else: + self.__initAsLanguage() + + def __initAsProject(self): + """ + Private method to initialize as a project API object. + """ + self.__lexer = None + + self.__project = e5App().getObject("Project") + self.connect(self.__project, SIGNAL("projectOpened"), self.__projectOpened) + self.connect(self.__project, SIGNAL("newProject"), self.__projectOpened) + self.connect(self.__project, SIGNAL("projectClosed"), self.__projectClosed) + if self.__project.isOpen(): + self.__projectOpened() + + def __initAsLanguage(self): + """ + Private method to initialize as a language API object. + """ + if self.__language in ["Python", "Python3"]: + self.__discardFirst = "self" + else: + self.__discardFirst = "" + self.__lexer = QScintilla.Lexers.getLexer(self.__language) + self.__apifiles = Preferences.getEditorAPI(self.__language) + self.__apifiles.sort() + if self.__lexer is not None: + self.__openAPIs() + + def _apiDbName(self): + """ + Protected method to determine the name of the database file. + + @return name of the database file (string) + """ + if self.__language == ApisNameProject: + return os.path.join(self.__project.getProjectManagementDir(), + "project-apis.db") + else: + return os.path.join(Utilities.getConfigDir(), "%s-api.db" % self.__language) + + def close(self): + """ + Public method to close the database. + """ + self.__workerQueue = [] + if self.__worker is not None: + self.__worker.abort() + if self.__worker is not None: + self.__worker.wait(5000) + if self.__worker is not None and \ + not self.__worker.isFinished(): + self.__worker.terminate() + if self.__worker is not None: + self.__worker.wait(5000) + + QSqlDatabase.database(self.__language).close() + QSqlDatabase.removeDatabase(self.__language) + + def __openApiDb(self): + """ + Private method to open the API database. + """ + db = QSqlDatabase.database(self.__language, False) + if not db.isValid(): + # the database connection is a new one + db = QSqlDatabase.addDatabase("QSQLITE", self.__language) + db.setDatabaseName(self._apiDbName()) + db.open() + + def __createApiDB(self): + """ + Private method to create an API database. + """ + db = QSqlDatabase.database(self.__language) + db.transaction() + try: + query = QSqlQuery(db) + # step 1: drop old tables + query.exec_(self.drop_mgmt_stmt) + query.exec_(self.drop_api_stmt) + query.exec_(self.drop_file_stmt) + # step 2: drop old indices + query.exec_(self.drop_acWord_idx) + query.exec_(self.drop_context_idx) + query.exec_(self.drop_fullContext_idx) + query.exec_(self.drop_file_idx) + # step 3: create tables + query.exec_(self.create_api_stmt) + query.exec_(self.create_file_stmt) + query.exec_(self.create_mgmt_stmt) + query.exec_(self.mgmt_insert_stmt) + # step 4: create indices + query.exec_(self.create_acWord_idx) + query.exec_(self.create_context_idx) + query.exec_(self.create_fullContext_idx) + query.exec_(self.create_file_idx) + finally: + del query + db.commit() + + def getApiFiles(self): + """ + Public method to get a list of API files loaded into the database. + + @return list of API filenames (list of strings) + """ + apiFiles = [] + + db = QSqlDatabase.database(self.__language) + db.transaction() + try: + query = QSqlQuery(db) + query.exec_(self.api_files_stmt) + while query.next(): + apiFiles.append(query.value(0)) + finally: + del query + db.commit() + + return apiFiles + + def __isPrepared(self): + """ + Private method to check, if the database has been prepared. + + @return flag indicating the prepared status (boolean) + """ + db = QSqlDatabase.database(self.__language) + prepared = len(db.tables()) > 0 + if prepared: + db.transaction() + prepared = False + try: + query = QSqlQuery(db) + ok = query.exec_(self.format_select_stmt) + if ok: + query.next() + format = int(query.value(0)) + if format >= self.DB_VERSION: + prepared = True + finally: + del query + db.commit() + return prepared + + def getCompletions(self, start = None, context = None): + """ + Public method to determine the possible completions. + + @keyparam start string giving the start of the word to be + completed (string) + @keyparam context string giving the context (e.g. classname) + to be completed (string) + @return list of dictionaries with possible completions (key 'completion' + contains the completion (string), key 'context' + contains the context (string) and key 'pictureId' + contains the ID of the icon to be shown (string)) + """ + completions = [] + + db = QSqlDatabase.database(self.__language) + if db.isOpen() and not self.__inPreparation: + db.transaction() + try: + query = None + + if start is not None: + query = QSqlQuery(db) + query.prepare(self.ac_stmt) + query.bindValue(":acWord", start + '*') + elif context is not None: + query = QSqlQuery(db) + query.prepare(self.ac_context_stmt) + query.bindValue(":context", context) + + if query is not None: + query.exec_() + while query.next(): + completions.append({"completion" : query.value(0), + "context" : query.value(1), + "pictureId" : query.value(2)}) + del query + finally: + db.commit() + + return completions + + def getCalltips(self, acWord, commas, context = None, fullContext = None, + showContext = True): + """ + Public method to determine the calltips. + + @param acWord function to get calltips for (string) + @param commas minimum number of commas contained in the calltip (integer) + @param context string giving the context (e.g. classname) (string) + @param fullContext string giving the full context (string) + @param showContext flag indicating to show the calltip context (boolean) + @return list of calltips (list of string) + """ + calltips = [] + + db = QSqlDatabase.database(self.__language) + if db.isOpen() and not self.__inPreparation: + if self.autoCompletionWordSeparators(): + contextSeparator = self.autoCompletionWordSeparators()[0] + else: + contextSeparator = " " + db.transaction() + try: + query = QSqlQuery(db) + if fullContext: + query.prepare(self.ct_fullContext_stmt) + query.bindValue(":fullContext", fullContext) + elif context: + query.prepare(self.ct_context_stmt) + query.bindValue(":context", context) + else: + query.prepare(self.ct_stmt) + query.bindValue(":acWord", acWord) + query.exec_() + while query.next(): + word = query.value(0) + sig = query.value(1) + fullCtx = query.value(2) + if sig: + if self.__discardFirst: + sig = "(%s" % sig[1:]\ + .replace(self.__discardFirst, "", 1)\ + .strip(", \t\r\n") + if self.__enoughCommas(sig, commas): + if showContext: + calltips.append("%s%s%s%s" % \ + (fullCtx, contextSeparator, word, sig)) + else: + calltips.append("%s%s" % (word, sig)) + del query + finally: + db.commit() + + if context and len(calltips) == 0: + # nothing found, try without a context + calltips = self.getCalltips(acWord, commas, showContext = showContext) + + return calltips + + def __enoughCommas(self, s, commas): + """ + Private method to determine, if the given string contains enough commas. + + @param s string to check (string) + @param commas number of commas to check for (integer) + @return flag indicating, that there are enough commas (boolean) + """ + end = s.find(')') + + if end < 0: + return False + + w = s[:end] + return w.count(',') >= commas + + def __openAPIs(self): + """ + Private method to open the API database. + """ + self.__openApiDb() + if not self.__isPrepared(): + self.__createApiDB() + + # prepare the database if neccessary + self.prepareAPIs() + + def prepareAPIs(self, rawList = None): + """ + Public method to prepare the APIs if neccessary. + + @keyparam rawList list of raw API files (list of strings) + """ + if self.__inPreparation: + return + + projectPath = "" + if rawList: + apiFiles = rawList[:] + elif self.__language == ApisNameProject: + apiFiles = self.__project.getSources() + projectPath = self.__project.getProjectPath() + else: + apiFiles = Preferences.getEditorAPI(self.__language) + self.__worker = DbAPIsWorker(self, self.__language, apiFiles, projectPath) + self.__worker.start() + + def __processQueue(self): + """ + Private slot to process the queue of files to load. + """ + if self.__worker is not None and self.__worker.isFinished(): + self.__worker = None + + if self.__worker is None and len(self.__workerQueue) > 0: + apiFiles = [self.__workerQueue.pop(0)] + if self.__language == ApisNameProject: + projectPath = self.__project.getProjectPath() + apiFiles = [apiFiles[0].replace(projectPath + os.sep, "")] + else: + projectPath = "" + self.__worker = DbAPIsWorker(self, self.__language, apiFiles, projectPath) + self.__worker.start() + + def getLexer(self): + """ + Public method to return a reference to our lexer object. + + @return reference to the lexer object (QScintilla.Lexers.Lexer) + """ + return self.__lexer + + def autoCompletionWordSeparators(self): + """ + Private method to get the word separator characters. + + @return word separator characters (list of strings) + """ + if self.__lexer: + return self.__lexer.autoCompletionWordSeparators() + return None + + def event(self, evt): + """ + Protected method to handle events from the worker thread. + + @param evt reference to the event object (QEvent) + @return flag indicating, if the event was handled (boolean) + """ + if evt.type() == WorkerStarted: + self.__inPreparation = True + self.emit(SIGNAL('apiPreparationStarted()')) + return True + + elif evt.type() == WorkerFinished: + self.__inPreparation = False + self.emit(SIGNAL('apiPreparationFinished()')) + QTimer.singleShot(0, self.__processQueue) + return True + + elif evt.type() == WorkerAborted: + self.__inPreparation = False + self.emit(SIGNAL('apiPreparationCancelled()')) + QTimer.singleShot(0, self.__processQueue) + return True + + else: + return QObject.event(self, evt) + + ######################################################## + ## project related stuff below + ######################################################## + + def __projectOpened(self): + """ + Private slot to perform actions after a project has been opened. + """ + if self.__project.getProjectLanguage() in ["Python", "Python3"]: + self.__discardFirst = "self" + else: + self.__discardFirst = "" + self.__lexer = QScintilla.Lexers.getLexer(self.__project.getProjectLanguage()) + self.__openAPIs() + + def __projectClosed(self): + """ + Private slot to perform actions after a project has been closed. + """ + self.close() + + def editorSaved(self, filename): + """ + Public slot to handle the editorSaved signal. + + @param filename name of the file that was saved (string) + """ + if self.__project.isProjectSource(filename): + self.__workerQueue.append(filename) + self.__processQueue() + +class APIsManager(QObject): + """ + Class implementing the APIsManager class, which is the central store for + API information used by autocompletion and calltips. + """ + def __init__(self, parent = None): + """ + Constructor + + @param parent reference to the parent object (QObject) + """ + QObject.__init__(self, parent) + self.setObjectName("APIsManager") + + # initialize the apis dictionary + self.__apis = {} + + def reloadAPIs(self): + """ + Public slot to reload the api information. + """ + for api in list(self.__apis.values()): + api and api.prepareAPIs() + + def getAPIs(self, language): + """ + Public method to get an apis object for autocompletion/calltips. + + This method creates and loads an APIs object dynamically upon request. + This saves memory for languages, that might not be needed at the moment. + + @param language the language of the requested api object (string) + @return the apis object (APIs) + """ + try: + return self.__apis[language] + except KeyError: + if language in QScintilla.Lexers.getSupportedLanguages() or \ + language == ApisNameProject: + # create the api object + self.__apis[language] = DbAPIs(language) + return self.__apis[language] + else: + return None + + def deactivate(self): + """ + Public method to perform actions upon deactivation. + """ + for apiLang in self.__apis: + self.__apis[apiLang].close() + self.__apis[apiLang] = None
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Assistant.py Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,461 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2008 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing the eric assistant, an alternative autocompletion and +calltips system. +""" + +from PyQt4.QtCore import * +from PyQt4.Qsci import QsciScintilla + +from E5Gui.E5Application import e5App + +from .APIsManager import APIsManager, ApisNameProject + +from QScintilla.Editor import Editor + +import Preferences + +AcsAPIs = 0x0001 +AcsDocument = 0x0002 +AcsProject = 0x0004 +AcsOther = 0x1000 + +class Assistant(QObject): + """ + Class implementing the autocompletion and calltips system. + """ + def __init__(self, plugin, parent = None): + """ + Constructor + + @param plugin reference to the plugin object + @param parent parent (QObject) + """ + QObject.__init__(self, parent) + + self.__plugin = plugin + self.__ui = parent + self.__project = e5App().getObject("Project") + self.__viewmanager = e5App().getObject("ViewManager") + self.__pluginManager = e5App().getObject("PluginManager") + + self.__apisManager = APIsManager(self) + + self.__editors = [] + self.__completingContext = False + self.__lastContext = None + self.__lastFullContext = None + + self.__fromDocumentID = Editor.FromDocumentID + + def activate(self): + """ + Public method to perform actions upon activation. + """ + self.connect(self.__pluginManager, SIGNAL("shutdown()"), + self.__shutdown) + + self.connect(self.__ui, SIGNAL('preferencesChanged'), + self.__preferencesChanged) + + self.connect(self.__viewmanager, SIGNAL("editorOpenedEd"), + self.__editorOpened) + self.connect(self.__viewmanager, SIGNAL("editorClosedEd"), + self.__editorClosed) + + # preload the project APIs object + self.__apisManager.getAPIs(ApisNameProject) + + for editor in self.__viewmanager.getOpenEditors(): + self.__editorOpened(editor) + + def deactivate(self): + """ + Public method to perform actions upon deactivation. + """ + self.disconnect(self.__pluginManager, SIGNAL("shutdown()"), + self.__shutdown) + + self.disconnect(self.__ui, SIGNAL('preferencesChanged'), + self.__preferencesChanged) + + self.disconnect(self.__viewmanager, SIGNAL("editorOpenedEd"), + self.__editorOpened) + self.disconnect(self.__viewmanager, SIGNAL("editorClosedEd"), + self.__editorClosed) + + self.__shutdown() + + def __shutdown(self): + """ + Private slot to handle the shutdown signal. + """ + for editor in self.__editors[:]: + self.__editorClosed(editor) + + self.__apisManager.deactivate() + + def setEnabled(self, key, enabled): + """ + Public method to enable or disable a feature. + + @param key feature to set (string) + @param enabled flag indicating the status (boolean) + """ + for editor in self.__editors[:]: + self.__editorClosed(editor) + if enabled: + for editor in self.__viewmanager.getOpenEditors(): + self.__editorOpened(editor) + + def __editorOpened(self, editor): + """ + Private slot called, when a new editor was opened. + + @param editor reference to the new editor (QScintilla.Editor) + """ + if self.__plugin.getPreferences("AutoCompletionEnabled"): + self.__setAutoCompletionHook(editor) + if self.__plugin.getPreferences("CalltipsEnabled"): + self.__setCalltipsHook(editor) + self.connect(editor, SIGNAL("editorSaved"), + self.__apisManager.getAPIs(ApisNameProject).editorSaved) + self.__editors.append(editor) + + # preload the api to give the manager a chance to prepare the database + language = editor.getLanguage() + if language == "": + return + self.__apisManager.getAPIs(language) + + def __editorClosed(self, editor): + """ + Private slot called, when an editor was closed. + + @param editor reference to the editor (QScintilla.Editor) + """ + if editor in self.__editors: + self.disconnect(editor, SIGNAL("editorSaved"), + self.__apisManager.getAPIs(ApisNameProject).editorSaved) + self.__editors.remove(editor) + if editor.autoCompletionHook() == self.autocomplete: + self.__unsetAutoCompletionHook(editor) + if editor.callTipHook() == self.calltips: + self.__unsetCalltipsHook(editor) + + def __preferencesChanged(self): + """ + Private method to handle a change of the global configuration. + """ + self.__apisManager.reloadAPIs() + + def __getCharacter(self, pos, editor): + """ + Private method to get the character to the left of the current position + in the current line. + + @param pos position to get character at (integer) + @param editor reference to the editor object to work with (QScintilla.Editor) + @return requested character or "", if there are no more (string) and + the next position (i.e. pos - 1) + """ + if pos <= 0: + return "", pos + + pos -= 1 + ch = editor.charAt(pos) + + # Don't go past the end of the previous line + if ch == '\n' or ch == '\r': + return "", pos + + return ch, pos + + ################################# + ## autocompletion methods below + ################################# + + def __completionListSelected(self, id, txt): + """ + Private slot to handle the selection from the completion list. + + @param id the ID of the user list (should be 1) (integer) + @param txt the selected text (string) + """ + from QScintilla.Editor import EditorAutoCompletionListID + + editor = self.sender() + if id == EditorAutoCompletionListID: + lst = txt.split() + if len(lst) > 1: + txt = lst[0] + self.__lastFullContext = lst[1][1:].split(")")[0] + else: + self.__lastFullContext = None + + if Preferences.getEditor("AutoCompletionReplaceWord"): + editor.selectCurrentWord() + editor.removeSelectedText() + line, col = editor.getCursorPosition() + else: + line, col = editor.getCursorPosition() + wLeft = editor.getWordLeft(line, col) + if not txt.startswith(wLeft): + editor.selectCurrentWord() + editor.removeSelectedText() + line, col = editor.getCursorPosition() + elif wLeft: + txt = txt[len(wLeft):] + editor.insert(txt) + editor.setCursorPosition(line, col + len(txt)) + + def __setAutoCompletionHook(self, editor): + """ + Private method to set the autocompletion hook. + + @param editor reference to the editor (QScintilla.Editor) + """ + self.connect(editor, SIGNAL('userListActivated(int, const QString)'), + self.__completionListSelected) + editor.setAutoCompletionHook(self.autocomplete) + + def __unsetAutoCompletionHook(self, editor): + """ + Private method to unset the autocompletion hook. + + @param editor reference to the editor (QScintilla.Editor) + """ + editor.unsetAutoCompletionHook() + self.disconnect(editor, SIGNAL('userListActivated(int, const QString)'), + self.__completionListSelected) + + def autocomplete(self, editor, context): + """ + Public method to determine the autocompletion proposals. + + @param editor reference to the editor object, that called this method + (QScintilla.Editor) + @param context flag indicating to autocomplete a context (boolean) + """ + from QScintilla.Editor import EditorAutoCompletionListID + + if editor.isListActive(): + editor.cancelList() + + language = editor.getLanguage() + if language == "": + return + + line, col = editor.getCursorPosition() + self.__completingContext = context + apiCompletionsList = [] + docCompletionsList = [] + projectCompletionList = [] + sep = "" + if context: + wc = editor.wordCharacters() + text = editor.text(line) + + beg = text[:col] + for wsep in editor.getLexer().autoCompletionWordSeparators(): + if beg.endswith(wsep): + sep = wsep + break + + depth = 0 + while col > 0 and text[col - 1] not in wc: + ch = text[col - 1] + if ch == ')': + depth = 1 + + # ignore everything back to the start of the + # corresponding parenthesis + col -= 1 + while col > 0: + ch = text[col - 1] + if ch == ')': + depth += 1 + elif ch == '(': + depth -= 1 + if depth == 0: + break + col -= 1 + elif ch == '(': + break + col -= 1 + + word = editor.getWordLeft(line, col) + if context: + self.__lastContext = word + else: + self.__lastContext = None + + if word: + if self.__plugin.getPreferences("AutoCompletionSource") & AcsAPIs: + api = self.__apisManager.getAPIs(language) + apiCompletionsList = self.__getApiCompletions(api, word, context) + + if self.__plugin.getPreferences("AutoCompletionSource") & AcsProject: + api = self.__apisManager.getAPIs(ApisNameProject) + projectCompletionList = self.__getApiCompletions(api, word, context) + + if self.__plugin.getPreferences("AutoCompletionSource") & AcsDocument: + docCompletionsList = \ + self.getCompletionsFromDocument(editor, word, context, sep) + + completionsList = list( + set(apiCompletionsList) + .union(set(docCompletionsList)) + .union(set(projectCompletionList)) + ) + + if len(completionsList) > 0: + completionsList.sort() + editor.showUserList(EditorAutoCompletionListID, completionsList) + + def __getApiCompletions(self, api, word, context): + """ + Private method to determine a list of completions from an API object. + + @param api reference to the API object to be used (APIsManager.DbAPIs) + @param word word (or wordpart) to complete (string) + @param context flag indicating to autocomplete a context (boolean) + @return list of possible completions (list of strings) + """ + completionsList = [] + if api is not None: + if context: + completions = api.getCompletions(context = word) + for completion in completions: + entry = completion["completion"] + if completion["pictureId"]: + entry += "?{0}".format(completion["pictureId"]) + if entry not in completionsList: + completionsList.append(entry) + else: + completions = api.getCompletions(start = word) + for completion in completions: + if not completion["context"]: + entry = completion["completion"] + else: + entry = "{0} ({1})".format( + completion["completion"], + completion["context"] + ) + if entry in completionsList: + completionsList.remove(entry) + if completion["pictureId"]: + entry += "?{0}".format(completion["pictureId"]) + else: + cont = False + re = QRegExp(QRegExp.escape(entry) + "\?\d{,2}") + for comp in completionsList: + if re.exactMatch(comp): + cont = True + break + if cont: + continue + if entry not in completionsList: + completionsList.append(entry) + return completionsList + + def getCompletionsFromDocument(self, editor, word, context, sep): + """ + Public method to determine autocompletion proposals from the document. + + @param editor reference to the editor object (QScintilla.Editor) + @param word string to be completed (string) + @param context flag indicating to autocomplete a context (boolean) + @param sep separator string (string) + @return list of possible completions (list of strings) + """ + currentPos = editor.currentPosition() + completionsList = [] + if context: + word += sep + + res = editor.findFirstTarget(word, False, editor.autoCompletionCaseSensitivity(), + False, begline = 0, begindex = 0, ws_ = True) + while res: + start, length = editor.getFoundTarget() + pos = start + length + if pos != currentPos: + if context: + completion = "" + else: + completion = word + ch = editor.charAt(pos) + while editor.isWordCharacter(ch): + completion += ch + pos += 1 + ch = editor.charAt(pos) + if completion and completion not in completionsList: + completionsList.append( + "{0}?{1}".format(completion, self.__fromDocumentID)) + + res = editor.findNextTarget() + + completionsList.sort() + return completionsList + + ########################### + ## calltips methods below + ########################### + + def __setCalltipsHook(self, editor): + """ + Private method to set the calltip hook. + + @param editor reference to the editor (QScintilla.Editor) + """ + editor.setCallTipHook(self.calltips) + + def __unsetCalltipsHook(self, editor): + """ + Private method to unset the calltip hook. + + @param editor reference to the editor (QScintilla.Editor) + """ + editor.unsetCallTipHook() + + def calltips(self, editor, pos, commas): + """ + Public method to return a list of calltips. + + @param editor reference to the editor (QScintilla.Editor) + @param pos position in the text for the calltip (integer) + @param commas minimum number of commas contained in the calltip (integer) + @return list of possible calltips (list of strings) + """ + language = editor.getLanguage() + if language == "": + return + + line, col = editor.lineIndexFromPosition(pos) + wc = editor.wordCharacters() + text = editor.text(line) + while col > 0 and text[col - 1] not in wc: + col -= 1 + word = editor.getWordLeft(line, col) + + apiCalltips = [] + projectCalltips = [] + + if self.__plugin.getPreferences("AutoCompletionSource") & AcsAPIs: + api = self.__apisManager.getAPIs(language) + if api is not None: + apiCalltips = api.getCalltips(word, commas, self.__lastContext, + self.__lastFullContext, + self.__plugin.getPreferences("CallTipsContextShown")) + + if self.__plugin.getPreferences("AutoCompletionSource") & AcsProject: + api = self.__apisManager.getAPIs(ApisNameProject) + projectCalltips = api.getCalltips(word, commas, self.__lastContext, + self.__lastFullContext, + self.__plugin.getPreferences("CallTipsContextShown")) + + return sorted(set(apiCalltips).union(set(projectCalltips)))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/ConfigurationPages/AutoCompletionEricPage.py Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2008 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing the Eric Autocompletion configuration page. +""" + +from AssistantEric.Assistant import AcsAPIs, AcsDocument, AcsProject + +from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase +from .Ui_AutoCompletionEricPage import Ui_AutoCompletionEricPage + +class AutoCompletionEricPage(ConfigurationPageBase, Ui_AutoCompletionEricPage): + """ + Class implementing the Eric Autocompletion configuration page. + """ + def __init__(self, plugin): + """ + Constructor + + @param plugin reference to the plugin object + """ + ConfigurationPageBase.__init__(self) + self.setupUi(self) + self.setObjectName("AutoCompletionEricPage") + + self.__plugin = plugin + + # set initial values + self.autocompletionCheckBox.setChecked( + self.__plugin.getPreferences("AutoCompletionEnabled")) + + acSource = self.__plugin.getPreferences("AutoCompletionSource") + self.apisCheckBox.setChecked(acSource & AcsAPIs) + self.documentCheckBox.setChecked(acSource & AcsDocument) + self.projectCheckBox.setChecked(acSource & AcsProject) + + def save(self): + """ + Public slot to save the Eric Autocompletion configuration. + """ + self.__plugin.setPreferences("AutoCompletionEnabled", + int(self.autocompletionCheckBox.isChecked())) + + acSource = 0 + if self.apisCheckBox.isChecked(): + acSource |= AcsAPIs + if self.documentCheckBox.isChecked(): + acSource |= AcsDocument + if self.projectCheckBox.isChecked(): + acSource |= AcsProject + self.__plugin.setPreferences("AutoCompletionSource", acSource)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,111 @@ +<ui version="4.0" > + <class>AutoCompletionEricPage</class> + <widget class="QWidget" name="AutoCompletionEricPage" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>350</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout" > + <property name="spacing" > + <number>6</number> + </property> + <property name="margin" > + <number>6</number> + </property> + <item> + <widget class="QLabel" name="headerLabel" > + <property name="text" > + <string><b>Configure Eric Autocompletion</b></string> + </property> + </widget> + </item> + <item> + <widget class="Line" name="line15" > + <property name="frameShape" > + <enum>QFrame::HLine</enum> + </property> + <property name="frameShadow" > + <enum>QFrame::Sunken</enum> + </property> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="autocompletionCheckBox" > + <property name="toolTip" > + <string>Select, whether the eric autocompletion support shall be enabled.</string> + </property> + <property name="text" > + <string>Enable autocompletion</string> + </property> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox" > + <property name="title" > + <string>Source</string> + </property> + <layout class="QGridLayout" name="gridLayout" > + <property name="margin" > + <number>6</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item row="0" column="0" > + <widget class="QCheckBox" name="apisCheckBox" > + <property name="toolTip" > + <string>Select this to get autocompletion from installed APIs</string> + </property> + <property name="text" > + <string>from API files</string> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="QCheckBox" name="documentCheckBox" > + <property name="toolTip" > + <string>Select this to get autocompletion from current document</string> + </property> + <property name="text" > + <string>from Document</string> + </property> + </widget> + </item> + <item row="0" column="2" > + <widget class="QCheckBox" name="projectCheckBox" > + <property name="toolTip" > + <string>Select this to get autocompletion from current project</string> + </property> + <property name="text" > + <string>from Project</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0" > + <size> + <width>221</width> + <height>82</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/ConfigurationPages/CallTipsEricPage.py Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2008 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing the Eric Calltips configuration page. +""" + +from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase +from .Ui_CallTipsEricPage import Ui_CallTipsEricPage + +class CallTipsEricPage(ConfigurationPageBase, Ui_CallTipsEricPage): + """ + Class implementing the Eric Calltips configuration page. + """ + def __init__(self, plugin): + """ + Constructor + + @param plugin reference to the plugin object + """ + ConfigurationPageBase.__init__(self) + self.setupUi(self) + self.setObjectName("CallTipsEricPage") + + self.__plugin = plugin + + # set initial values + self.calltipsCheckBox.setChecked(\ + self.__plugin.getPreferences("CalltipsEnabled")) + self.ctContextCheckBox.setChecked(\ + self.__plugin.getPreferences("CallTipsContextShown")) + + def save(self): + """ + Public slot to save the Eric Calltips configuration. + """ + self.__plugin.setPreferences("CalltipsEnabled", + int(self.calltipsCheckBox.isChecked())) + self.__plugin.setPreferences("CallTipsContextShown", + int(self.ctContextCheckBox.isChecked()))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/ConfigurationPages/CallTipsEricPage.ui Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,108 @@ +<ui version="4.0" > + <class>CallTipsEricPage</class> + <widget class="QWidget" name="CallTipsEricPage" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>350</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2" > + <property name="spacing" > + <number>6</number> + </property> + <property name="margin" > + <number>6</number> + </property> + <item> + <widget class="QLabel" name="headerLabel" > + <property name="text" > + <string><b>Configure Eric Calltips</b></string> + </property> + </widget> + </item> + <item> + <widget class="Line" name="line15" > + <property name="frameShape" > + <enum>QFrame::HLine</enum> + </property> + <property name="frameShadow" > + <enum>QFrame::Sunken</enum> + </property> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="calltipsCheckBox" > + <property name="toolTip" > + <string>Select, whether the eric calltips support shall be enabled.</string> + </property> + <property name="text" > + <string>Enable calltips</string> + </property> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox" > + <property name="title" > + <string>Context display options</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout" > + <property name="spacing" > + <number>6</number> + </property> + <property name="margin" > + <number>6</number> + </property> + <item> + <widget class="QCheckBox" name="ctContextCheckBox" > + <property name="toolTip" > + <string>Select to display calltips with a context</string> + </property> + <property name="text" > + <string>Show context information</string> + </property> + </widget> + </item> + <item> + <widget class="Line" name="line" > + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label" > + <property name="text" > + <string>A context is any scope (e.g. a C++ namespace or a Python module) prior to the function/method name.</string> + </property> + <property name="wordWrap" > + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0" > + <size> + <width>221</width> + <height>82</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/ConfigurationPages/__init__.py Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2006 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Package implementing the various pages of the configuration dialog. +"""
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/LICENSE.GPL3 Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,621 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.APIsManager.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,557 @@ +<?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'> +<html><head> +<title>Plugin_Assistant_Eric.AssistantEric.APIsManager</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>Plugin_Assistant_Eric.AssistantEric.APIsManager</h1> +<p> +Module implementing the APIsManager. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>ApisNameProject</td></tr><tr><td>WorkerAborted</td></tr><tr><td>WorkerFinished</td></tr><tr><td>WorkerStarted</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#APIsManager">APIsManager</a></td> +<td>Class implementing the APIsManager class, which is the central store for API information used by autocompletion and calltips.</td> +</tr><tr> +<td><a href="#DbAPIs">DbAPIs</a></td> +<td>Class implementing an API storage entity.</td> +</tr><tr> +<td><a href="#DbAPIsWorker">DbAPIsWorker</a></td> +<td>Class implementing a worker thread to prepare the API database.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="APIsManager" ID="APIsManager"></a> +<h2>APIsManager</h2> +<p> + Class implementing the APIsManager class, which is the central store for + API information used by autocompletion and calltips. +</p> +<h3>Derived from</h3> +QObject +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#APIsManager.__init__">APIsManager</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#APIsManager.deactivate">deactivate</a></td> +<td>Public method to perform actions upon deactivation.</td> +</tr><tr> +<td><a href="#APIsManager.getAPIs">getAPIs</a></td> +<td>Public method to get an apis object for autocompletion/calltips.</td> +</tr><tr> +<td><a href="#APIsManager.reloadAPIs">reloadAPIs</a></td> +<td>Public slot to reload the api information.</td> +</tr> +</table> +<a NAME="APIsManager.__init__" ID="APIsManager.__init__"></a> +<h4>APIsManager (Constructor)</h4> +<b>APIsManager</b>(<i>parent = None</i>) +<p> + Constructor +</p><dl> +<dt><i>parent</i></dt> +<dd> +reference to the parent object (QObject) +</dd> +</dl><a NAME="APIsManager.deactivate" ID="APIsManager.deactivate"></a> +<h4>APIsManager.deactivate</h4> +<b>deactivate</b>(<i></i>) +<p> + Public method to perform actions upon deactivation. +</p><a NAME="APIsManager.getAPIs" ID="APIsManager.getAPIs"></a> +<h4>APIsManager.getAPIs</h4> +<b>getAPIs</b>(<i>language</i>) +<p> + Public method to get an apis object for autocompletion/calltips. +</p><p> + This method creates and loads an APIs object dynamically upon request. + This saves memory for languages, that might not be needed at the moment. +</p><dl> +<dt><i>language</i></dt> +<dd> +the language of the requested api object (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +the apis object (APIs) +</dd> +</dl><a NAME="APIsManager.reloadAPIs" ID="APIsManager.reloadAPIs"></a> +<h4>APIsManager.reloadAPIs</h4> +<b>reloadAPIs</b>(<i></i>) +<p> + Public slot to reload the api information. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="DbAPIs" ID="DbAPIs"></a> +<h2>DbAPIs</h2> +<p> + Class implementing an API storage entity. +</p><h4>Signals</h4> +<dl> +<dt>apiPreparationCancelled()</dt> +<dd> +emitted after the API preparation has been + cancelled +</dd><dt>apiPreparationFinished()</dt> +<dd> +emitted after the API preparation has finished +</dd><dt>apiPreparationStarted()</dt> +<dd> +emitted after the API preparation has started +</dd> +</dl> +<h3>Derived from</h3> +QObject +<h3>Class Attributes</h3> +<table> +<tr><td>DB_VERSION</td></tr><tr><td>ac_context_stmt</td></tr><tr><td>ac_stmt</td></tr><tr><td>api_files_stmt</td></tr><tr><td>create_acWord_idx</td></tr><tr><td>create_api_stmt</td></tr><tr><td>create_context_idx</td></tr><tr><td>create_file_idx</td></tr><tr><td>create_file_stmt</td></tr><tr><td>create_fullContext_idx</td></tr><tr><td>create_mgmt_stmt</td></tr><tr><td>ct_context_stmt</td></tr><tr><td>ct_fullContext_stmt</td></tr><tr><td>ct_stmt</td></tr><tr><td>drop_acWord_idx</td></tr><tr><td>drop_api_stmt</td></tr><tr><td>drop_context_idx</td></tr><tr><td>drop_file_idx</td></tr><tr><td>drop_file_stmt</td></tr><tr><td>drop_fullContext_idx</td></tr><tr><td>drop_mgmt_stmt</td></tr><tr><td>format_select_stmt</td></tr><tr><td>mgmt_insert_stmt</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#DbAPIs.__init__">DbAPIs</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#DbAPIs.__createApiDB">__createApiDB</a></td> +<td>Private method to create an API database.</td> +</tr><tr> +<td><a href="#DbAPIs.__enoughCommas">__enoughCommas</a></td> +<td>Private method to determine, if the given string contains enough commas.</td> +</tr><tr> +<td><a href="#DbAPIs.__initAsLanguage">__initAsLanguage</a></td> +<td>Private method to initialize as a language API object.</td> +</tr><tr> +<td><a href="#DbAPIs.__initAsProject">__initAsProject</a></td> +<td>Private method to initialize as a project API object.</td> +</tr><tr> +<td><a href="#DbAPIs.__isPrepared">__isPrepared</a></td> +<td>Private method to check, if the database has been prepared.</td> +</tr><tr> +<td><a href="#DbAPIs.__openAPIs">__openAPIs</a></td> +<td>Private method to open the API database.</td> +</tr><tr> +<td><a href="#DbAPIs.__openApiDb">__openApiDb</a></td> +<td>Private method to open the API database.</td> +</tr><tr> +<td><a href="#DbAPIs.__processQueue">__processQueue</a></td> +<td>Private slot to process the queue of files to load.</td> +</tr><tr> +<td><a href="#DbAPIs.__projectClosed">__projectClosed</a></td> +<td>Private slot to perform actions after a project has been closed.</td> +</tr><tr> +<td><a href="#DbAPIs.__projectOpened">__projectOpened</a></td> +<td>Private slot to perform actions after a project has been opened.</td> +</tr><tr> +<td><a href="#DbAPIs._apiDbName">_apiDbName</a></td> +<td>Protected method to determine the name of the database file.</td> +</tr><tr> +<td><a href="#DbAPIs.autoCompletionWordSeparators">autoCompletionWordSeparators</a></td> +<td>Private method to get the word separator characters.</td> +</tr><tr> +<td><a href="#DbAPIs.close">close</a></td> +<td>Public method to close the database.</td> +</tr><tr> +<td><a href="#DbAPIs.editorSaved">editorSaved</a></td> +<td>Public slot to handle the editorSaved signal.</td> +</tr><tr> +<td><a href="#DbAPIs.event">event</a></td> +<td>Protected method to handle events from the worker thread.</td> +</tr><tr> +<td><a href="#DbAPIs.getApiFiles">getApiFiles</a></td> +<td>Public method to get a list of API files loaded into the database.</td> +</tr><tr> +<td><a href="#DbAPIs.getCalltips">getCalltips</a></td> +<td>Public method to determine the calltips.</td> +</tr><tr> +<td><a href="#DbAPIs.getCompletions">getCompletions</a></td> +<td>Public method to determine the possible completions.</td> +</tr><tr> +<td><a href="#DbAPIs.getLexer">getLexer</a></td> +<td>Public method to return a reference to our lexer object.</td> +</tr><tr> +<td><a href="#DbAPIs.prepareAPIs">prepareAPIs</a></td> +<td>Public method to prepare the APIs if neccessary.</td> +</tr> +</table> +<a NAME="DbAPIs.__init__" ID="DbAPIs.__init__"></a> +<h4>DbAPIs (Constructor)</h4> +<b>DbAPIs</b>(<i>language, parent = None</i>) +<p> + Constructor +</p><dl> +<dt><i>language</i></dt> +<dd> +language of the APIs object (string) +</dd><dt><i>parent</i></dt> +<dd> +reference to the parent object (QObject) +</dd> +</dl><a NAME="DbAPIs.__createApiDB" ID="DbAPIs.__createApiDB"></a> +<h4>DbAPIs.__createApiDB</h4> +<b>__createApiDB</b>(<i></i>) +<p> + Private method to create an API database. +</p><a NAME="DbAPIs.__enoughCommas" ID="DbAPIs.__enoughCommas"></a> +<h4>DbAPIs.__enoughCommas</h4> +<b>__enoughCommas</b>(<i>s, commas</i>) +<p> + Private method to determine, if the given string contains enough commas. +</p><dl> +<dt><i>s</i></dt> +<dd> +string to check (string) +</dd><dt><i>commas</i></dt> +<dd> +number of commas to check for (integer) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating, that there are enough commas (boolean) +</dd> +</dl><a NAME="DbAPIs.__initAsLanguage" ID="DbAPIs.__initAsLanguage"></a> +<h4>DbAPIs.__initAsLanguage</h4> +<b>__initAsLanguage</b>(<i></i>) +<p> + Private method to initialize as a language API object. +</p><a NAME="DbAPIs.__initAsProject" ID="DbAPIs.__initAsProject"></a> +<h4>DbAPIs.__initAsProject</h4> +<b>__initAsProject</b>(<i></i>) +<p> + Private method to initialize as a project API object. +</p><a NAME="DbAPIs.__isPrepared" ID="DbAPIs.__isPrepared"></a> +<h4>DbAPIs.__isPrepared</h4> +<b>__isPrepared</b>(<i></i>) +<p> + Private method to check, if the database has been prepared. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating the prepared status (boolean) +</dd> +</dl><a NAME="DbAPIs.__openAPIs" ID="DbAPIs.__openAPIs"></a> +<h4>DbAPIs.__openAPIs</h4> +<b>__openAPIs</b>(<i></i>) +<p> + Private method to open the API database. +</p><a NAME="DbAPIs.__openApiDb" ID="DbAPIs.__openApiDb"></a> +<h4>DbAPIs.__openApiDb</h4> +<b>__openApiDb</b>(<i></i>) +<p> + Private method to open the API database. +</p><a NAME="DbAPIs.__processQueue" ID="DbAPIs.__processQueue"></a> +<h4>DbAPIs.__processQueue</h4> +<b>__processQueue</b>(<i></i>) +<p> + Private slot to process the queue of files to load. +</p><a NAME="DbAPIs.__projectClosed" ID="DbAPIs.__projectClosed"></a> +<h4>DbAPIs.__projectClosed</h4> +<b>__projectClosed</b>(<i></i>) +<p> + Private slot to perform actions after a project has been closed. +</p><a NAME="DbAPIs.__projectOpened" ID="DbAPIs.__projectOpened"></a> +<h4>DbAPIs.__projectOpened</h4> +<b>__projectOpened</b>(<i></i>) +<p> + Private slot to perform actions after a project has been opened. +</p><a NAME="DbAPIs._apiDbName" ID="DbAPIs._apiDbName"></a> +<h4>DbAPIs._apiDbName</h4> +<b>_apiDbName</b>(<i></i>) +<p> + Protected method to determine the name of the database file. +</p><dl> +<dt>Returns:</dt> +<dd> +name of the database file (string) +</dd> +</dl><a NAME="DbAPIs.autoCompletionWordSeparators" ID="DbAPIs.autoCompletionWordSeparators"></a> +<h4>DbAPIs.autoCompletionWordSeparators</h4> +<b>autoCompletionWordSeparators</b>(<i></i>) +<p> + Private method to get the word separator characters. +</p><dl> +<dt>Returns:</dt> +<dd> +word separator characters (list of strings) +</dd> +</dl><a NAME="DbAPIs.close" ID="DbAPIs.close"></a> +<h4>DbAPIs.close</h4> +<b>close</b>(<i></i>) +<p> + Public method to close the database. +</p><a NAME="DbAPIs.editorSaved" ID="DbAPIs.editorSaved"></a> +<h4>DbAPIs.editorSaved</h4> +<b>editorSaved</b>(<i>filename</i>) +<p> + Public slot to handle the editorSaved signal. +</p><dl> +<dt><i>filename</i></dt> +<dd> +name of the file that was saved (string) +</dd> +</dl><a NAME="DbAPIs.event" ID="DbAPIs.event"></a> +<h4>DbAPIs.event</h4> +<b>event</b>(<i>evt</i>) +<p> + Protected method to handle events from the worker thread. +</p><dl> +<dt><i>evt</i></dt> +<dd> +reference to the event object (QEvent) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating, if the event was handled (boolean) +</dd> +</dl><a NAME="DbAPIs.getApiFiles" ID="DbAPIs.getApiFiles"></a> +<h4>DbAPIs.getApiFiles</h4> +<b>getApiFiles</b>(<i></i>) +<p> + Public method to get a list of API files loaded into the database. +</p><dl> +<dt>Returns:</dt> +<dd> +list of API filenames (list of strings) +</dd> +</dl><a NAME="DbAPIs.getCalltips" ID="DbAPIs.getCalltips"></a> +<h4>DbAPIs.getCalltips</h4> +<b>getCalltips</b>(<i>acWord, commas, context = None, fullContext = None, showContext = True</i>) +<p> + Public method to determine the calltips. +</p><dl> +<dt><i>acWord</i></dt> +<dd> +function to get calltips for (string) +</dd><dt><i>commas</i></dt> +<dd> +minimum number of commas contained in the calltip (integer) +</dd><dt><i>context</i></dt> +<dd> +string giving the context (e.g. classname) (string) +</dd><dt><i>fullContext</i></dt> +<dd> +string giving the full context (string) +</dd><dt><i>showContext</i></dt> +<dd> +flag indicating to show the calltip context (boolean) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +list of calltips (list of string) +</dd> +</dl><a NAME="DbAPIs.getCompletions" ID="DbAPIs.getCompletions"></a> +<h4>DbAPIs.getCompletions</h4> +<b>getCompletions</b>(<i>start = None, context = None</i>) +<p> + Public method to determine the possible completions. +</p><dl> +<dt><i>start=</i></dt> +<dd> +string giving the start of the word to be + completed (string) +</dd><dt><i>context=</i></dt> +<dd> +string giving the context (e.g. classname) + to be completed (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +list of dictionaries with possible completions (key 'completion' + contains the completion (string), key 'context' + contains the context (string) and key 'pictureId' + contains the ID of the icon to be shown (string)) +</dd> +</dl><a NAME="DbAPIs.getLexer" ID="DbAPIs.getLexer"></a> +<h4>DbAPIs.getLexer</h4> +<b>getLexer</b>(<i></i>) +<p> + Public method to return a reference to our lexer object. +</p><dl> +<dt>Returns:</dt> +<dd> +reference to the lexer object (QScintilla.Lexers.Lexer) +</dd> +</dl><a NAME="DbAPIs.prepareAPIs" ID="DbAPIs.prepareAPIs"></a> +<h4>DbAPIs.prepareAPIs</h4> +<b>prepareAPIs</b>(<i>rawList = None</i>) +<p> + Public method to prepare the APIs if neccessary. +</p><dl> +<dt><i>rawList=</i></dt> +<dd> +list of raw API files (list of strings) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="DbAPIsWorker" ID="DbAPIsWorker"></a> +<h2>DbAPIsWorker</h2> +<p> + Class implementing a worker thread to prepare the API database. +</p> +<h3>Derived from</h3> +QThread +<h3>Class Attributes</h3> +<table> +<tr><td>file_delete_id_stmt</td></tr><tr><td>file_id_stmt</td></tr><tr><td>file_loaded_stmt</td></tr><tr><td>populate_api_stmt</td></tr><tr><td>populate_del_api_stmt</td></tr><tr><td>populate_file_stmt</td></tr><tr><td>update_file_stmt</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#DbAPIsWorker.__init__">DbAPIsWorker</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#DbAPIsWorker.__autoCompletionWordSeparators">__autoCompletionWordSeparators</a></td> +<td>Private method to get the word separator characters for a language.</td> +</tr><tr> +<td><a href="#DbAPIsWorker.__deleteApiFile">__deleteApiFile</a></td> +<td>Private method to delete all references to an api file.</td> +</tr><tr> +<td><a href="#DbAPIsWorker.__loadApiFile">__loadApiFile</a></td> +<td>Private method to read a raw API file into the database.</td> +</tr><tr> +<td><a href="#DbAPIsWorker.__loadApiFileIfNewer">__loadApiFileIfNewer</a></td> +<td>Private method to load an API file, if it is newer than the one read into the database.</td> +</tr><tr> +<td><a href="#DbAPIsWorker.__storeApis">__storeApis</a></td> +<td>Private method to put the API entries into the database.</td> +</tr><tr> +<td><a href="#DbAPIsWorker.abort">abort</a></td> +<td>Public method to ask the thread to stop.</td> +</tr><tr> +<td><a href="#DbAPIsWorker.run">run</a></td> +<td>Public method to perform the threads work.</td> +</tr> +</table> +<a NAME="DbAPIsWorker.__init__" ID="DbAPIsWorker.__init__"></a> +<h4>DbAPIsWorker (Constructor)</h4> +<b>DbAPIsWorker</b>(<i>proxy, language, apiFiles, projectPath = ""</i>) +<p> + Constructor +</p><dl> +<dt><i>proxy</i></dt> +<dd> +reference to the object that is proxied (DbAPIs) +</dd><dt><i>language</i></dt> +<dd> +language of the APIs object (string) +</dd><dt><i>apiFiles</i></dt> +<dd> +list of API files to process (list of strings) +</dd><dt><i>projectPath</i></dt> +<dd> +path of the project. Only needed, if the APIs + are extracted out of the sources of a project. (string) +</dd> +</dl><a NAME="DbAPIsWorker.__autoCompletionWordSeparators" ID="DbAPIsWorker.__autoCompletionWordSeparators"></a> +<h4>DbAPIsWorker.__autoCompletionWordSeparators</h4> +<b>__autoCompletionWordSeparators</b>(<i>language</i>) +<p> + Private method to get the word separator characters for a language. +</p><dl> +<dt><i>language</i></dt> +<dd> +language of the APIs object (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +word separator characters (list of strings) +</dd> +</dl><a NAME="DbAPIsWorker.__deleteApiFile" ID="DbAPIsWorker.__deleteApiFile"></a> +<h4>DbAPIsWorker.__deleteApiFile</h4> +<b>__deleteApiFile</b>(<i>apiFile</i>) +<p> + Private method to delete all references to an api file. +</p><dl> +<dt><i>apiFile</i></dt> +<dd> +filename of the raw API file (string) +</dd> +</dl><a NAME="DbAPIsWorker.__loadApiFile" ID="DbAPIsWorker.__loadApiFile"></a> +<h4>DbAPIsWorker.__loadApiFile</h4> +<b>__loadApiFile</b>(<i>apiFile</i>) +<p> + Private method to read a raw API file into the database. +</p><dl> +<dt><i>apiFile</i></dt> +<dd> +filename of the raw API file (string) +</dd> +</dl><a NAME="DbAPIsWorker.__loadApiFileIfNewer" ID="DbAPIsWorker.__loadApiFileIfNewer"></a> +<h4>DbAPIsWorker.__loadApiFileIfNewer</h4> +<b>__loadApiFileIfNewer</b>(<i>apiFile</i>) +<p> + Private method to load an API file, if it is newer than the one read + into the database. +</p><dl> +<dt><i>apiFile</i></dt> +<dd> +filename of the raw API file (string) +</dd> +</dl><a NAME="DbAPIsWorker.__storeApis" ID="DbAPIsWorker.__storeApis"></a> +<h4>DbAPIsWorker.__storeApis</h4> +<b>__storeApis</b>(<i>apis, apiFile, language</i>) +<p> + Private method to put the API entries into the database. +</p><dl> +<dt><i>apis</i></dt> +<dd> +list of api entries (list of strings) +</dd><dt><i>apiFile</i></dt> +<dd> +filename of the file read to get the APIs (string) +</dd><dt><i>language</i></dt> +<dd> +programming language of the file of the APIs (string) +</dd> +</dl><a NAME="DbAPIsWorker.abort" ID="DbAPIsWorker.abort"></a> +<h4>DbAPIsWorker.abort</h4> +<b>abort</b>(<i></i>) +<p> + Public method to ask the thread to stop. +</p><a NAME="DbAPIsWorker.run" ID="DbAPIsWorker.run"></a> +<h4>DbAPIsWorker.run</h4> +<b>run</b>(<i></i>) +<p> + Public method to perform the threads work. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.Assistant.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,335 @@ +<?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'> +<html><head> +<title>Plugin_Assistant_Eric.AssistantEric.Assistant</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>Plugin_Assistant_Eric.AssistantEric.Assistant</h1> +<p> +Module implementing the eric assistant, an alternative autocompletion and +calltips system. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>AcsAPIs</td></tr><tr><td>AcsDocument</td></tr><tr><td>AcsOther</td></tr><tr><td>AcsProject</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#Assistant">Assistant</a></td> +<td>Class implementing the autocompletion and calltips system.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="Assistant" ID="Assistant"></a> +<h2>Assistant</h2> +<p> + Class implementing the autocompletion and calltips system. +</p> +<h3>Derived from</h3> +QObject +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#Assistant.__init__">Assistant</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#Assistant.__completionListSelected">__completionListSelected</a></td> +<td>Private slot to handle the selection from the completion list.</td> +</tr><tr> +<td><a href="#Assistant.__editorClosed">__editorClosed</a></td> +<td>Private slot called, when an editor was closed.</td> +</tr><tr> +<td><a href="#Assistant.__editorOpened">__editorOpened</a></td> +<td>Private slot called, when a new editor was opened.</td> +</tr><tr> +<td><a href="#Assistant.__getApiCompletions">__getApiCompletions</a></td> +<td>Private method to determine a list of completions from an API object.</td> +</tr><tr> +<td><a href="#Assistant.__getCharacter">__getCharacter</a></td> +<td>Private method to get the character to the left of the current position in the current line.</td> +</tr><tr> +<td><a href="#Assistant.__preferencesChanged">__preferencesChanged</a></td> +<td>Private method to handle a change of the global configuration.</td> +</tr><tr> +<td><a href="#Assistant.__setAutoCompletionHook">__setAutoCompletionHook</a></td> +<td>Private method to set the autocompletion hook.</td> +</tr><tr> +<td><a href="#Assistant.__setCalltipsHook">__setCalltipsHook</a></td> +<td>Private method to set the calltip hook.</td> +</tr><tr> +<td><a href="#Assistant.__shutdown">__shutdown</a></td> +<td>Private slot to handle the shutdown signal.</td> +</tr><tr> +<td><a href="#Assistant.__unsetAutoCompletionHook">__unsetAutoCompletionHook</a></td> +<td>Private method to unset the autocompletion hook.</td> +</tr><tr> +<td><a href="#Assistant.__unsetCalltipsHook">__unsetCalltipsHook</a></td> +<td>Private method to unset the calltip hook.</td> +</tr><tr> +<td><a href="#Assistant.activate">activate</a></td> +<td>Public method to perform actions upon activation.</td> +</tr><tr> +<td><a href="#Assistant.autocomplete">autocomplete</a></td> +<td>Public method to determine the autocompletion proposals.</td> +</tr><tr> +<td><a href="#Assistant.calltips">calltips</a></td> +<td>Public method to return a list of calltips.</td> +</tr><tr> +<td><a href="#Assistant.deactivate">deactivate</a></td> +<td>Public method to perform actions upon deactivation.</td> +</tr><tr> +<td><a href="#Assistant.getCompletionsFromDocument">getCompletionsFromDocument</a></td> +<td>Public method to determine autocompletion proposals from the document.</td> +</tr><tr> +<td><a href="#Assistant.setEnabled">setEnabled</a></td> +<td>Public method to enable or disable a feature.</td> +</tr> +</table> +<a NAME="Assistant.__init__" ID="Assistant.__init__"></a> +<h4>Assistant (Constructor)</h4> +<b>Assistant</b>(<i>plugin, parent = None</i>) +<p> + Constructor +</p><dl> +<dt><i>plugin</i></dt> +<dd> +reference to the plugin object +</dd><dt><i>parent</i></dt> +<dd> +parent (QObject) +</dd> +</dl><a NAME="Assistant.__completionListSelected" ID="Assistant.__completionListSelected"></a> +<h4>Assistant.__completionListSelected</h4> +<b>__completionListSelected</b>(<i>id, txt</i>) +<p> + Private slot to handle the selection from the completion list. +</p><dl> +<dt><i>id</i></dt> +<dd> +the ID of the user list (should be 1) (integer) +</dd><dt><i>txt</i></dt> +<dd> +the selected text (string) +</dd> +</dl><a NAME="Assistant.__editorClosed" ID="Assistant.__editorClosed"></a> +<h4>Assistant.__editorClosed</h4> +<b>__editorClosed</b>(<i>editor</i>) +<p> + Private slot called, when an editor was closed. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the editor (QScintilla.Editor) +</dd> +</dl><a NAME="Assistant.__editorOpened" ID="Assistant.__editorOpened"></a> +<h4>Assistant.__editorOpened</h4> +<b>__editorOpened</b>(<i>editor</i>) +<p> + Private slot called, when a new editor was opened. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the new editor (QScintilla.Editor) +</dd> +</dl><a NAME="Assistant.__getApiCompletions" ID="Assistant.__getApiCompletions"></a> +<h4>Assistant.__getApiCompletions</h4> +<b>__getApiCompletions</b>(<i>api, word, context</i>) +<p> + Private method to determine a list of completions from an API object. +</p><dl> +<dt><i>api</i></dt> +<dd> +reference to the API object to be used (APIsManager.DbAPIs) +</dd><dt><i>word</i></dt> +<dd> +word (or wordpart) to complete (string) +</dd><dt><i>context</i></dt> +<dd> +flag indicating to autocomplete a context (boolean) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +list of possible completions (list of strings) +</dd> +</dl><a NAME="Assistant.__getCharacter" ID="Assistant.__getCharacter"></a> +<h4>Assistant.__getCharacter</h4> +<b>__getCharacter</b>(<i>pos, editor</i>) +<p> + Private method to get the character to the left of the current position + in the current line. +</p><dl> +<dt><i>pos</i></dt> +<dd> +position to get character at (integer) +</dd><dt><i>editor</i></dt> +<dd> +reference to the editor object to work with (QScintilla.Editor) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +requested character or "", if there are no more (string) and + the next position (i.e. pos - 1) +</dd> +</dl><a NAME="Assistant.__preferencesChanged" ID="Assistant.__preferencesChanged"></a> +<h4>Assistant.__preferencesChanged</h4> +<b>__preferencesChanged</b>(<i></i>) +<p> + Private method to handle a change of the global configuration. +</p><a NAME="Assistant.__setAutoCompletionHook" ID="Assistant.__setAutoCompletionHook"></a> +<h4>Assistant.__setAutoCompletionHook</h4> +<b>__setAutoCompletionHook</b>(<i>editor</i>) +<p> + Private method to set the autocompletion hook. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the editor (QScintilla.Editor) +</dd> +</dl><a NAME="Assistant.__setCalltipsHook" ID="Assistant.__setCalltipsHook"></a> +<h4>Assistant.__setCalltipsHook</h4> +<b>__setCalltipsHook</b>(<i>editor</i>) +<p> + Private method to set the calltip hook. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the editor (QScintilla.Editor) +</dd> +</dl><a NAME="Assistant.__shutdown" ID="Assistant.__shutdown"></a> +<h4>Assistant.__shutdown</h4> +<b>__shutdown</b>(<i></i>) +<p> + Private slot to handle the shutdown signal. +</p><a NAME="Assistant.__unsetAutoCompletionHook" ID="Assistant.__unsetAutoCompletionHook"></a> +<h4>Assistant.__unsetAutoCompletionHook</h4> +<b>__unsetAutoCompletionHook</b>(<i>editor</i>) +<p> + Private method to unset the autocompletion hook. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the editor (QScintilla.Editor) +</dd> +</dl><a NAME="Assistant.__unsetCalltipsHook" ID="Assistant.__unsetCalltipsHook"></a> +<h4>Assistant.__unsetCalltipsHook</h4> +<b>__unsetCalltipsHook</b>(<i>editor</i>) +<p> + Private method to unset the calltip hook. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the editor (QScintilla.Editor) +</dd> +</dl><a NAME="Assistant.activate" ID="Assistant.activate"></a> +<h4>Assistant.activate</h4> +<b>activate</b>(<i></i>) +<p> + Public method to perform actions upon activation. +</p><a NAME="Assistant.autocomplete" ID="Assistant.autocomplete"></a> +<h4>Assistant.autocomplete</h4> +<b>autocomplete</b>(<i>editor, context</i>) +<p> + Public method to determine the autocompletion proposals. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the editor object, that called this method + (QScintilla.Editor) +</dd><dt><i>context</i></dt> +<dd> +flag indicating to autocomplete a context (boolean) +</dd> +</dl><a NAME="Assistant.calltips" ID="Assistant.calltips"></a> +<h4>Assistant.calltips</h4> +<b>calltips</b>(<i>editor, pos, commas</i>) +<p> + Public method to return a list of calltips. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the editor (QScintilla.Editor) +</dd><dt><i>pos</i></dt> +<dd> +position in the text for the calltip (integer) +</dd><dt><i>commas</i></dt> +<dd> +minimum number of commas contained in the calltip (integer) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +list of possible calltips (list of strings) +</dd> +</dl><a NAME="Assistant.deactivate" ID="Assistant.deactivate"></a> +<h4>Assistant.deactivate</h4> +<b>deactivate</b>(<i></i>) +<p> + Public method to perform actions upon deactivation. +</p><a NAME="Assistant.getCompletionsFromDocument" ID="Assistant.getCompletionsFromDocument"></a> +<h4>Assistant.getCompletionsFromDocument</h4> +<b>getCompletionsFromDocument</b>(<i>editor, word, context, sep</i>) +<p> + Public method to determine autocompletion proposals from the document. +</p><dl> +<dt><i>editor</i></dt> +<dd> +reference to the editor object (QScintilla.Editor) +</dd><dt><i>word</i></dt> +<dd> +string to be completed (string) +</dd><dt><i>context</i></dt> +<dd> +flag indicating to autocomplete a context (boolean) +</dd><dt><i>sep</i></dt> +<dd> +separator string (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +list of possible completions (list of strings) +</dd> +</dl><a NAME="Assistant.setEnabled" ID="Assistant.setEnabled"></a> +<h4>Assistant.setEnabled</h4> +<b>setEnabled</b>(<i>key, enabled</i>) +<p> + Public method to enable or disable a feature. +</p><dl> +<dt><i>key</i></dt> +<dd> +feature to set (string) +</dd><dt><i>enabled</i></dt> +<dd> +flag indicating the status (boolean) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.AutoCompletionEricPage.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,82 @@ +<?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'> +<html><head> +<title>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.AutoCompletionEricPage</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.AutoCompletionEricPage</h1> +<p> +Module implementing the Eric Autocompletion configuration page. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#AutoCompletionEricPage">AutoCompletionEricPage</a></td> +<td>Class implementing the Eric Autocompletion configuration page.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="AutoCompletionEricPage" ID="AutoCompletionEricPage"></a> +<h2>AutoCompletionEricPage</h2> +<p> + Class implementing the Eric Autocompletion configuration page. +</p> +<h3>Derived from</h3> +ConfigurationPageBase, Ui_AutoCompletionEricPage +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#AutoCompletionEricPage.__init__">AutoCompletionEricPage</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#AutoCompletionEricPage.save">save</a></td> +<td>Public slot to save the Eric Autocompletion configuration.</td> +</tr> +</table> +<a NAME="AutoCompletionEricPage.__init__" ID="AutoCompletionEricPage.__init__"></a> +<h4>AutoCompletionEricPage (Constructor)</h4> +<b>AutoCompletionEricPage</b>(<i>plugin</i>) +<p> + Constructor +</p><dl> +<dt><i>plugin</i></dt> +<dd> +reference to the plugin object +</dd> +</dl><a NAME="AutoCompletionEricPage.save" ID="AutoCompletionEricPage.save"></a> +<h4>AutoCompletionEricPage.save</h4> +<b>save</b>(<i></i>) +<p> + Public slot to save the Eric Autocompletion configuration. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.CallTipsEricPage.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,82 @@ +<?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'> +<html><head> +<title>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.CallTipsEricPage</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.CallTipsEricPage</h1> +<p> +Module implementing the Eric Calltips configuration page. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#CallTipsEricPage">CallTipsEricPage</a></td> +<td>Class implementing the Eric Calltips configuration page.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="CallTipsEricPage" ID="CallTipsEricPage"></a> +<h2>CallTipsEricPage</h2> +<p> + Class implementing the Eric Calltips configuration page. +</p> +<h3>Derived from</h3> +ConfigurationPageBase, Ui_CallTipsEricPage +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#CallTipsEricPage.__init__">CallTipsEricPage</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#CallTipsEricPage.save">save</a></td> +<td>Public slot to save the Eric Calltips configuration.</td> +</tr> +</table> +<a NAME="CallTipsEricPage.__init__" ID="CallTipsEricPage.__init__"></a> +<h4>CallTipsEricPage (Constructor)</h4> +<b>CallTipsEricPage</b>(<i>plugin</i>) +<p> + Constructor +</p><dl> +<dt><i>plugin</i></dt> +<dd> +reference to the plugin object +</dd> +</dl><a NAME="CallTipsEricPage.save" ID="CallTipsEricPage.save"></a> +<h4>CallTipsEricPage.save</h4> +<b>save</b>(<i></i>) +<p> + Public slot to save the Eric Calltips configuration. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.PluginAssistantEric.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,231 @@ +<?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'> +<html><head> +<title>Plugin_Assistant_Eric.PluginAssistantEric</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>Plugin_Assistant_Eric.PluginAssistantEric</h1> +<p> +Module implementing the Eric assistant plugin. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>assistantEricPluginObject</td></tr><tr><td>author</td></tr><tr><td>autoactivate</td></tr><tr><td>className</td></tr><tr><td>deactivateable</td></tr><tr><td>error</td></tr><tr><td>longDescription</td></tr><tr><td>name</td></tr><tr><td>needsRestart</td></tr><tr><td>packageName</td></tr><tr><td>pyqtApi</td></tr><tr><td>shortDescription</td></tr><tr><td>version</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#AssistantEricPlugin">AssistantEricPlugin</a></td> +<td>Class implementing the Eric assistant plugin.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr> +<td><a href="#createAutoCompletionPage">createAutoCompletionPage</a></td> +<td>Module function to create the autocompletion configuration page.</td> +</tr><tr> +<td><a href="#createCallTipsPage">createCallTipsPage</a></td> +<td>Module function to create the calltips configuration page.</td> +</tr><tr> +<td><a href="#getConfigData">getConfigData</a></td> +<td>Module function returning data as required by the configuration dialog.</td> +</tr><tr> +<td><a href="#prepareUninstall">prepareUninstall</a></td> +<td>Module function to prepare for an uninstallation.</td> +</tr> +</table> +<hr /><hr /> +<a NAME="AssistantEricPlugin" ID="AssistantEricPlugin"></a> +<h2>AssistantEricPlugin</h2> +<p> + Class implementing the Eric assistant plugin. +</p> +<h3>Derived from</h3> +QObject +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#AssistantEricPlugin.__init__">AssistantEricPlugin</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#AssistantEricPlugin.__checkQSql">__checkQSql</a></td> +<td>Private method to perform some checks on QSql.</td> +</tr><tr> +<td><a href="#AssistantEricPlugin.__initialize">__initialize</a></td> +<td>Private slot to (re)initialize the plugin.</td> +</tr><tr> +<td><a href="#AssistantEricPlugin.__loadTranslator">__loadTranslator</a></td> +<td>Private method to load the translation file.</td> +</tr><tr> +<td><a href="#AssistantEricPlugin.activate">activate</a></td> +<td>Public method to activate this plugin.</td> +</tr><tr> +<td><a href="#AssistantEricPlugin.deactivate">deactivate</a></td> +<td>Public method to deactivate this plugin.</td> +</tr><tr> +<td><a href="#AssistantEricPlugin.getPreferences">getPreferences</a></td> +<td>Public method to retrieve the various refactoring settings.</td> +</tr><tr> +<td><a href="#AssistantEricPlugin.prepareUninstall">prepareUninstall</a></td> +<td>Public method to prepare for an uninstallation.</td> +</tr><tr> +<td><a href="#AssistantEricPlugin.setPreferences">setPreferences</a></td> +<td>Public method to store the various refactoring settings.</td> +</tr> +</table> +<a NAME="AssistantEricPlugin.__init__" ID="AssistantEricPlugin.__init__"></a> +<h4>AssistantEricPlugin (Constructor)</h4> +<b>AssistantEricPlugin</b>(<i>ui</i>) +<p> + Constructor +</p><dl> +<dt><i>ui</i></dt> +<dd> +reference to the user interface object (UI.UserInterface) +</dd> +</dl><a NAME="AssistantEricPlugin.__checkQSql" ID="AssistantEricPlugin.__checkQSql"></a> +<h4>AssistantEricPlugin.__checkQSql</h4> +<b>__checkQSql</b>(<i></i>) +<p> + Private method to perform some checks on QSql. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating QSql is ok (boolean) +</dd> +</dl><a NAME="AssistantEricPlugin.__initialize" ID="AssistantEricPlugin.__initialize"></a> +<h4>AssistantEricPlugin.__initialize</h4> +<b>__initialize</b>(<i></i>) +<p> + Private slot to (re)initialize the plugin. +</p><a NAME="AssistantEricPlugin.__loadTranslator" ID="AssistantEricPlugin.__loadTranslator"></a> +<h4>AssistantEricPlugin.__loadTranslator</h4> +<b>__loadTranslator</b>(<i></i>) +<p> + Private method to load the translation file. +</p><a NAME="AssistantEricPlugin.activate" ID="AssistantEricPlugin.activate"></a> +<h4>AssistantEricPlugin.activate</h4> +<b>activate</b>(<i></i>) +<p> + Public method to activate this plugin. +</p><dl> +<dt>Returns:</dt> +<dd> +tuple of None and activation status (boolean) +</dd> +</dl><a NAME="AssistantEricPlugin.deactivate" ID="AssistantEricPlugin.deactivate"></a> +<h4>AssistantEricPlugin.deactivate</h4> +<b>deactivate</b>(<i></i>) +<p> + Public method to deactivate this plugin. +</p><a NAME="AssistantEricPlugin.getPreferences" ID="AssistantEricPlugin.getPreferences"></a> +<h4>AssistantEricPlugin.getPreferences</h4> +<b>getPreferences</b>(<i>key</i>) +<p> + Public method to retrieve the various refactoring settings. +</p><dl> +<dt><i>key</i></dt> +<dd> +the key of the value to get +</dd><dt><i>prefClass</i></dt> +<dd> +preferences class used as the storage area +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +the requested refactoring setting +</dd> +</dl><a NAME="AssistantEricPlugin.prepareUninstall" ID="AssistantEricPlugin.prepareUninstall"></a> +<h4>AssistantEricPlugin.prepareUninstall</h4> +<b>prepareUninstall</b>(<i></i>) +<p> + Public method to prepare for an uninstallation. +</p><a NAME="AssistantEricPlugin.setPreferences" ID="AssistantEricPlugin.setPreferences"></a> +<h4>AssistantEricPlugin.setPreferences</h4> +<b>setPreferences</b>(<i>key, value</i>) +<p> + Public method to store the various refactoring settings. +</p><dl> +<dt><i>key</i></dt> +<dd> +the key of the setting to be set (string) +</dd><dt><i>value</i></dt> +<dd> +the value to be set +</dd><dt><i>prefClass</i></dt> +<dd> +preferences class used as the storage area +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="createAutoCompletionPage" ID="createAutoCompletionPage"></a> +<h2>createAutoCompletionPage</h2> +<b>createAutoCompletionPage</b>(<i>configDlg</i>) +<p> + Module function to create the autocompletion configuration page. +</p><dl> +<dt>Returns:</dt> +<dd> +reference to the configuration page +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="createCallTipsPage" ID="createCallTipsPage"></a> +<h2>createCallTipsPage</h2> +<b>createCallTipsPage</b>(<i>configDlg</i>) +<p> + Module function to create the calltips configuration page. +</p><dl> +<dt>Returns:</dt> +<dd> +reference to the configuration page +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="getConfigData" ID="getConfigData"></a> +<h2>getConfigData</h2> +<b>getConfigData</b>(<i></i>) +<p> + Module function returning data as required by the configuration dialog. +</p><dl> +<dt>Returns:</dt> +<dd> +dictionary containing the relevant data +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="prepareUninstall" ID="prepareUninstall"></a> +<h2>prepareUninstall</h2> +<b>prepareUninstall</b>(<i></i>) +<p> + Module function to prepare for an uninstallation. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,39 @@ +<?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'> +<html><head> +<title>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body> +<h1>Plugin_Assistant_Eric.AssistantEric.ConfigurationPages</h1> +<p> +Package implementing the various pages of the configuration dialog. +</p> + + +<h3>Modules</h3> +<table> +<tr> +<td><a href="Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.AutoCompletionEricPage.html">AutoCompletionEricPage</a></td> +<td>Module implementing the Eric Autocompletion configuration page.</td> +</tr><tr> +<td><a href="Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.CallTipsEricPage.html">CallTipsEricPage</a></td> +<td>Module implementing the Eric Calltips configuration page.</td> +</tr> +</table> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.AssistantEric.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,46 @@ +<?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'> +<html><head> +<title>Plugin_Assistant_Eric.AssistantEric</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body> +<h1>Plugin_Assistant_Eric.AssistantEric</h1> +<p> +Package implementing an alternative autocompletion and calltips system. +</p> + +<h3>Packages</h3> +<table> +<tr> +<td><a href="index-Plugin_Assistant_Eric.AssistantEric.ConfigurationPages.html">ConfigurationPages</a></td> +<td>Package implementing the various pages of the configuration dialog.</td> +</tr> +</table> + +<h3>Modules</h3> +<table> +<tr> +<td><a href="Plugin_Assistant_Eric.AssistantEric.APIsManager.html">APIsManager</a></td> +<td>Module implementing the APIsManager.</td> +</tr><tr> +<td><a href="Plugin_Assistant_Eric.AssistantEric.Assistant.html">Assistant</a></td> +<td>Module implementing the eric assistant, an alternative autocompletion and calltips system.</td> +</tr> +</table> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/index-Plugin_Assistant_Eric.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,43 @@ +<?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'> +<html><head> +<title>Plugin_Assistant_Eric</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body> +<h1>Plugin_Assistant_Eric</h1> +<p> +Package implementing the eric5 assistant plugin. +</p> + +<h3>Packages</h3> +<table> +<tr> +<td><a href="index-Plugin_Assistant_Eric.AssistantEric.html">AssistantEric</a></td> +<td>Package implementing an alternative autocompletion and calltips system.</td> +</tr> +</table> + +<h3>Modules</h3> +<table> +<tr> +<td><a href="Plugin_Assistant_Eric.PluginAssistantEric.html">PluginAssistantEric</a></td> +<td>Module implementing the Eric assistant plugin.</td> +</tr> +</table> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/Documentation/source/index.html Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,34 @@ +<?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'> +<html><head> +<title>Table of contents</title> +<style> +body { + background:white; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #4FA4FF; } +h2 { color: white; background: #4FA4FF; } +h3 { color: white; background: #00557F; } +h4 { color: white; background: #00557F; } + +a { color: #AA5500; } + +</style> +</head> +<body> +<h1>Table of contents</h1> + + +<h3>Packages</h3> +<table> +<tr> +<td><a href="index-Plugin_Assistant_Eric.html">Plugin_Assistant_Eric</a></td> +<td>Package implementing the eric5 assistant plugin.</td> +</tr> +</table> + +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/__init__.py Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2008 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Package implementing an alternative autocompletion and calltips system. +"""
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/i18n/assistant_cs.ts Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS><TS version="1.1" language="cs"> +<context> + <name>AssistantEricPlugin</name> + <message> + <location filename="PluginAssistantEric.py" line="78"/> + <source>Eric</source> + <translation>Eric</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="139"/> + <source>The SQLite database driver is not available.</source> + <translation>Ovladač SQLite databáze není dostupný.</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="132"/> + <source>PyQt4.QtSql is not available.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>AutoCompletionEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="22"/> + <source><b>Configure Eric Autocompletion</b></source> + <translation><b>Nastavení Eric autodoplňování</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="45"/> + <source>Enable autocompletion</source> + <translation>Zapnout autodoplňování</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="42"/> + <source>Select, whether the eric autocompletion support shall be enabled.</source> + <translation>Vybrat, má-li být podpora eric autodoplňování zapnuta.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="52"/> + <source>Source</source> + <translation>Zdroj</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="77"/> + <source>from Document</source> + <translation>z dokumentu</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="64"/> + <source>Select this to get autocompletion from installed APIs</source> + <translation>Vybrat toto pro získání autodoplňování z nainstalovaných API</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="67"/> + <source>from API files</source> + <translation>z API souborů</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="74"/> + <source>Select this to get autocompletion from current document</source> + <translation>Vybrat toto pro získání autodoplňování z aktuálního dokumentu</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="84"/> + <source>Select this to get autocompletion from current project</source> + <translation>Vybrat toto pro získání autodoplňování z aktuálního projektu</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="87"/> + <source>from Project</source> + <translation>z projektu</translation> + </message> +</context> +<context> + <name>CallTipsEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="22"/> + <source><b>Configure Eric Calltips</b></source> + <translation><b>Nastavení Eric Rychlých tipů</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="42"/> + <source>Select, whether the eric calltips support shall be enabled.</source> + <translation>Vybrat, má-li být podpora Eric Rychlých tipů zapnuta.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="45"/> + <source>Enable calltips</source> + <translation>Zapnout Rychlé tipy</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="52"/> + <source>Context display options</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="64"/> + <source>Select to display calltips with a context</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="67"/> + <source>Show context information</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="81"/> + <source>A context is any scope (e.g. a C++ namespace or a Python module) prior to the function/method name.</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/i18n/assistant_de.ts Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS><TS version="1.1" language="de"> +<context> + <name>AssistantEricPlugin</name> + <message> + <location filename="PluginAssistantEric.py" line="78"/> + <source>Eric</source> + <translation>Eric</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="139"/> + <source>The SQLite database driver is not available.</source> + <translation>Der SQLite Datenbanktreiber ist nicht verfügbar.</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="132"/> + <source>PyQt4.QtSql is not available.</source> + <translation>PyQt4.QtSql ist nicht verfügbar.</translation> + </message> +</context> +<context> + <name>AutoCompletionEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="22"/> + <source><b>Configure Eric Autocompletion</b></source> + <translation><b>Eric Autom. Vervollständigung einstellen</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="45"/> + <source>Enable autocompletion</source> + <translation>Autom. Vervollständigung aktivieren</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="42"/> + <source>Select, whether the eric autocompletion support shall be enabled.</source> + <translation>Auswählen, um die automatische Vervollständigung mittels Eric Plugin zu aktivieren.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="52"/> + <source>Source</source> + <translation>Quelle</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="77"/> + <source>from Document</source> + <translation>vom Dokument</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="64"/> + <source>Select this to get autocompletion from installed APIs</source> + <translation>Wähle dies, um Vervollständigungsinfo aus API Dateien zu erhalten</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="67"/> + <source>from API files</source> + <translation>von API Dateien</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="74"/> + <source>Select this to get autocompletion from current document</source> + <translation>Wähle dies, um Vervollständigungsinfo aus dem aktuellen Dokument zu erhalten</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="84"/> + <source>Select this to get autocompletion from current project</source> + <translation>Wähle dies, um Vervollständigungsinfo aus dem aktuellen Projekt zu erhalten</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="87"/> + <source>from Project</source> + <translation>vom Projekt</translation> + </message> +</context> +<context> + <name>CallTipsEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="22"/> + <source><b>Configure Eric Calltips</b></source> + <translation><b>Eric Calltips einstellen</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="42"/> + <source>Select, whether the eric calltips support shall be enabled.</source> + <translation>Auswählen, um die Calltipps Unterstützung des Eric Plugins zu aktivieren.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="45"/> + <source>Enable calltips</source> + <translation>Calltipps aktivieren</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="52"/> + <source>Context display options</source> + <translation>Anzeige Optionen für Kontext</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="64"/> + <source>Select to display calltips with a context</source> + <translation>Auswählen, um Calltips mit Kontext anzuzeigen</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="67"/> + <source>Show context information</source> + <translation>Kontextinformationen anzeigen</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="81"/> + <source>A context is any scope (e.g. a C++ namespace or a Python module) prior to the function/method name.</source> + <translation>Ein Kontext ist jeder Gültigkeitsbereich (z.B. ein C++ Namensraum oder ein Python Modul), der vor dem Namen der Funktion/Methode steht.</translation> + </message> +</context> +</TS>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/i18n/assistant_es.ts Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS><TS version="1.1" language="es"> +<context> + <name>AssistantEricPlugin</name> + <message> + <location filename="PluginAssistantEric.py" line="78"/> + <source>Eric</source> + <translation>Eric</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="139"/> + <source>The SQLite database driver is not available.</source> + <translation>El driver para base de datos SQLite no está disponible.</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="132"/> + <source>PyQt4.QtSql is not available.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>AutoCompletionEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="22"/> + <source><b>Configure Eric Autocompletion</b></source> + <translation><b>Configurar Autocompletar de Eric</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="42"/> + <source>Select, whether the eric autocompletion support shall be enabled.</source> + <translation>Seleccionar si el soporte de autocompletar de eric debe ser habilitado.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="45"/> + <source>Enable autocompletion</source> + <translation>Habilitar Autocompletar</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="52"/> + <source>Source</source> + <translation>Origen</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="64"/> + <source>Select this to get autocompletion from installed APIs</source> + <translation>Seleccionar aquí para obtener autocompletar desde las APIs instaladas</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="67"/> + <source>from API files</source> + <translation>desde archivos API </translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="74"/> + <source>Select this to get autocompletion from current document</source> + <translation>Seleccionar aquí para obtener autocompletar desde el documento actual</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="77"/> + <source>from Document</source> + <translation>desde Documento</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="84"/> + <source>Select this to get autocompletion from current project</source> + <translation>Seleccionar aquí para obtener autocompletar desde el proyecto actual</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="87"/> + <source>from Project</source> + <translation>desde Proyecto</translation> + </message> +</context> +<context> + <name>CallTipsEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="22"/> + <source><b>Configure Eric Calltips</b></source> + <translation><b>Configurar Consejos de Llamada (Calltips) de Eric</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="42"/> + <source>Select, whether the eric calltips support shall be enabled.</source> + <translation>Seleccionar si el soporte para consejos de llamada debe ser habilitado.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="45"/> + <source>Enable calltips</source> + <translation>Habilitar consejos de llamada (calltips)</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="52"/> + <source>Context display options</source> + <translation>Opciones de visualización de contexto</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="64"/> + <source>Select to display calltips with a context</source> + <translation>Seleccionar para mostrar consejos de llamada con contexto</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="67"/> + <source>Show context information</source> + <translation>Mostrar información de contexto</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="81"/> + <source>A context is any scope (e.g. a C++ namespace or a Python module) prior to the function/method name.</source> + <translation>Un contexto es cualquier ámbito (p. ej. un espacio de nombres C++ o un módulo Python) antepuesto al nombre de función/método.</translation> + </message> +</context> +</TS>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/i18n/assistant_fr.ts Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS><TS version="1.1" language="fr_FR"> +<context> + <name>AssistantEricPlugin</name> + <message> + <location filename="PluginAssistantEric.py" line="78"/> + <source>Eric</source> + <translation>Eric</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="139"/> + <source>The SQLite database driver is not available.</source> + <translation>Le pilote SQLite n'est pas disponible.</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="132"/> + <source>PyQt4.QtSql is not available.</source> + <translation>PyQt4.QtSql n'est pas disponible.</translation> + </message> +</context> +<context> + <name>AutoCompletionEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="22"/> + <source><b>Configure Eric Autocompletion</b></source> + <translation><b>Configuration de l'autocomplétion Eric</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="45"/> + <source>Enable autocompletion</source> + <translation>Activer l'autocomplétion</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="42"/> + <source>Select, whether the eric autocompletion support shall be enabled.</source> + <translation>Cocher si l'autocomplétion Eric doit être activée.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="52"/> + <source>Source</source> + <translation>Source</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="77"/> + <source>from Document</source> + <translation>à partir du document</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="64"/> + <source>Select this to get autocompletion from installed APIs</source> + <translation>Sélectionner pour utiliser l'autocomplétion à partir des APIs installés</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="67"/> + <source>from API files</source> + <translation>à partir des fichiers API</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="74"/> + <source>Select this to get autocompletion from current document</source> + <translation>Sélectionner pour utiliser l'autocomplétion à partir du document courant</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="84"/> + <source>Select this to get autocompletion from current project</source> + <translation>Sélectionner pour utiliser l'autocomplétion à partir du projet courant</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="87"/> + <source>from Project</source> + <translation>à partir du projet</translation> + </message> +</context> +<context> + <name>CallTipsEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="22"/> + <source><b>Configure Eric Calltips</b></source> + <translation><b>Configuration des calltips Eric</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="42"/> + <source>Select, whether the eric calltips support shall be enabled.</source> + <translation>Cocher si les calltips eric doivent être activés.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="45"/> + <source>Enable calltips</source> + <translation>Activer les calltips</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="52"/> + <source>Context display options</source> + <translation>Options d'affichage des contextes</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="64"/> + <source>Select to display calltips with a context</source> + <translation>Cocher pour afficher les calltips dans un contexte</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="67"/> + <source>Show context information</source> + <translation>Afficher les informations du contexte</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="81"/> + <source>A context is any scope (e.g. a C++ namespace or a Python module) prior to the function/method name.</source> + <translation>Un contexte est un espace de nom (ex: espace de nom C++ ou module Python) étant mis en préfixe du nom de méthode ou de fonction.</translation> + </message> +</context> +</TS>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/i18n/assistant_ru.ts Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS><TS version="1.1" language="ru_RU"> +<context> + <name>AssistantEricPlugin</name> + <message> + <location filename="PluginAssistantEric.py" line="78"/> + <source>Eric</source> + <translation>Eric</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="139"/> + <source>The SQLite database driver is not available.</source> + <translation>Драйвер для SQLite базы данных не доступен.</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="132"/> + <source>PyQt4.QtSql is not available.</source> + <translation>Модуль PyQt4.QtSql недоступен.</translation> + </message> +</context> +<context> + <name>AutoCompletionEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="22"/> + <source><b>Configure Eric Autocompletion</b></source> + <translation><b>Настройка автозавершения</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="45"/> + <source>Enable autocompletion</source> + <translation>Включить автозавершение</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="42"/> + <source>Select, whether the eric autocompletion support shall be enabled.</source> + <translation>Выберите включить-ли режим автозавершения.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="52"/> + <source>Source</source> + <translation>Исходный текст</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="77"/> + <source>from Document</source> + <translation>из документа</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="64"/> + <source>Select this to get autocompletion from installed APIs</source> + <translation>Использовать автозавершение из установленных API файлов</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="67"/> + <source>from API files</source> + <translation>из API файлов</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="74"/> + <source>Select this to get autocompletion from current document</source> + <translation>Использовать автозавершение из текущего документа</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="84"/> + <source>Select this to get autocompletion from current project</source> + <translation>Использовать автозавершение из текущего проекта</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="87"/> + <source>from Project</source> + <translation>из проекта</translation> + </message> +</context> +<context> + <name>CallTipsEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="22"/> + <source><b>Configure Eric Calltips</b></source> + <translation><b>Конфигурация подсказок</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="42"/> + <source>Select, whether the eric calltips support shall be enabled.</source> + <translation>Разешить подсказки.</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="45"/> + <source>Enable calltips</source> + <translation>Разешить подсказки</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="52"/> + <source>Context display options</source> + <translation>Опции показа контекста</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="64"/> + <source>Select to display calltips with a context</source> + <translation>Показывать подсказки с контекстом</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="67"/> + <source>Show context information</source> + <translation>Показывать контекст</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="81"/> + <source>A context is any scope (e.g. a C++ namespace or a Python module) prior to the function/method name.</source> + <translation>Контекст - это окружение функции или метода.</translation> + </message> +</context> +</TS>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AssistantEric/i18n/assistant_zh_CN.GB2312.ts Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS><TS version="1.1" language="zh_CN"> +<context> + <name>AssistantEricPlugin</name> + <message> + <location filename="PluginAssistantEric.py" line="78"/> + <source>Eric</source> + <translation>Eric</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="132"/> + <source>PyQt4.QtSql is not available.</source> + <translation>PyQt4.QtSql 无效。</translation> + </message> + <message> + <location filename="PluginAssistantEric.py" line="139"/> + <source>The SQLite database driver is not available.</source> + <translation>SQLite 数据库驱动器无效。</translation> + </message> +</context> +<context> + <name>AutoCompletionEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="22"/> + <source><b>Configure Eric Autocompletion</b></source> + <translation><b>配置 Eric 自动完成功能</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="42"/> + <source>Select, whether the eric autocompletion support shall be enabled.</source> + <translation>选择是否打开 Eric 自动完成功能</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="45"/> + <source>Enable autocompletion</source> + <translation>允许自动完成</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="52"/> + <source>Source</source> + <translation>源</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="64"/> + <source>Select this to get autocompletion from installed APIs</source> + <translation>选择通过已安装的 APIs 实现自动完成</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="67"/> + <source>from API files</source> + <translation>根据 API 文件</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="74"/> + <source>Select this to get autocompletion from current document</source> + <translation>选择通过当前文档实现自动完成</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="77"/> + <source>from Document</source> + <translation>根据文档</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="84"/> + <source>Select this to get autocompletion from current project</source> + <translation>选择通过当前项目实现自动完成</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui" line="87"/> + <source>from Project</source> + <translation>根据项目</translation> + </message> +</context> +<context> + <name>CallTipsEricPage</name> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="22"/> + <source><b>Configure Eric Calltips</b></source> + <translation><b>配置 Eric 调用提示</b></translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="42"/> + <source>Select, whether the eric calltips support shall be enabled.</source> + <translation>选择是否打开 Eric 调用提示功能</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="45"/> + <source>Enable calltips</source> + <translation>允许调用提示</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="52"/> + <source>Context display options</source> + <translation>上下文显示选项</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="64"/> + <source>Select to display calltips with a context</source> + <translation>选择通过上下文显示调用提示</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="67"/> + <source>Show context information</source> + <translation>显示上下文信息</translation> + </message> + <message> + <location filename="AssistantEric/ConfigurationPages/CallTipsEricPage.ui" line="81"/> + <source>A context is any scope (e.g. a C++ namespace or a Python module) prior to the function/method name.</source> + <translation>上下文为任意范围(如:C++命名空间或 Python 模块)优先于函数/方法名。</translation> + </message> +</context> +</TS>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ChangeLog Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,5 @@ +ChangeLog +--------- +Version 2.0-snapshot-2010mmdd: +- first snapshot release of the Eric5 assistant plugin after porting + to Python3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PKGLIST Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,17 @@ +AssistantEric/APIsManager.py +AssistantEric/Assistant.py +AssistantEric/ConfigurationPages/AutoCompletionEricPage.py +AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui +AssistantEric/ConfigurationPages/CallTipsEricPage.py +AssistantEric/ConfigurationPages/CallTipsEricPage.ui +AssistantEric/ConfigurationPages/__init__.py +AssistantEric/ConfigurationPages/eric.png +AssistantEric/Documentation/LICENSE.GPL3 +AssistantEric/__init__.py +AssistantEric/i18n/assistant_cs.qm +AssistantEric/i18n/assistant_de.qm +AssistantEric/i18n/assistant_es.qm +AssistantEric/i18n/assistant_fr.qm +AssistantEric/i18n/assistant_ru.qm +AssistantEric/i18n/assistant_zh_CN.GB2312.qm +PluginAssistantEric.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PluginAssistantEric.py Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,229 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2008 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing the Eric assistant plugin. +""" + +import sys +import os + +from PyQt4.QtCore import QObject, SIGNAL, QTranslator +from PyQt4.QtGui import QApplication + +from E5Gui.E5Application import e5App + +import Preferences + +from AssistantEric.Assistant import AcsAPIs, AcsProject + +# Start-Of-Header +name = "Assistant Eric Plugin" +author = "Detlev Offenbach <detlev@die-offenbachs.de>" +autoactivate = True +deactivateable = True +version = "2.0.0" +className = "AssistantEricPlugin" +packageName = "AssistantEric" +shortDescription = "Alternative autocompletion and calltips provider." +longDescription = """This plugin implements an alternative autocompletion and""" \ + """ calltips provider.""" +needsRestart = True +pyqtApi = 2 +# End-Of-Header + +error = "" + +assistantEricPluginObject = None + +def createAutoCompletionPage(configDlg): + """ + Module function to create the autocompletion configuration page. + + @return reference to the configuration page + """ + global assistantEricPluginObject + from AssistantEric.ConfigurationPages.AutoCompletionEricPage \ + import AutoCompletionEricPage + page = AutoCompletionEricPage(assistantEricPluginObject) + return page + +def createCallTipsPage(configDlg): + """ + Module function to create the calltips configuration page. + + @return reference to the configuration page + """ + global assistantEricPluginObject + from AssistantEric.ConfigurationPages.CallTipsEricPage \ + import CallTipsEricPage + page = CallTipsEricPage(assistantEricPluginObject) + return page + +def getConfigData(): + """ + Module function returning data as required by the configuration dialog. + + @return dictionary containing the relevant data + """ + return { + "ericAutoCompletionPage" : \ + [QApplication.translate("AssistantEricPlugin", "Eric"), + os.path.join("AssistantEric", "ConfigurationPages", + "eric.png"), + createAutoCompletionPage, "editorAutocompletionPage", None], + "ericCallTipsPage" : \ + [QApplication.translate("AssistantEricPlugin", "Eric"), + os.path.join("AssistantEric", "ConfigurationPages", + "eric.png"), + createCallTipsPage, "editorCalltipsPage", None], + } + +def prepareUninstall(): + """ + Module function to prepare for an uninstallation. + """ + assistant = AssistantEricPlugin(None) + assistant.prepareUninstall() + +class AssistantEricPlugin(QObject): + """ + Class implementing the Eric assistant plugin. + """ + def __init__(self, ui): + """ + Constructor + + @param ui reference to the user interface object (UI.UserInterface) + """ + QObject.__init__(self, ui) + self.__ui = ui + self.__initialize() + + self.__defaults = { + "AutoCompletionEnabled" : False, + "AutoCompletionSource" : AcsAPIs | AcsProject, + "CalltipsEnabled" : False, + "CallTipsContextShown" : 1, + } + + self.__translator = None + self.__loadTranslator() + + def __initialize(self): + """ + Private slot to (re)initialize the plugin. + """ + self.__object = None + + def __checkQSql(self): + """ + Private method to perform some checks on QSql. + + @return flag indicating QSql is ok (boolean) + """ + global error + + try: + from PyQt4.QtSql import QSqlDatabase + except ImportError: + error = self.trUtf8("PyQt4.QtSql is not available.") + return False + + drivers = QSqlDatabase.drivers() + if "QSQLITE" in drivers: + return True + else: + error = self.trUtf8("The SQLite database driver is not available.") + return False + + def activate(self): + """ + Public method to activate this plugin. + + @return tuple of None and activation status (boolean) + """ + global error + error = "" # clear previous error + + if not self.__checkQSql(): + return None, False + + global assistantEricPluginObject + assistantEricPluginObject = self + + from AssistantEric.Assistant import Assistant + + self.__object = Assistant(self, self.__ui) + e5App().registerPluginObject("AssistantEric", self.__object) + + self.__object.activate() + + return None, True + + def deactivate(self): + """ + Public method to deactivate this plugin. + """ + e5App().unregisterPluginObject("AssistantEric") + + self.__object.deactivate() + + self.__initialize() + + def __loadTranslator(self): + """ + Private method to load the translation file. + """ + if self.__ui is not None: + loc = self.__ui.getLocale() + if loc and loc != "C": + locale_dir = \ + os.path.join(os.path.dirname(__file__), "AssistantEric", "i18n") + translation = "assistant_%s" % loc + translator = QTranslator(None) + loaded = translator.load(translation, locale_dir) + if loaded: + self.__translator = translator + e5App().installTranslator(self.__translator) + else: + print("Warning: translation file '%s' could not be loaded." % \ + translation) + print("Using default.") + + def getPreferences(self, key): + """ + Public method to retrieve the various refactoring settings. + + @param key the key of the value to get + @param prefClass preferences class used as the storage area + @return the requested refactoring setting + """ + if key in ["AutoCompletionEnabled", "CalltipsEnabled"]: + return Preferences.toBool(Preferences.Prefs.settings.value( + "AssistantEric/" + key, self.__defaults[key])) + else: + return int(Preferences.Prefs.settings.value("AssistantEric/" + key, + self.__defaults[key])) + + def setPreferences(self, key, value): + """ + Public method to store the various refactoring settings. + + @param key the key of the setting to be set (string) + @param value the value to be set + @param prefClass preferences class used as the storage area + """ + Preferences.Prefs.settings.setValue("AssistantEric/" + key, value) + + if key in ["AutoCompletionEnabled", "CalltipsEnabled"]: + self.__object.setEnabled(key, value) + + def prepareUninstall(self): + """ + Public method to prepare for an uninstallation. + """ + Preferences.Prefs.settings.remove("AssistantEric") + \ No newline at end of file
--- a/PluginEricAssistant.e4p Sun Jan 17 12:10:41 2010 +0000 +++ b/PluginEricAssistant.e4p Sun Jan 17 19:22:18 2010 +0000 @@ -3,26 +3,54 @@ <!-- eric5 project file for project PluginEricAssistant --> <Project version="4.6"> <Language>en</Language> - <ProgLanguage mixed="0">Python3</ProgLanguage> + <ProgLanguage mixed="0">Python</ProgLanguage> <ProjectType>E4Plugin</ProjectType> <Description>Plugin implementing an alternative autocompletion and calltips provider.</Description> - <Version>0.1</Version> + <Version>2.0.0</Version> <Author>Detlev Offenbach</Author> <Email>detlev@die-offenbachs.de</Email> <TranslationPattern>AssistantEric/i18n/assistant_%language%.ts</TranslationPattern> <Sources> + <Source>PluginAssistantEric.py</Source> + <Source>AssistantEric/__init__.py</Source> + <Source>AssistantEric/Assistant.py</Source> + <Source>AssistantEric/APIsManager.py</Source> <Source>__init__.py</Source> + <Source>AssistantEric/ConfigurationPages/AutoCompletionEricPage.py</Source> + <Source>AssistantEric/ConfigurationPages/CallTipsEricPage.py</Source> + <Source>AssistantEric/ConfigurationPages/__init__.py</Source> </Sources> <Forms> + <Form>AssistantEric/ConfigurationPages/AutoCompletionEricPage.ui</Form> + <Form>AssistantEric/ConfigurationPages/CallTipsEricPage.ui</Form> </Forms> <Translations> + <Translation>AssistantEric/i18n/assistant_de.ts</Translation> + <Translation>AssistantEric/i18n/assistant_cs.ts</Translation> + <Translation>AssistantEric/i18n/assistant_fr.ts</Translation> + <Translation>AssistantEric/i18n/assistant_ru.ts</Translation> + <Translation>AssistantEric/i18n/assistant_es.ts</Translation> + <Translation>AssistantEric/i18n/assistant_zh_CN.GB2312.ts</Translation> + <Translation>AssistantEric/i18n/assistant_de.qm</Translation> + <Translation>AssistantEric/i18n/assistant_cs.qm</Translation> + <Translation>AssistantEric/i18n/assistant_fr.qm</Translation> + <Translation>AssistantEric/i18n/assistant_ru.qm</Translation> + <Translation>AssistantEric/i18n/assistant_es.qm</Translation> + <Translation>AssistantEric/i18n/assistant_zh_CN.GB2312.qm</Translation> </Translations> <Resources> </Resources> <Interfaces> </Interfaces> <Others> + <Other>AssistantEric/ConfigurationPages/eric.png</Other> + <Other>AssistantEric/Documentation/source</Other> + <Other>ChangeLog</Other> + <Other>PluginEricAssistant.e4p</Other> + <Other>PKGLIST</Other> + <Other>AssistantEric/Documentation/LICENSE.GPL3</Other> </Others> + <MainScript>PluginAssistantEric.py</MainScript> <Vcs> <VcsType>PySvn</VcsType> <VcsOptions> @@ -32,7 +60,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -40,7 +67,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -48,7 +74,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -56,7 +81,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -64,7 +88,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -72,7 +95,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -80,7 +102,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -88,7 +109,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -96,7 +116,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -104,7 +123,7 @@ </key> <value> <list> - <string></string> + <string>--show-updates</string> </list> </value> <key> @@ -112,7 +131,6 @@ </key> <value> <list> - <string></string> </list> </value> <key> @@ -120,7 +138,6 @@ </key> <value> <list> - <string></string> </list> </value> </dict> @@ -137,15 +154,78 @@ </VcsOtherData> </Vcs> <FiletypeAssociations> - <FiletypeAssociation pattern="*.pyw3" type="SOURCES" /> <FiletypeAssociation pattern="*.ui" type="FORMS" /> <FiletypeAssociation pattern="*.idl" type="INTERFACES" /> <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS" /> - <FiletypeAssociation pattern="*.py3" type="SOURCES" /> - <FiletypeAssociation pattern="*.qrc" type="RESOURCES" /> + <FiletypeAssociation pattern="*.ptl" type="SOURCES" /> <FiletypeAssociation pattern="*.pyw" type="SOURCES" /> + <FiletypeAssociation pattern="Ui_*" type="__IGNORE__" /> <FiletypeAssociation pattern="*.ui.h" type="FORMS" /> <FiletypeAssociation pattern="*.ts" type="TRANSLATIONS" /> <FiletypeAssociation pattern="*.py" type="SOURCES" /> + <FiletypeAssociation pattern="*.qrc" type="RESOURCES" /> </FiletypeAssociations> + <Documentation> + <DocumentationParams> + <dict> + <key> + <string>ERIC4DOC</string> + </key> + <value> + <dict> + <key> + <string>cssFile</string> + </key> + <value> + <string>/usr/lib64/python3.1/site-packages/eric5/CSSs/default.css</string> + </value> + <key> + <string>ignoreDirectories</string> + </key> + <value> + <list> + <string>.ropeproject</string> + <string>.eric4project</string> + <string>.eric5project</string> + </list> + </value> + <key> + <string>ignoreFilePatterns</string> + </key> + <value> + <list> + <string>Ui_*</string> + </list> + </value> + <key> + <string>outputDirectory</string> + </key> + <value> + <string>AssistantEric/Documentation/source</string> + </value> + <key> + <string>qtHelpEnabled</string> + </key> + <value> + <bool>False</bool> + </value> + <key> + <string>sourceExtensions</string> + </key> + <value> + <list> + <string></string> + </list> + </value> + <key> + <string>useRecursion</string> + </key> + <value> + <bool>True</bool> + </value> + </dict> + </value> + </dict> + </DocumentationParams> + </Documentation> </Project> \ No newline at end of file
--- a/__init__.py Sun Jan 17 12:10:41 2010 +0000 +++ b/__init__.py Sun Jan 17 19:22:18 2010 +0000 @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2008 - 2010 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Package implementing the eric5 assistant plugin. +""" \ No newline at end of file