diff --git a/README.md b/README.md index dc3d8d7..cfae4d3 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,29 @@ It does a full text search based search (class, method, symbol (field)). ### meghanada-search-everywhere-ex -It does a full text search expart-mode (Enter a query for Lucene). +It does a full text search expert-mode (Enter a query for Lucene). + +Here is a list of fields that can be used in the search. + +* package +* class +* method +* symbol +* usage +* dc (method's or field's declaringClass) + +ex. Seach class name contains `Search` . + +``` +class:*Search* +``` + +It can also use `AND operator`. + +``` +dc:*Optional* AND usage:get +``` + ### meghanada-typeinfo diff --git a/meghanada.el b/meghanada.el index 7ba6986..564c723 100644 --- a/meghanada.el +++ b/meghanada.el @@ -1494,7 +1494,8 @@ e.g. java.lang.annotation)." (let* ((classes (nth 0 messages)) (methods (nth 1 messages)) (symbols (nth 2 messages)) - (contents (nth 3 messages))) + (usages (nth 3 messages)) + (contents (nth 4 messages))) (save-excursion (when (> (length classes) 0) (insert (propertize (format "Classes: ") @@ -1517,6 +1518,13 @@ e.g. java.lang.annotation)." (dolist (c symbols) (insert (format "%s\n" c))) (insert "\n")) + (when (> (length usages) 0) + (insert (propertize (format "Usages: ") + 'face '(:weight bold))) + (insert "\n") + (dolist (c usages) + (insert (format "%s\n" c))) + (insert "\n")) (when (> (length contents) 0) (insert (propertize (format "Code:\n") 'face '(:weight bold)))