There are 4 depended projects here:
eclipse-plugin- actual source code for the plugin;deepcode-feature- description and legal information about plugin, as well as some Eclipse required service wrappers;deepcode-update-site- "update-site" to be given for Eclipse: Preferences - Install/Update - Available Software Sites;plugin-test-fragment- tests for plugin.
Read more about Eclipse plugin concepts at official Eclipse Plug-in Development Environment Guide or in quick overview Custom eclipse plugin | Build, create & publish to update site & marketplace or the most recent Eclipse IDE Plug-in Development: Plug-ins, Features, Update Sites and IDE Extensions
- Clone this repository:
git clone https://github.com/DeepCodeAI/eclipse-plugin.gitand checkout desired branch; - Place
java-client-{X.X.X}-all.jarinto..\eclipse-plugin\libsdir (see java-client repository for instruction how to build it); - Make sure Eclipse IDE for Eclipse Committers installed along with Java 8 (preferably 11) or above;
- Open root
eclipse-pluginDirectory fromFile - Open Projects from File System...and make sure root dir is unselected as shown below:
After all steps in wizard you should have all 4 projects mentioned above opened in your Workbench.
See below correspondent java-client version requirements:
| eclipse-plugin | java-client |
|---|---|
| 0.0.9 | 2.0.10 |
| 0.0.11 | 2.0.12 |
| 0.0.17 | 2.0.17 |
- Modify
.classpathfile insideplugin-test-fragmentproject to provide path tojava-client-{X.X.X}-all.jarlocation;
Now you should be able to:
- modify and run plugin itself at
eclipse-pluginproject:
- update needed texts and version number at
deepcode-featureproject; - Build it all into update-site in
deepcode-update-siteproject; - For running tests use
plugin-test-fragmentproject and in Package Explorer select theRun As > JUnit Plug-in Testcommand:
-
To prevent tests be blocked by dialogs in UI (and the annoying Eclipse Window to pop up) during testing make sure the default test configuration is in "headless mode" You'll see some internal Exceptions due to absent of Eclipse GUI components, but all tests should pass correctly.
-
2 environment variables with already logged Tokens need to be declared:
DEEPCODE_API_KEY - logged at https://www.deepcode.ai Token
DEEPCODE_API_KEY_STAGING - logged at https://www.deepcoded.com Token
Production ready plugin should be available in Eclipse Marketplace (Help - Eclipse Marketplace...).
If you would like to add update-site manually (or add local version of update-site) then use this tutorial and add your local copy of update-site project or recent GitHub stored dev version of it: https://v-raw-githubusercontent-com.286600.xyz/DeepCodeAI/eclipse-plugin/dev/deepcode-update-site
If you need to test modified plugin during development process - use Run As - Eclipse Application at your Eclipse IDE for Eclipse Committers (see here).
If you need to test pure plugin *.jar on another Eclipse IDE instance without updating feature and update-site you can use this trick FAQ How do I install new plug-ins?
Before publishing following two jar files need to be signed inside deepcode-update-site project with jarsigner tool (see links below please):
deepcode-update-site/features/ai.deepcode.feature_{X.X.X}.jar
deepcode-update-site/plugins/ai.deepcode_{X.X.X}.jar
Example:
keytool -importkeystore -srckeystore ./deepcode.ai.pfx -srcstoretype PKCS12 -destkeystore ./deepcode.ai.jks -deststoretype pkcs12 -trustcacerts
jarsigner -keystore ./deepcode.ai.jks ./deepcode-update-site/features/ai.deepcode.feature_{X.X.X}.dev.jar deepcode.ai
jarsigner -keystore ./deepcode.ai.jks ./deepcode-update-site/plugins/ai.deepcode_{X.X.X}.jar deepcode.aiCurrent certificate is issued on 2020-09-09. Make sure you re-issue it every 90 days or buy one with 1-year validity. Certification site
- official Eclipse Platform Plug-in Developer Guide, in particular:
- official Eclipse Plug-in Development Environment Guide
- The Official Eclipse FAQs


