GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-698

Inferencing of static imports and * imports not working

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1Release
    • Fix Version/s: 2.1.1Release
    • Component/s: Inferencing Engine
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Due to the breaking changes in api between the Groovy 1.6 and 1.7 streams, we are not sending the inferencing visitor down the static and * imports of a module node.

      I think the solution here is to create a compatibility class in the two org.codehaus.groovy projects that, when asked return all of the ImportNodes of a module node. For 1.6 workspaces, this will not include the static and * imports, but for 1.7 workspaces, this will.

        Activity

        Hide
        Andrew Eisenberg added a comment -

        Another confounding issue is that there is no ClassNode for static and * imports. What this means is that there will need to be special logic in SimpleTypeLookup and TypeReferenceSearchRequestor that looks at the string of the import statement.

        Of course, this will cause further problems because we don't know exactly what the underlying text is. Ie, all are valid import statements:

        import foo
        import      foo
        import /*comment*/ foo
        

        I think we will have to make an assumption that import statements are of standard format and just not handle non-standard import statements. Arrgh.

        Show
        Andrew Eisenberg added a comment - Another confounding issue is that there is no ClassNode for static and * imports. What this means is that there will need to be special logic in SimpleTypeLookup and TypeReferenceSearchRequestor that looks at the string of the import statement. Of course, this will cause further problems because we don't know exactly what the underlying text is. Ie, all are valid import statements: import foo import foo import /*comment*/ foo I think we will have to make an assumption that import statements are of standard format and just not handle non-standard import statements. Arrgh.
        Hide
        Andrew Eisenberg added a comment -

        Will try to solve this for 2.1.1.

        Show
        Andrew Eisenberg added a comment - Will try to solve this for 2.1.1.
        Hide
        Andrew Eisenberg added a comment -

        Fixed with regression tests.

        Show
        Andrew Eisenberg added a comment - Fixed with regression tests.

          People

          • Assignee:
            Andrew Eisenberg
            Reporter:
            Andrew Eisenberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: