Groovy Imports
A Sublime Text 2 plugin for inserting import statements into groovy code
Details
Installs
- Total 559
- Win 263
- Mac 194
- Linux 102
| Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
A Sublime Text 2 plugin for inserting import statements into groovy code
No setup is required. The plugin finds possible imports:
- By looking through other classes in the same project
- By looking at imports in other classes in the same project
- It is unaware of imports in libraries or the jdk, but you can make the plugin aware of common ones by adding a custom import (see: Tools > Groovy Imports > Edit custom imports)
Most people don't want their imports re-organized automatically, so the plugin attempts to insert new imports near similar ones. (But there is some scope for improvement here).
How to install
With Package Control:
- Run “Package Control: Install Package” command, find and install the “Groovy Imports” plugin.
Manually:
- Clone the git repo (https://github.com/carwinz/groovy-sublime-imports) into your packages folder (in ST, Preferences > Browse Packages… menu item to open this folder)
Usage
By default, imports will be automatically added when groovy files are saved, however you can turn this off in the config.
The default shortcut is Ctrl+Shift+Alt+i. Or use Go to Tools > Groovy Imports > Add imports
Future Development
- The order that the imports are added needs some more tweaking
- Support for wildcard imports (e.g. “some.package.*”)
- If multiple options exist, pop up a dialog to select one
- If a classname is used in a string, don't import it