Skip to content

Commit

Permalink
Improve search results view
Browse files Browse the repository at this point in the history
  • Loading branch information
mopemope committed Apr 6, 2018
1 parent f96d6d3 commit 5479b42
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 9 additions & 1 deletion meghanada.el
Original file line number Diff line number Diff line change
Expand Up @@ -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: ")
Expand All @@ -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)))
Expand Down

0 comments on commit 5479b42

Please sign in to comment.