emacs-eclim
emacs-eclim copied to clipboard
can't autocomplete in certain sub project
I have a root project and few sub projects
icon
|---type-system
|---libicon
|---UIMAWrapper
|---cds
where icon
is the parent, and libicon
is the core of whole project. libicon
depends on type-system
, then other sub projects depends on libicon
. The root project depends on all sub projects.
Now, when I editing any file under UIMAWrapper
or cds
projects, all works fine. But when I edit any file under libicon
project, NOTHING works. eclim-java-find-declaration
doesn't work, I've metioned this in #184, it just showing
-*- mode: eclim-find; default-directory: /home/joey/workspace/icon/libicon/src/main/java/com/some/company/util/ -*-
eclim java_search -p wordTokens
company auto complete doesn't work neither. In message buffer it shows
Company: Back-end company-emacs-eclim error "Source file 'libicon/src/main/java/com/some/company/util/NPTerminalESWrapper.java' not found in any of the project's designated source directories defined in the project's .classpath file." with args (candidates ad)
This error only occur when I'm editing files under libicon
project, and I tried to compare the .project file and the .classpath file, nothing looks wrong. In eclim window, it shows the error from this line: JavaUtils.java
I've also tried upgrade eclipse to eclipse-mars, upgrade eclim to 2.5, but it didn't help.
Finally I tried edit the same file in Vim, the completion works as expected, nothing wrong happens there.
by look into eclim java code here --> ProjectUtils.java, I'm now curious that if we search project libicon
and file libicon/src/main/...
, is the duplicates of the project name in path make the error? Should we use src/main/...
instead as the path of the file? But why other sub projects in my workspace works fine?
Thanks for this report. I'd like to finish https://github.com/senny/emacs-eclim/issues/181 first cause I already spent some time there and then if noone fix this I handle it.
if I remove the root project from eclipse, then the issue is solved. So I guess it is the case that when -p
option sets to the sub project name and -f
option use the relative path to the root project causes this issue.
@liujoey I'd like to ask you to eval this somewhere in emacs (setq eclim-print-debug-messages t)
. Then try to do completion when parent project is present and when it is not. In message buffer you'll find several messages about different eclim
calls which are ready to copy to shell and fire there. I guess interesting calls would be: project_by_resource
, project_link_resource
and java_complete
all with results.
I reported just now issue that might or might not be related in https://github.com/ervandew/eclim/issues/417.
I'm having the same issue. I'm using eclim through the java-layer in spacemacs, and auto-complete while trying to edit a java file in a subproject emits the same error. in a sense subprojects are not recognised in eclim although they do have their own .classpath and .project