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]
libkatepate.common.getBoundTextRangeSL(leftBoundary, rightBoundary, pos, doc)[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!

libkatepate.common.getCommentStyleForDoc(doc)[source]

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]
libkatepate.common.isKnownCommentStyle(docType)[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.comment_char_must_be_known(dummy=None)[source]
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.hideOldPopUps()[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]

menu Module

libkatepate.menu.findMenu(menu_parent_slug)[source]
libkatepate.menu.move_menu_submenu(menu_slug, submenu_slug)[source]
libkatepate.menu.separated_menu(menu_parent_slug)[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

libkatepate.pred.blockCommentEnd(line)[source]

True if line contains C/C++ block-comment-end

libkatepate.pred.blockCommentStart(line)[source]

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

libkatepate.pred.onlySingleLineComment(line)[source]

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.add_extra_path(extra_path)[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

libkatepate.ui.popup(caption, text, iconName=None, iconSize=16)[source]

Show passive popup using native KDE API

Table Of Contents

Previous topic

kate Package

This Page