-(defun company-eclim--templatify (call)
- (let* ((end (point))
- (beg (- (point) (length call)))
- (templ (company-template-declare-template beg end)))
- (save-excursion
- (goto-char beg)
- (while (re-search-forward "\\([(,] ?\\)\\([^ ]+ \\)\\([^ ,)]*\\)" end t)
- (let ((name (match-string 3)))
- (replace-match "\\1" t)
- (decf end (length (match-string 2)))
- (company-template-add-field templ (point) name))))
- (company-template-move-to-first templ)))
+(defun company-eclim--prefix ()
+ (let ((prefix (company-grab-symbol)))
+ (when prefix
+ ;; Completion candidates for annotations don't include '@'.
+ (when (eq ?@ (string-to-char prefix))
+ (setq prefix (substring prefix 1)))
+ prefix)))