diff --git a/company-meghanada.el b/company-meghanada.el index 056ccf5..20adf23 100644 --- a/company-meghanada.el +++ b/company-meghanada.el @@ -297,8 +297,15 @@ (defun company-meghanada--post-completion (arg) (let ((type (intern (get-text-property 0 'type arg))) - (meta (get-text-property 0 'meta arg))) - + (meta (get-text-property 0 'meta arg)) + (desc (get-text-property 0 'desc arg)) + (anno (company-meghanada--annotation arg))) + ;;(message (format "@ arg:%s meta:%s desc:%s anno:%s" arg meta desc anno)) + (meghanada-autocomplete-resolve-async + type + arg + desc + #'identity) (pcase type ;; completion class (`CLASS (company-meghanada--post-class arg)) diff --git a/meghanada.el b/meghanada.el index c12f7d0..03e78cc 100644 --- a/meghanada.el +++ b/meghanada.el @@ -1,3 +1,4 @@ + ;;; meghanada.el --- A better java development mode -*- coding: utf-8; lexical-binding: t; -*- ;; Copyright (C) 2017 Yutaka Matsubara @@ -1033,6 +1034,20 @@ e.g. java.lang.annotation)." prefix) (message "client connection not established"))) +(defun meghanada-autocomplete-resolve-async (type item desc callback) + "TODO: FIX DOC TYPE ITEM DESC CALLBACK." + (if (and meghanada--client-process (process-live-p meghanada--client-process)) + (meghanada--send-request "cr" + callback + (buffer-file-name) + (meghanada--what-line) + (meghanada--what-column) + (format "\"%s\"" type) + (format "\"%s\"" item) + (format "\"%s\"" desc)) + (message "client connection not established"))) + + (defun meghanada--local-val-callback (result) "TODO: FIX DOC OUTPUT ." (let* ((return-type (car result))