libkatepate Package
autocomplete Module
-
class libkatepate.autocomplete.AbstractCodeCompletionModel(model, resultList=None)[source]
Bases: PyKDE4.ktexteditor.CodeCompletionModel
-
CATEGORY_2_ICON = {'function': 'code-function', 'constant': 'code-variable', 'package': 'code-block', 'unknown': None, 'module': 'code-context', 'pointer': 'unknown', 'class': 'code-class'}
-
GROUP_POSITION = 1
-
class GroupPosition[source]
-
BEST_MATCHES = 1
-
GLOBAL = 600
-
LOCAL_SCOPE = 100
-
NAMESPACE = 500
-
PRIVATE = 400
-
PROTECTED = 300
-
PUBLIC = 200
-
AbstractCodeCompletionModel.MAX_DESCRIPTION = 80
-
AbstractCodeCompletionModel.MIMETYPES = []
-
AbstractCodeCompletionModel.OPERATORS = []
-
AbstractCodeCompletionModel.SEPARATOR = '.'
-
AbstractCodeCompletionModel.TITLE_AUTOCOMPLETION = u'Autopate'
-
AbstractCodeCompletionModel.completionInvoked(view, word, invocationType)[source]
-
classmethod AbstractCodeCompletionModel.createItemAutoComplete(text, category='unknown', args=None, description=None)[source]
-
AbstractCodeCompletionModel.data(index, role)[source]
-
AbstractCodeCompletionModel.executeCompletionItem(document, word, row)[source]
-
AbstractCodeCompletionModel.getLastExpression(line, operators=None)[source]
-
AbstractCodeCompletionModel.index(row, column, parent)[source]
-
AbstractCodeCompletionModel.parent(index)[source]
-
AbstractCodeCompletionModel.parseLine(line, col_num)[source]
-
AbstractCodeCompletionModel.rowCount(parent)[source]
-
class libkatepate.autocomplete.AbstractJSONFileCodeCompletionModel(*args, **kwargs)[source]
Bases: libkatepate.autocomplete.AbstractCodeCompletionModel
-
FILE_PATH = None
-
completionInvoked(view, word, invocationType)[source]
-
getChildrenInJSON(keys, json)[source]
-
getJSON(lastExpression, line)[source]
-
libkatepate.autocomplete.reset(*args, **kwargs)[source]
common Module
Reusable code for Kate/Pâté plugins: general purpose shared code
-
libkatepate.common.extendSelectionToWholeLine(view)[source]
Get the range between any symbol specified in leftBoundary set and rightBoundary
Search starts from given cursor position...
NOTE `SL’ suffix means Single Line – i.e. when search, do not cross one line boundaries!
Get single line comment string for a document
-
libkatepate.common.getCurrentLineIndentation(view)[source]
-
libkatepate.common.getLineIndentation(line, document)[source]
-
libkatepate.common.getTextBlockAroundCursor(doc, pos, upPred, downPred)[source]
Check if we know how to comment a line in a given document type
decorators Module
Reusable code for Kate/Pâté plugins: decorators for actions
-
libkatepate.decorators.append_constraint(action, constraint)[source]
-
libkatepate.decorators.check_constraints(action)[source]
Decorator to evaluate constraints assigned to a given action
-
libkatepate.decorators.has_selection(selectionState)[source]
-
libkatepate.decorators.restrict_doc_type(*doc_types)[source]
-
libkatepate.decorators.selection_mode(selectionMode)[source]
Restrict action to given selection mode
ALERT In block mode it is Ok to have cursor position after the line end!
This could lead to ‘index is out of string’ exceptions if algorithm is a little rough :-)
So it is why this constraint needed :)
errors Module
-
exception libkatepate.errors.PythonVersionException[source]
Bases: exceptions.Exception
-
libkatepate.errors.clearMarksOfError(doc, mark_iface)[source]
-
libkatepate.errors.needs_packages(packages)[source]
-
libkatepate.errors.needs_python_version(major, minor=None, micro=None, text='')[source]
-
libkatepate.errors.showError(message='error', time=10, icon='dialog-warning', minTextWidth=300)[source]
-
libkatepate.errors.showErrors(message, errors, key_mark, doc, time=10, icon='dialog-warning', key_line='line', key_column='column', max_errors=3, show_popup=True, move_cursor=False)[source]
-
libkatepate.errors.showOk(message='Ok', time=3, icon='dialog-ok')[source]
pred Module
Reusable code for Kate/Pâté plugins: predicates for text processing
-
libkatepate.pred.all_of(*predicates)[source]
Evaluate given predicates list ‘till one of ‘em is False
-
libkatepate.pred.any_of(*predicates)[source]
Evaluate given predicates list ‘till one of ‘em is True
True if line contains C/C++ block-comment-end
True if line contains C/C++ block-comment-start
-
libkatepate.pred.equalTo(text)[source]
True if passed line equals to a given string
-
libkatepate.pred.neg(predicate)[source]
Negate given predicate
True if line contains only single line comment
-
libkatepate.pred.startsWith(start)[source]
True if passed line starts with a given string
project_utils Module
-
libkatepate.project_utils.add_environs(environs)[source]
-
libkatepate.project_utils.get_project_plugin()[source]
-
libkatepate.project_utils.is_version_compatible(version)[source]
selection Module
-
libkatepate.selection.setSelectionFromCurrentPosition(start, end, pos=None)[source]
text Module
-
libkatepate.text.insertText(text, strip_line=False, start_in_current_column=False, delete_spaces_initial=False, move_to=True)[source]
ui Module
Reusable code for Kate/Pâté plugins: UI elements
Show passive popup using native KDE API