Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.1.1Release
-
Component/s: Editor
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :2
Description
Quick fixes:
- Add import statement
- Move to correct package location
- Change package declaration
Quick assists:
- rename field/variable/method/class
- rename Compilation unit to currently selected type name
Attachments
-
- groovy_quick_fix_framework_greclipse_171__v20101209_0041.patch
- 08/Dec/10 11:49 PM
- 49 kB
- Nieraj Singh
-
$i18n.getText("admin.common.words.hide")
- groovy_quick_fix_plugin_greclipse_171__v20101209_0041.zip
- 08/Dec/10 11:49 PM
- 47 kB
- Nieraj Singh
-
- org.codehaus.groovy.eclipse.quickfix/.classpath 0.4 kB
- org.codehaus.groovy.eclipse.quickfix/.project 0.7 kB
- org.codehaus.groovy.eclipse.quickfix/.../org.eclipse.jdt.core.prefs 0.4 kB
- org.codehaus.groovy.eclipse.quickfix/.../MANIFEST.MF 0.8 kB
- org.codehaus.groovy.eclipse.quickfix/.../GroovyQuickFixPlugin.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../GroovyQuickFixProcessor$1.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../GroovyQuickFixProcessor.class 6 kB
- org.codehaus.groovy.eclipse.quickfix/.../AbstractGroovyQuickFixProposal.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../AbstractQuickFixResolver.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../AddMissingGroovyImportsResolver$AddMissingImportProposal.class 4 kB
- org.codehaus.groovy.eclipse.quickfix/.../AddMissingGroovyImportsResolver.class 6 kB
- org.codehaus.groovy.eclipse.quickfix/.../ConvertToGroovyFileResolver$ConvertToGroovyQuickFix.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../ConvertToGroovyFileResolver.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../GroovyProblemFactory.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../GroovyQuickFixResolverRegistry.class 4 kB
- org.codehaus.groovy.eclipse.quickfix/.../IProblemDescriptor.class 0.3 kB
- org.codehaus.groovy.eclipse.quickfix/.../IProblemType.class 0.2 kB
- org.codehaus.groovy.eclipse.quickfix/.../IQuickFixProblemContext.class 0.7 kB
- org.codehaus.groovy.eclipse.quickfix/.../IQuickFixResolver.class 0.4 kB
- org.codehaus.groovy.eclipse.quickfix/.../ProblemDescriptor.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../ProblemType.class 1 kB
- org.codehaus.groovy.eclipse.quickfix/.../QuickFixProblemContext.class 2 kB
- org.codehaus.groovy.eclipse.quickfix/build.properties 0.1 kB
- org.codehaus.groovy.eclipse.quickfix/plugin.xml 0.4 kB
- org.codehaus.groovy.eclipse.quickfix/.../GroovyQuickFixPlugin.java 3 kB
- org.codehaus.groovy.eclipse.quickfix/.../GroovyQuickFixProcessor.java 7 kB
- org.codehaus.groovy.eclipse.quickfix/.../AbstractGroovyQuickFixProposal.java 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../AbstractQuickFixResolver.java 2 kB
- org.codehaus.groovy.eclipse.quickfix/.../AddMissingGroovyImportsResolver.java 9 kB
- org.codehaus.groovy.eclipse.quickfix/.../ConvertToGroovyFileResolver.java 3 kB
$i18n.getText("admin.common.words.show")- groovy_quick_fix_plugin_greclipse_171__v20101209_0041.zip
- 08/Dec/10 11:49 PM
- 47 kB
- Nieraj Singh
Activity
Some more:
Remove semi-colons
Convert from Java-style to Groovy-style
Nieraj, would you want to look at this? Decide which quick fixes to work on and create sub-tasks for them.
The initial implementation of this feature contains a new Groovy Quick Fix framework to make it easier to contribute Groovy quick fixes, along with two new quick fixes:
1. Convert to Groovy when a ";" is missing in a Java file in a Groovy project
2. Add missing imports for unresolved types in a Groovy file.
Note that these quick fixes only appear if the problems are contained in a Groovy project. They will not appear in any other project
type.
The first quick fix can be readily enhanced in the future to handle other problem types aside from a missing ";" when invoking the
convert to Groovy quick fix. All that needs to be done is to define more problem types (IProblemType) that the "convert to Groovy" quick fix should handle.
The following changes were made:
- Merged changes in OrganizeGroovyImports
- Use statics to refer to JDT problem markers
- Fixed NPE in Groovy quick fix processor, thrown when invoking quick fix on an undefined error
- Refactored Java type search into its own class
- Merged changes in OrganizeGroovyImports
- Use statics to refer to JDT problem markers
- Fixed NPE in Groovy quick fix processor, thrown when invoking quick fix on an undefined error
- Refactored Java type search into its own class
Changes:
- Integrated new Groovy ImportRewrite into add import quick fix.
- Integrated new Groovy ImportRewrite into add import quick fix.
Thanks, Nieraj. Committed to head and will make it into the 2.1.1 release.
Temporarily unassigning, but we hope to do some work on this in the future. First step is to determine what quick fixes should be available.