Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Google Summer of Code 2015/JDT UI Code Completion and Refactoring
Contents
Contact
gabor at_sign kovesdan dot_here org
Project Goals
- Exploring current refactoring features of JDT UI, especially those related to Java 8 and extend its functionality with new features. For example: refactoring to Optional<T>, using String.join instead of StringBuffer, new Date API etc.
- Implement a simplified substring code completion. Only a small subset of substring matching will be implemented, which are useful to be an integral part of JDT UI. For example, .SelectionListener should match .addSelectionListener but not .addSelectionTestListener or .SL should match .addSelectionListener and .setSelectionListener but not .addSelectionTestListener.
- Implement postfix code completion. It increases developer productivity by reducing the need to jump back in the code. Often we start to type variable or type names and then we realize we have to go back to put a specific keyword before, such as if or throw. A demo about the concept is available [1] Also, there is some work done towards this feature. I propose reviewing and integrating this to JDT.
General TODO
Create wiki for GSOC
Introduction mail to JDT UI list
Clone JDT UI at Github
Sign CLA
Configure my workspace for the work, including Gerrit setup
Code
The code will be available on GitHub: https://github.com/gaborbsd/JDT_UI_SOC2015
Details on Substring completion
Substring code completion will offer any possible suggestions that the pattern matches in a case insensitive way. However, matches that match exactly or match the camel case initials, will be listed with a higher relevance.
Java code completion is implemented in org.eclipse.jdt.internal.codeassist.CompletionEngine. This class relies on the matching functions implemented in org.eclipse.jdt.core.compiler.CharOperation. The main matching logic should be thus implemented in the latter class.
Related Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350000
Details on Tail Completion completion
We have already a partial contribution for this to JDT, see https://github.com/trylimits/Eclipse-Postfix-Code-Completion https://git.eclipse.org/r/#/c/40855/
Details on Refactoring
Resources on Raffi's page: https://openlab.citytech.cuny.edu/khatchad/research/background/