def set_lexer_doc(self, bool_value): ''' Assign the class name as an additional property to every document which should be handled by this lexer A value of 1 indicates it should be handled. ''' editor.setProperty(self.__class__.__name__, 1 if bool_value is True else 0)
def init_lexer(self): ''' Initializes the lexer and its properties Args: None Returns: None ''' editor.styleSetFore(self.SCE_ERR_DEFAULT, notepad.getEditorDefaultForegroundColor()) editor.styleSetFore(self.SCE_ERR_PYTHON, (255,0,0)) editor.styleSetFore(self.SCE_ERR_GCC, (255,0,0)) editor.styleSetFore(self.SCE_ERR_MS, (255,0,0)) editor.styleSetFore(self.SCE_ERR_CMD, (255,0,0)) editor.styleSetFore(self.SCE_ERR_BORLAND, (255,0,0)) editor.styleSetFore(self.SCE_ERR_PERL, (255,0,0)) editor.styleSetFore(self.SCE_ERR_NET, (255,0,0)) editor.styleSetFore(self.SCE_ERR_LUA, (255,0,0)) editor.styleSetFore(self.SCE_ERR_CTAG, (255,0,0)) editor.styleSetFore(self.SCE_ERR_DIFF_CHANGED, (255,0,0)) editor.styleSetFore(self.SCE_ERR_DIFF_ADDITION, (255,0,0)) editor.styleSetFore(self.SCE_ERR_DIFF_DELETION, (255,0,0)) editor.styleSetFore(self.SCE_ERR_DIFF_MESSAGE, (255,0,0)) editor.styleSetFore(self.SCE_ERR_PHP, (255,0,0)) editor.styleSetFore(self.SCE_ERR_ELF, (255,0,0)) editor.styleSetFore(self.SCE_ERR_IFC, (255,0,0)) editor.styleSetFore(self.SCE_ERR_IFORT, (255,0,0)) editor.styleSetFore(self.SCE_ERR_ABSF, (255,0,0)) editor.styleSetFore(self.SCE_ERR_TIDY, (255,0,0)) editor.styleSetFore(self.SCE_ERR_JAVA_STACK, (255,0,0)) editor.styleSetFore(self.SCE_ERR_VALUE, (255,0,0)) editor.styleSetFore(self.SCE_ERR_GCC_INCLUDED_FROM, (255,0,0)) editor.styleSetFore(self.SCE_ERR_ESCSEQ, (30,30,30)) editor.styleSetVisible(self.SCE_ERR_ESCSEQ, self.show_escape_chars) editor.styleSetFore(self.SCE_ERR_ESCSEQ_UNKNOWN, (255,255,120)) editor.styleSetVisible(self.SCE_ERR_ESCSEQ_UNKNOWN, self.show_escape_chars) editor.styleSetFore(self.SCE_ERR_ES_BLACK, (0,0,0)) editor.styleSetFore(self.SCE_ERR_ES_RED, (255,0,0)) editor.styleSetFore(self.SCE_ERR_ES_GREEN, (0,255,0)) editor.styleSetFore(self.SCE_ERR_ES_BROWN, (150,75,0)) editor.styleSetFore(self.SCE_ERR_ES_BLUE, (0,0,255)) editor.styleSetFore(self.SCE_ERR_ES_MAGENTA, (255,200,255)) editor.styleSetFore(self.SCE_ERR_ES_CYAN, (255,200,100)) editor.styleSetFore(self.SCE_ERR_ES_GRAY, (128,128,128)) editor.styleSetFore(self.SCE_ERR_ES_DARK_GRAY, (255,200,100)) editor.styleSetFore(self.SCE_ERR_ES_BRIGHT_RED, (170, 1, 20)) editor.styleSetFore(self.SCE_ERR_ES_BRIGHT_GREEN, (255,200,100)) editor.styleSetFore(self.SCE_ERR_ES_YELLOW, (255,255,0)) editor.styleSetFore(self.SCE_ERR_ES_BRIGHT_BLUE, (9,84,190)) editor.styleSetFore(self.SCE_ERR_ES_BRIGHT_MAGENTA, (229,8,194)) editor.styleSetFore(self.SCE_ERR_ES_BRIGHT_CYAN, (27,244,207)) editor.styleSetFore(self.SCE_ERR_ES_WHITE, (255,255,255)) editor.setLexer(10) # ordering is important editor.setProperty('lexer.errorlist.value.separate', self.separate_path_and_line_number) editor.setProperty('lexer.errorlist.escape.sequences', self.interpret_escape_sequences)
def set_lexer_doc(self, bool_value): editor.setProperty(self.__class__.__name__, 1 if bool_value is True else -1) self.__is_lexer_doc = bool_value
def test_scintillawrapper_void_string_string(self): editor.setProperty('pythonscript.unittest', 'void_string_string') value = editor.getProperty('pythonscript.unittest') editor.setProperty('pythonscript.unittest', '') # clear the property out again self.assertEqual(value, 'void_string_string')
def test_scintillawrapper_int_string_void(self): editor.setProperty('pythonscript.unittest', '422') result = editor.getPropertyInt('pythonscript.unittest', 0) self.assertEqual(result, 422)
def callback_scintillawrapper_int_string_stringresult(self, args): editor.setProperty('pythonscript.unittest', 'test1234') propertyValue = editor.getProperty('pythonscript.unittest') self.assertEqual(propertyValue, 'test1234') self.callbackCalled = True
def test_scintillawrapper_int_string_stringresult(self): editor.setProperty('pythonscript.unittest', 'test1234') propertyValue = editor.getProperty('pythonscript.unittest') self.assertEqual(propertyValue, 'test1234')
def set_lexer_doc(self,bool_value): editor.setProperty(self.__class__.__name__, 1 if bool_value is True else -1) self.__is_lexer_doc = bool_value
def _set_file_version(self): log('called') file_version = editor.getPropertyInt('fileversion', 0) + 1 editor.setProperty('fileversion', file_version) return file_version