NINJA-IDE

Contents

Module: highlighter.py API

No description.


Global Functions:

Function: format(color, style=str) [at ln:37]

def format(color, style=str):
Return a QTextCharFormat with the given attributes.

Function: restyle(scheme) [at ln:71]

def restyle(scheme):
Reset the style for each highlighting item when the scheme change.

Class: Highlighter(QSyntaxHighlighter)

class Highlighter(QSyntaxHighlighter):
Syntax Highlighter for NINJA-IDE.

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

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

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

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

Function: __highlight_pep8(char_format, user_data) [at ln:232]

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

Function: __init__(document, lang=None, scheme=None, errors=None, pep8=None, migration=None) [at ln:89]

def __init__(document, lang=None, scheme=None, errors=None, pep8=None, migration=None):

No description.


Function: _execute_threaded_highlight(styles=None) [at ln:294]

def _execute_threaded_highlight(styles=None):
Function called with the info collected when the thread ends.

Function: _get_errors_lines() [at ln:453]

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

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

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

Function: apply_highlight(lang, scheme=None, syntax=None) [at ln:107]

def apply_highlight(lang, scheme=None, syntax=None):
Set the rules that will decide what to highlight and how.

Function: async_highlight() [at ln:282]

def async_highlight():
Execute a thread to collect the info of the things to highlight.

The thread will collect the data from where to where to highlight,
and which kind of highlight to use for those sections, and return
that info to the main thread after it process all the file.

Function: comment_multiline(text, delimiter_end, delimiter_start, style) [at ln:526]

def comment_multiline(text, delimiter_end, delimiter_start, style):
Process the beggining and end of a multiline comment.

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

def highlightBlock(text):
Apply syntax highlighting to the given block of text.

Function: match_multiline(text, delimiter, in_state, style, hls=list, highlight_errors=object, user_data=None) [at ln:474]

def match_multiline(text, delimiter, in_state, style, hls=list, highlight_errors=object, user_data=None):
Do highlighting of multi-line strings. ``delimiter`` should be a
``QRegExp`` for triple-single-quotes or triple-double-quotes, and
``in_state`` should be a unique integer to represent the corresponding
state changes when inside those strings. Returns True if we're still
inside a multi-line string when this function is finished.

Function: open_highlight(text) [at ln:274]

def open_highlight(text):
Only highlight the lines inside the accepted range.

Function: realtime_highlight(text) [at ln:360]

def realtime_highlight(text):
Highlight each line while it is being edited.

This function apply the proper highlight to the line being edited
by the user, this is a really fast process for each line once you
already have the document highlighted, but slow to do it the first
time to highlight all the lines together.

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

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

Function: sanitize(word) [at ln:103]

def sanitize(word):
Sanitize the string to avoid problems with the regex.

Function: set_open_visible_area(is_line, position) [at ln:269]

def set_open_visible_area(is_line, position):
Set the range of lines that should be highlighted on open.

Function: set_selected_word(word, partial=True) [at ln:205]

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

Function: threaded_highlight(text) [at ln:308]

def threaded_highlight(text):
Highlight each line using the info collected by the thread.

This function doesn't need to execute the regular expressions to see
where the highlighting starts and end for each rule, it just take
the start and end point, and the proper highlighting style from the
info returned from the thread and applied that to the document.

Class: HighlightParserThread(QThread)

class HighlightParserThread(QThread):
Thread that collect the highlighting info to the current file.

Function: __init__(highlighter) [at ln:549]

def __init__(highlighter):

No description.


Function: run() [at ln:553]

def run():
Execute this rules in another thread to avoid blocking the ui.

Class: EmpyHighlighter(QSyntaxHighlighter)

class EmpyHighlighter(QSyntaxHighlighter):
Dummy highlighter to be used when the current file is not recognized.

Function: __init__(document) [at ln:590]

def __init__(document):

No description.


Function: apply_highlight(*args, **kwargs) [at ln:594]

def apply_highlight(*args, **kwargs):

No description.


Function: async_highlight(*args, **kwargs) [at ln:609]

def async_highlight(*args, **kwargs):

No description.


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

def highlightBlock(text):

No description.


Function: open_highlight(*args, **kwargs) [at ln:606]

def open_highlight(*args, **kwargs):

No description.


Function: realtime_highlight(*args, **kwargs) [at ln:600]

def realtime_highlight(*args, **kwargs):

No description.


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

def rehighlight_lines(lines, errors=True):

No description.


Function: set_open_visible_area(*args, **kwargs) [at ln:603]

def set_open_visible_area(*args, **kwargs):

No description.


Function: set_selected_word(*args, **kwargs) [at ln:597]

def set_selected_word(*args, **kwargs):

No description.

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