QScintilla/Editor.py

branch
BgService
changeset 3177
5af61402d74d
parent 3173
1fb284abe46e
child 3241
957673fc463a
equal deleted inserted replaced
3174:86047f5f4155 3177:5af61402d74d
6 """ 6 """
7 Module implementing the editor component of the eric5 IDE. 7 Module implementing the editor component of the eric5 IDE.
8 """ 8 """
9 from __future__ import unicode_literals 9 from __future__ import unicode_literals
10 try: 10 try:
11 str = unicode # __IGNORE_WARNING__ 11 str = unicode
12 chr = unichr # __IGNORE_WARNING__ 12 chr = unichr
13 except (NameError): 13 except NameError:
14 pass 14 pass
15 15
16 import os 16 import os
17 import re 17 import re
18 import difflib 18 import difflib
4992 @param line number where the error occured (int) 4992 @param line number where the error occured (int)
4993 @param index the column where the error occured (int) 4993 @param index the column where the error occured (int)
4994 @param code the part of the code where the error occured (str) 4994 @param code the part of the code where the error occured (str)
4995 @param error the name of the error (str) 4995 @param error the name of the error (str)
4996 @param warnings a list of strings containing the warnings 4996 @param warnings a list of strings containing the warnings
4997 (marker, file name, line number, message) 4997 (marker, file name, line number, col, message)
4998 """ 4998 """
4999 # Check if it's the requested file, otherwise ignore signal 4999 # Check if it's the requested file, otherwise ignore signal
5000 if fn != self.fileName and ( 5000 if fn != self.fileName and (
5001 self.fileName is not None or fn != "(Unnamed)"): 5001 self.fileName is not None or fn != "(Unnamed)"):
5002 return 5002 return
5005 self.clearFlakesWarnings() 5005 self.clearFlakesWarnings()
5006 5006
5007 if nok: 5007 if nok:
5008 self.toggleSyntaxError(line, index, True, error) 5008 self.toggleSyntaxError(line, index, True, error)
5009 else: 5009 else:
5010 for warning in warnings: 5010 for marker, _fn, lineno, col, msg in warnings:
5011 self.toggleWarning(warning[2], True, warning[3]) 5011 self.toggleWarning(lineno, True, msg)
5012 5012
5013 def __initOnlineSyntaxCheck(self): 5013 def __initOnlineSyntaxCheck(self):
5014 """ 5014 """
5015 Private slot to initialize the online syntax check. 5015 Private slot to initialize the online syntax check.
5016 """ 5016 """

eric ide

mercurial