Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4393

Add multiple file extensions support in compiler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.5, 1.8-beta-2
    • class generator
    • None
    • Patch

    Description

      This is regarding the need Groovy++ has to support file extensions other than *.groovy - which can really be useful to others as well.

      I am submitting here a revised version of the patch - it now does not put entries like following in org.codehaus.groovy.transform.ASTTransformation, where they don't belong

      #files:gpp,grunit
      

      These can now be defined in a separate file org.codehaus.groovy.source.Extensions and the classes listed in such files need to implement the following interface to register the extensions with the compiler through which it calls back to collect the file extensions of caller's interest.

      public interface SourceExtensionSupport {
      	Set<String> getExtensions();
      }
      

      Review comments welcome.

      Attachments

        1. v175_multiple_file_extensions_support.patch
          12 kB
          Roshan Dawrani
        2. v2_multiple_file_extensions_support_v17x.patch
          8 kB
          Roshan Dawrani
        3. v3_multiple_file_extensions_support_v17x.patch
          9 kB
          Roshan Dawrani
        4. v4_multiple_file_extensions_support_v17x.patch
          18 kB
          Roshan Dawrani

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              roshandawrani Roshan Dawrani
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: