Using Graphite, library developers can annotate their classes with pointers to specialized palettes, implemented using modern HTML5 technologies. An IDE extension discovers these palettes based on the code context when the user invokes the code completion command. Users interact with these palettes to provide parameters, which the palette uses to generate the appropriate code for insertion at the cursor.
This simple but powerful technique, which we call active code completion, makes it easy to integrate useful code generation tools directly into the editor, where developers can discover and use them most directly. Using several empirical methods, we examine the use cases where this could be useful, describe the design constraints governing the system architecture as well as particular palette interfaces, and describe the design of one such system, Graphite.
Click the screenshot above to watch a demonstration of the system in action, see below to download Graphite, and check out the slides [PDF, PPTX] and paper below for more details.
Graphite is free and open source software (Eclipse Public License) and available for download from Github. It should work pretty robustly, but we will try to fix any reported bugs. Feature requests are welcome too, but no promises.
If you have any questions, comments or suggestions, contact Cyrus Omar and/or YoungSeok Yoon. We'd love to see the palettes that you create! We'll consider distributing them alongside Graphite, in the examples directory, if you send us a pull request.
Cyrus Omar, YoungSeok Yoon, Thomas D. LaToza, Brad A. Myers, Active Code Completion.
ICSE'2012: 34nd International Conference on Software Engineering,
Zurich, Switzerland, 2-9 June 2012. pp. 859-869.
Cyrus Omar, YoungSeok Yoon, Thomas D. LaToza, Brad A. Myers,
"Active Code Completion," poster at
2011 IEEE Symposium on Visual Languages and Human-Centric
Computing (VL/HCC'11), Pittsburgh, PA, Sept. 18-22, 2011. pp. 261-262.