Preferences/__init__.py

changeset 130
fcce4cc20d95
parent 107
918a6be6f051
child 137
9b3f3e8fc798
--- a/Preferences/__init__.py	Sun Feb 28 14:33:07 2010 +0000
+++ b/Preferences/__init__.py	Sun Feb 28 17:27:35 2010 +0000
@@ -1249,6 +1249,30 @@
     """
     prefClass.settings.setValue("Editor/APIs/" + key, apilist)
     
+def getEditorKeywords(key, prefClass = Prefs):
+    """
+    Module function to retrieve the various lists of language keywords.
+    
+    @param key the key of the value to get
+    @param prefClass preferences class used as the storage area
+    @return the requested list of language keywords (list of strings)
+    """
+    keywords = prefClass.settings.value("Editor/Keywords/" + key)
+    if keywords is not None:
+        return keywords
+    else:
+        return []
+    
+def setEditorKeywords(key, keywordsLists, prefClass = Prefs):
+    """
+    Module function to store the various lists of language keywords.
+    
+    @param key the key of the api to be set
+    @param keywordsLists the list of language keywords (list of strings)
+    @param prefClass preferences class used as the storage area
+    """
+    prefClass.settings.setValue("Editor/Keywords/" + key, keywordsLists)
+    
 def getEditorLexerAssocs(prefClass = Prefs):
     """
     Module function to retrieve all lexer associations.

eric ide

mercurial