Comments (7)
Here's a prototype/implementation of the function you've bound to "C-c C-e s"
(defun eclim-java-method-signature-at-point ()
"Find and display the method signature at point."
(interactive)
(let ((i (eclim--java-identifier-at-point t)))
;note: for some reason the "-t 'method'" portion of command doesn't function as expected for non-methods.
(eclim/with-results hits ("java_search" "-n" "-f" ("-o" (car i)) ("-l" (length (cdr i))) ("-t" "method") ("-x" "declarations"))
(echo-signature hits))))
(defun eclim-java-echo-signature (results)
(if (= 1 (length results))
(let ((result (elt results 0)))
(message (assoc-default 'message result)))
(error "found more than 1 result")))
I think there is a bug in the eclim code that handles the type request. In theory, running this function on a member variable should throw an error, but eclim still returns a result.
from emacs-eclim.
@ervandew do you have an insight on the problem @lespaul found?
from emacs-eclim.
Is the question: Why is eclim returning a result when -t method
was
supplied with the offset of an non-method element?
If so then the answer is that -t ...
argument is ignored for element
based searches since the type of the element is known. It's only used
for pattern searches where the type is not known.
If that's not the question, then I guess I need some clarification.
from emacs-eclim.
Thanks for answering the question! You're answering what I was confused about.
from emacs-eclim.
Sounds very promising this feature. It does seem that it's only half way there in the source, though. The shortcut is registered in emacs-eclim.el
, but the function cannot be found anymore (I see it was there once upon a time):
command-execute: Symbol's function definition is void: eclim-java-method-signature-at-point
from emacs-eclim.
My idea is to use info we have when completing symbol. There's info about method arguments so if I'll send smart arguments to complete (the right method name + maybe method arity) then I believe required eldoc info will be in place.
The problem I have right now is how to know that I'm in method call somewhere and how exactly is that method named. expand-region have special extension to eventually mark the method call... so I might look into this and maybe hack it somehow with it, but maybe (most probably) there's better way.
Is it reasonable approach?
from emacs-eclim.
Any progress on this?
from emacs-eclim.
Related Issues (20)
- Suggestion: Integration with Projectile? HOT 3
- Error in post-command-hook (global-eclim-mode-check-buffers): (void-function member-if) HOT 11
- Missing argument for option: n HOT 4
- eclim-run-java-doc fails for multiple projects HOT 1
- Eclim auto completion not working
- Why aren't the pull requests being reviewed? HOT 12
- toggle-maximize-buffer doesn't exist? HOT 2
- Mention new fork of emacs-eclim? HOT 1
- Problem with tramp when using .authinfo.gpg HOT 5
- company-emacs-eclim error: Project 'eclipse' does not have the required nature 'java' HOT 2
- url-insert-file-contents: http://melpa.org/packages/emacs-eclim-20160318.1747.tar: Not found HOT 1
- eclim freezes by auto-save-file HOT 10
- package name not compatible with use-package HOT 1
- Incorrect imports for nested classes when using company autocompletion HOT 1
- cannot open projects HOT 1
- emacs-eclim renamed to eclim in melpa HOT 7
- Directory does not exist: /home/user/eclipse/features HOT 6
- Emacs daemon startup hangs with (require 'eclim) HOT 3
- No "Create type" function? HOT 2
- Could not find or load main class org.test HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-eclim.