TabNine-Eclipse is a plug-in working in Eclipse Platform with the core executable file from TabNine by zxqfl.
This repository is the source code of TabNine-Eclipse, but with no core file which provided from TabNine.
This plug-in is developed and tested in JDK 1.8 and Eclipse platform 2019-09 Release.
This plug-in support follows editor now:
You can clone this repo by command line or just download ZIP pack, in short you should put the source code in your Eclipse workspace firstly.
Start Eclipse and open workspace, import the plug-in project as "Projects from Folder or Archive"(File Menu -> Import -> General -> Projects from Folder or Archive -> Select directory and impoort this plug-in project).
If you will use this plug-in in a online enviroment, this step can be just skipped.
If you will use this plug-in in a offline enviroment, open the com.tabnine.eclipse.module.impl.TabNineCoreRunnerBasicImpl.java, then run it as a Java Application using Eclipse(You can also run it by the command line tools of Java like javac/java).
When this application successfully ended, a TabNine Core file with latest version saving in the /target/tabnine-core/${TABNINE_VERSION}/${OS_PLATFORM}/ position, copy that tabnine-core folder to /src/main/resources/tabnine-core position. so it will be export to the plug-in package when we compile.
Note: This step must be processed with Eclipse or other OSGi platform util, cause we need to pack this plug-in with the rule provided by Eclipse
If you choose Eclipse root folder as the exporting destination, you can just skip this type.
Put the JAR file we got from exportation to the /plugin folder under Eclipse root folder(e.g. C:\Program Files\eclipse\jee-2019-09R\eclipse\plugins).
you can also unpack the JAR file and put unpacking result to this folder, it still works(But don't put the JAR file and unpacking document together).
Start or restart the Eclipse where you put plug-in in, and the use it.
When this plug-in is used in a offline enviroment, we can turn off the downloader by set constant com.tabnine.eclipse.constant.TabNineConstants#IS_TABNINE_CORE_DOWNLOADER_AVAILABLE to false.
When we send completion request to TabNine core program, we can take the context text from current line or the whole document. That would affect the accuracy and cost of TabNine core program.
We can change this setting by editing follow constant: