artur-shaik / vim-javacomplete2

DEPRECATED in favor of jc.nvim
Vim License
974 stars 83 forks source link

Intelligent Output of completion #144

Closed wsdjeg closed 8 years ago

wsdjeg commented 8 years ago

maybe it is better split these two features,import and import static,because there no need to do something for auto import static ,because IDE has no feature like this!

completion after import static,end of this statement must be static!

here is my example class which has been compiled with no error! in this class there are two error line has been annotated.

2015-11-25 20-17-58

in another class these should be complete:

same example as above: after import these should be complete:

conclusion importstatement should be able use auto import these is diff from import static

wsdjeg commented 8 years ago

hi @artur-shaik @DonnieWest @mattn i think i have finshed the completion frame after import and import static,what do you think,anything need to be added?

wsdjeg commented 8 years ago

when and where do add all classes in classpath to a list ,i am reading the src of the plugin,is the list named g:JavaComplete_Cache?

artur-shaik commented 8 years ago

Made some changes, can you play with it?

wsdjeg commented 8 years ago

thank you ,i just get home ,let me have a try!

wsdjeg commented 8 years ago

2015-11-26 16-50-48 the third one should be Testi instead of nestedclass itself

artur-shaik commented 8 years ago

What is Testi? Can you show your Test class content?

wsdjeg commented 8 years ago

2015-11-26 18-02-15

artur-shaik commented 8 years ago

Ok, can you play with it, one more time?

wsdjeg commented 8 years ago

great man!!! let me have a test

wsdjeg commented 8 years ago

greate it works well!

wsdjeg commented 8 years ago

after import static in works well,but after import some thing diff

wsdjeg commented 8 years ago

2015-11-26 21-33-51 here only hava nostatic innerclass,pleass add static class

wsdjeg commented 8 years ago

i have find Testi can be auto add ,thank you

artur-shaik commented 8 years ago

Aaand here is it :smile:

wsdjeg commented 8 years ago

how fast! let me try

wsdjeg commented 8 years ago

wow ,great!!!!works well

wsdjeg commented 8 years ago

the input will be remember,please clean it after import

2015-11-26 21-53-14

artur-shaik commented 8 years ago

@wsdjeg yeah, this is another one issue.

wsdjeg commented 8 years ago

if the very strange,i can complete in import static,but can not complete in method! here is test R.java 2015-11-26 22-04-19 2015-11-26 22-02-06

2015-11-26 22-02-32

artur-shaik commented 8 years ago

Can you try, again?

wsdjeg commented 8 years ago

thank you very much ,greate it works very well with R.java.i think it must be known by @DonnieWest 2015-11-26 22-54-16 2015-11-26 22-59-27

DonnieWest commented 8 years ago

Having some issues here unfortunately - @wsdjeg how are you adding the R.java file to javacomplete?

I've tried a few things and it's not properly completing the file, but I'm guessing it's with my configuration

wsdjeg commented 8 years ago

no need to set anything,it is jc2 feature ,auto add maven output dir into classpath,it contains com.wsdjeg.helloworld.R.class.i do not add R.java.because R.java and R.class were created at same time,and will not be edite mannuly. for example my maven outputdir is /path/to/project/target/classes R.class is here path/to/project/target/classes/com/wsdjeg/helloworld/R.class my

wsdjeg commented 8 years ago

also you can add it to g:JavaComplete_LibsPath,it also works

wsdjeg commented 8 years ago

there is no need care about R.java. just R.class willbe ok

wsdjeg commented 8 years ago

you can have a look at my last PR for pom

DonnieWest commented 8 years ago

Odd - on Gradle it's not completing even when R.class is added to the g:JavaComplete_LibsPath

I'll have to play around with it some more.

wsdjeg commented 8 years ago

strange why?just add to classpath use complete path ,do not just use relative path

wsdjeg commented 8 years ago

can use show me the out put of echo g:JavaComplete_LibsPath when you open a java file

wsdjeg commented 8 years ago

in maven project aar package works well.because maven will unpackage it and auto add to classpath

wsdjeg commented 8 years ago

https://github.com/artur-shaik/vim-javacomplete2/pull/146

wsdjeg commented 8 years ago

for example test.aar.classes.jar wilk be unpackage into target/generate-unpckaged/test.jar and add to buildclasspath

artur-shaik commented 8 years ago

@DonnieWest, didn't you forget to recompile javavi lib?

mattn commented 8 years ago

Sorry, I can't understand what you mean.

wsdjeg commented 8 years ago

sorry it my fault, i have reset my fork

wsdjeg commented 8 years ago

strange completion 2015-11-27 21-10-36 2015-11-27 21-10-46

artur-shaik commented 8 years ago

@wsdjeg you mean class?

wsdjeg commented 8 years ago

no after id should be compete edite 2015-11-26 22-04-19

wsdjeg commented 8 years ago

there is no error in import statement and import static

wsdjeg commented 8 years ago

2015-11-27 22-07-27 2015-11-27 22-07-37 2015-11-27 22-07-47 2015-11-27 22-08-27 ![Uploading 2015-11-27 22-08-27屏幕截图.png…]()

artur-shaik commented 8 years ago

Now should work right.

wsdjeg commented 8 years ago

wow ^_^ works well,need wo close this issue? it is too long

artur-shaik commented 8 years ago

You decide, you are the tester. :smile:

wsdjeg commented 8 years ago

thank you,i will do some test,and report it!

wsdjeg commented 8 years ago
wsdjeg commented 8 years ago

just same as innerclass 2015-11-27 23-08-48

artur-shaik commented 8 years ago

Can you create separate issues, please? And this can be closed as I see.

wsdjeg commented 8 years ago

ok i will open an new issue