GRECLIPSE

Provide quick fixes and quick assists for common errors and tasks

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Major 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
  1. groovy_quick_fix_framework_greclipse_171__v20101209_0041.patch
    08/Dec/10 11:49 PM
    49 kB
    Nieraj Singh

Activity

Hide
Andrew Eisenberg added a comment -

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.

Show
Andrew Eisenberg added a comment - 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.
Hide
Andrew Eisenberg added a comment -

Some more:

Remove semi-colons
Convert from Java-style to Groovy-style

Show
Andrew Eisenberg added a comment - Some more: Remove semi-colons Convert from Java-style to Groovy-style
Hide
Andrew Eisenberg added a comment -

Nieraj, would you want to look at this? Decide which quick fixes to work on and create sub-tasks for them.

Show
Andrew Eisenberg added a comment - Nieraj, would you want to look at this? Decide which quick fixes to work on and create sub-tasks for them.
Hide
Nieraj Singh added a comment -

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.

Show
Nieraj Singh added a comment - 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.
Hide
Nieraj Singh added a comment -

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
Show
Nieraj Singh added a comment - 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
Hide
Nieraj Singh added a comment -

Changes:

  • Integrated new Groovy ImportRewrite into add import quick fix.
Show
Nieraj Singh added a comment - Changes:
  • Integrated new Groovy ImportRewrite into add import quick fix.
Hide
Andrew Eisenberg added a comment -

Thanks, Nieraj. Committed to head and will make it into the 2.1.1 release.

Show
Andrew Eisenberg added a comment - Thanks, Nieraj. Committed to head and will make it into the 2.1.1 release.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: