Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't autocomplete in certain sub project #222

Open
liujoey opened this issue Aug 3, 2015 · 5 comments
Open

can't autocomplete in certain sub project #222

liujoey opened this issue Aug 3, 2015 · 5 comments
Assignees
Labels

Comments

@liujoey
Copy link

liujoey commented Aug 3, 2015

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.

@liujoey
Copy link
Author

liujoey commented Aug 3, 2015

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?

@kleewho kleewho added the bug label Aug 3, 2015
@kleewho
Copy link
Collaborator

kleewho commented Aug 3, 2015

Thanks for this report. I'd like to finish #181 first cause I already spent some time there and then if noone fix this I handle it.

@liujoey
Copy link
Author

liujoey commented Aug 3, 2015

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.

@kleewho kleewho self-assigned this Aug 4, 2015
@kleewho
Copy link
Collaborator

kleewho commented Aug 6, 2015

@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 ervandew/eclim#417.

@npafitis
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants