GRECLIPSE

Extension of the GroovyCompiler class to generate an AST without resolving the classes

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.5.1, 1.5.6
  • Fix Version/s: 1.5.6
  • Component/s: Compiler Integration
  • Labels:
    None
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

Description

In certain situations we needed AST Nodes of certain pieces of code (mostly to get proper line / col informations for little code snippets that are being moved during a refactoring). Sometimes these snippets contain references to other classes and these can then not be found in the extracted snippet. And the generation of the AST fails.

To solve this problem we introduced the method getUnResolvedAST() in "IGroovyCompilerConfiguration". With this parameter the AST is only generated till phase 3 which basically does the trick for us - we're getting an AST with the pos. infos without failing compilations in the mentioned cases.

A testcase that shows the new behavior is included

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: