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

javavi cannot compilet / socket cannot be open - manually solved issue? #273

Closed
alnavv opened this issue Oct 26, 2016 · 4 comments
Closed

Comments

@alnavv
Copy link

alnavv commented Oct 26, 2016

Actual behavior (Required!)

javavi cannot compile + socket cannot be open (for completion)

Expected behavior (Required!)

code completion

The steps to reproduce actual behavior (Required!)

  1. Install latest version of the plugin
  2. usinng map jI for triggering completion
  3. ...

Environment (Required!)

  • OS: debian jessie
  • Vim version: 7.4
  • Neovim version: 0.1.5

Solution

Following one of the threads exposing similar problem, #165, came up wiht manual compilation:

cd /$HOME/.config/nvim/plugged/vim-javacomplete/libs/javavi; mvn compile

afterwards the plugin works as expected.

Note: I may enable logs (as described in Q&A), minimun vimrc conf, and try to reproduce again if you need so ...

Q&A

  • Yes, I tried minimal .vimrc configuraion.
  • Yes, I have enabled logs with JCdebugEnableLogs and can put here content of JCdebugGetLogContent command, if you need.
  • Even, if you wish, I can set g:JavaComplete_JavaviDebug to 1, than set g:JavaComplete_JavaviLogfileDirectory, and put here server logs, too.

Screenshot (Optional)

The output of :redir and :message (Optional)

@artur-shaik
Copy link
Owner

Hi, you can set let g:JavaComplete_ShowExternalCommandsOutput = 1 to see maven output on automatic compilation. But before, make mvn clean in javavi folder.

@alnavv
Copy link
Author

alnavv commented Nov 1, 2016

Hi, sorry for a bit of delay (busy times).

I installed everything from scratch, using the option your mentioned (also mvn clean ...), so:
-> now it works again. I received the message "socket cannot be opened" once, but it worked (javavi compiled).
-> jI triggers imports correctly, but also shows the message: "import already exists". It doest not really exist, and although it triggers the "imports" correctly also shows that wrong message.

Also:
-> In a (relatively) big project Maven/Gradle the plugin is not working at all for importing classes/functions in dependencies located outside of the git repo where the project resides.
Regarding this last issue, as soon as I will gain more knowledge about Gradle/Maven (I am a C++ dev), i will let you know the exact problem.

@alnavv alnavv closed this as completed Nov 1, 2016
@alnavv alnavv reopened this Nov 1, 2016
@artur-shaik
Copy link
Owner

You see, when socket cannot be opened happens, plugin try to start server, if it doesn't find server, it run compilation. So, actually, it is not an issue.

jI means to find all imports, so when it find some already imported, it writes import already exists. So this is not an issue, as well. If you want find import on class under cursor, you should use ji.

May be it would be better to make this messages suppressed in future.

@artur-shaik
Copy link
Owner

Will close for now, feel free to open if required.

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

No branches or pull requests

2 participants