Loading ...
Sorry, an error occurred while loading the content.

Re: Organize Imports

Expand Messages
  • dscotney2
    Hi Gerald I for one would vote to add it. B.T.W. I don t know if you get tired of people saying this, but thanks for your time and effort that you put into
    Message 1 of 4 , May 2, 2003
    • 0 Attachment
      Hi Gerald

      I for one would vote to add it.

      B.T.W. I don't know if you get tired of people saying this, but thanks
      for your time and effort that you put into Gel.

      Regards,

      Derek.

      --- In gelide@yahoogroups.com, "Gerald Nunn" <gnunn@g...> wrote:
      > I had a quick look at this, it is relatively easy to add if the
      imports required are gathered from the class file rather then doing a
      compilation. This lessens the usefullness somewhat in my opinion but
      can still be used to eliminate unneeded imports. Is this a good thing
      to add or should we just leave it off for now?
      >
      > Gerald
    • Tom Copeland
      ... The tricky part about this - and I m sure you ve already realized this - is that since static finals are inlined, the class files don t always have all the
      Message 2 of 4 , May 5, 2003
      • 0 Attachment
        On Fri, 2003-05-02 at 02:27, Gerald Nunn wrote:
        > I had a quick look at this, it is relatively easy to add if the imports required are gathered from the class file rather then doing a compilation. This lessens the usefullness somewhat in my opinion but can still be used to eliminate unneeded imports. Is this a good thing to add or should we just leave it off for now?

        The tricky part about this - and I'm sure you've already realized this -
        is that since static finals are inlined, the class files don't always
        have all the types listed in them. Blah. This was dicussed on the
        advanced java list at one point, and it turns out this inlining is
        required by the JLS - otherwise switch statements couldn't reference
        static finals since they wouldn't be constant, so the compiler couldn't
        set up the case statement branching, blah blah blah.

        This is a bummer for my little ImportScrubber utility -
        http://importscrubber.sf.net/ - because it parses class files to figure
        out required imports. Oh well.

        See ya,

        Tom
      • Gerald Nunn
        ... Good points, if it can t be done perfectly using class files then I think I will leave it off for now. Gerald
        Message 3 of 4 , May 5, 2003
        • 0 Attachment
          >The tricky part about this - and I'm sure you've already realized this -
          >is that since static finals are inlined, the class files don't always
          >have all the types listed in them. Blah. This was dicussed on the
          >advanced java list at one point, and it turns out this inlining is
          >required by the JLS - otherwise switch statements couldn't reference
          >static finals since they wouldn't be constant, so the compiler couldn't
          >set up the case statement branching, blah blah blah.

          Good points, if it can't be done perfectly using class files then I think I will leave it off for now.

          Gerald
        Your message has been successfully submitted and would be delivered to recipients shortly.