NINJA-IDE

Contents

Module: syntax_highlighter.py API

Partition-based syntax highlighter

Global Functions:

Function: _create_scheme() [at ln:484]

def _create_scheme():

No description.


Function: get_user_data(block) [at ln:42]

def get_user_data(block):

No description.


Function: load_syntax(syntax) [at ln:515]

def load_syntax(syntax):

No description.


Class: TextCharFormat(QTextCharFormat)

class TextCharFormat(QTextCharFormat):

No description.


Class: Partition(object)

class Partition(object):

No description.

Function: __init__(name, start, end, is_multiline=False) [at ln:118]

def __init__(name, start, end, is_multiline=False):

No description.


Class: Scanner(object)

class Scanner(object):

No description.

Function: __clean_highlight() [at ln:244]

def __clean_highlight():

No description.


Function: __init__(tokens) [at ln:207]

def __init__(tokens):

No description.


Function: add_token(token) [at ln:228]

def add_token(token):

No description.


Function: scan(s) [at ln:254]

def scan(s):

No description.


Class: HighlighterError(Exception)

class HighlighterError(Exception):

No description.


Class: Token(object)

class Token(object):

No description.

Function: __init__(name, pattern, prefix=str, suffix=str) [at ln:195]

def __init__(name, pattern, prefix=str, suffix=str):

No description.


Class: SyntaxHighlighter(QSyntaxHighlighter)

class SyntaxHighlighter(QSyntaxHighlighter):

No description.

Function: __apply_proper_style(char_format, color) [at ln:332]

def __apply_proper_style(char_format, color):

No description.


Function: __highlight_lint(char_format, user_data) [at ln:349]

def __highlight_lint(char_format, user_data):
Highlight the lines with lint errors.

Function: __highlight_migration(char_format, user_data) [at ln:358]

def __highlight_migration(char_format, user_data):
Highlight the lines with lint errors.

Function: __highlight_pep8(char_format, user_data=None) [at ln:340]

def __highlight_pep8(char_format, user_data=None):
Highlight the lines with pep8 errors.

Function: __init__(parent, partition_scanner, scanner, formats, neditable=None) [at ln:271]

def __init__(parent, partition_scanner, scanner, formats, neditable=None):
:param parent: QDocument or QTextEdit/QPlainTextEdit instance
'partition_scanner:
PartitionScanner instance
:param scanner:
dictionary of token scanners for each partition
The key is the name of the partition, the value is a Scanner
instance
The default scanner has the key None
:formats:
list of tuples consisting of a name and a format definition
The name is the name of a partition or token

Function: __remove_error_highlight(char_format, user_data) [at ln:367]

def __remove_error_highlight(char_format, user_data):

No description.


Function: _get_errors_lines() [at ln:463]

def _get_errors_lines():
Return the number of lines that contains errors to highlight.

Function: _rehighlight_lines(lines) [at ln:453]

def _rehighlight_lines(lines):
If the document is valid, highlight the list of lines received.

Function: get_error_highlighter(block) [at ln:413]

def get_error_highlighter(block):

No description.


Function: highlightBlock(text) [at ln:373]

def highlightBlock(text):
automatically called by Qt

Function: rehighlight_lines(lines, errors=True) [at ln:474]

def rehighlight_lines(lines, errors=True):
Rehighlight the lines for errors or selected words.

Function: set_selected_word(word, partial=False) [at ln:429]

def set_selected_word(word, partial=False):
Set the word to highlight.

Class: Format(object)

class Format(object):

No description.

Function: __init__(name, color=None, bold=None, italic=None, base_format=None, background=None) [at ln:82]

def __init__(name, color=None, bold=None, italic=None, base_format=None, background=None):

No description.


Class: SyntaxUserData(QTextBlockUserData)

class SyntaxUserData(QTextBlockUserData):
Store the information of the errors, str and comments for each block.

Function: __init__(error=False) [at ln:53]

def __init__(error=False):

No description.


Function: add_str_group(start, end) [at ln:65]

def add_str_group(start, end):
Add a pair of values setting the beggining and end of a string.

Function: clear_data() [at ln:59]

def clear_data():
Clear the data stored for the current block.

Function: comment_start_at(pos) [at ln:69]

def comment_start_at(pos):
Set the position in the line where the comment starts.

Class: PartitionScanner(object)

class PartitionScanner(object):

No description.

Function: __init__(partitions) [at ln:134]

def __init__(partitions):

No description.


Function: scan(current_state, text) [at ln:153]

def scan(current_state, text):

No description.

Contents © 2013 NINJA-IDE - Powered by Nikola and Documentor