QScintilla/Lexers/Lexer.py

changeset 130
fcce4cc20d95
parent 97
c4086afea02b
child 167
7508e44f4853
--- a/QScintilla/Lexers/Lexer.py	Sun Feb 28 14:33:07 2010 +0000
+++ b/QScintilla/Lexers/Lexer.py	Sun Feb 28 17:27:35 2010 +0000
@@ -4,9 +4,11 @@
 #
 
 """
-Module implementing the lexer base class.
+Module implementing the lexer mixin class.
 """
 
+import Preferences
+
 class Lexer(object):
     """ 
     Class to implement the lexer mixin class.
@@ -198,3 +200,19 @@
         @return flag indicating a string style (boolean)
         """
         return True
+    
+    def keywords(self, kwSet):
+        """
+        Public method to get the keywords.
+        
+        @param kwSet number of the keyword set (integer) 
+        """
+        keywords_ = Preferences.getEditorKeywords(self.language())
+        if keywords_:
+            kw = keywords_[kwSet]
+            if kw == "":
+                return None
+            else:
+                return kw
+        else:
+            return self.defaultKeywords(kwSet)

eric ide

mercurial