Skip to content
Browse files

Adapting the code to the las version of pyplete

  • Loading branch information...
1 parent ed2216e commit de7453f94341f84f5fab36d277a7f8383e961121 @goinnn committed Sep 2, 2012
Showing with 7 additions and 5 deletions.
  1. +7 −5 kate_plugins/autopate.py
View
12 kate_plugins/autopate.py
@@ -47,21 +47,23 @@ def __init__(self, model, resultList=None):
}
@classmethod
- def createItemAutoComplete(cls, text, icon='unknown', args=None, description=None):
+ def createItemAutoComplete(cls, text, category='unknown', args=None, description=None):
icon_converter = {'package': 'code-block',
'module': 'code-context',
'unknown': 'unknown',
'constant': 'code-variable',
'class': 'code-class',
- 'function': 'code-function'}
+ 'function': 'code-function',
+ 'pointer': 'unknown'}
max_description = 50
if description and len(description) > max_description:
description = description.strip()
description = '%s...' % description[:max_description]
return {'text': text,
- 'icon': icon_converter[icon],
+ 'icon': icon_converter[category],
+ 'category': category,
'args': args or '',
- 'type': icon,
+ 'type': category,
'description': description or ''}
def completionInvoked(self, view, word, invocationType):
@@ -184,4 +186,4 @@ def getChildrenInJSON(self, keys, json):
if keys_split and keys_split[0] in json:
keys = self.SEPARATOR.join(keys_split[1:])
return self.getChildrenInJSON(keys, json[keys_split[0]].get('children', None))
- return None
+ return None

0 comments on commit de7453f

Please sign in to comment.
Something went wrong with that request. Please try again.