Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7013272

Automatically generate info about how compiler resource keys are used

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 7
    • 7
    • tools
    • b130
    • unknown
    • generic
    • Verified

      Javac error messages are generated by consulting a so-called resource file that contains entries of the following kind:

      compiler.err.annotation.missing.default.value=\
          annotation {0} is missing value for the attribute {1}

      When translating an error message in a foreign language, it is usually crucial to know detailed info about the values assumed by the diagnostic arguments ({0} and {1} in the above example). However, not all the resource keys in compiler.properties are well-documented - this makes i10n hard.

      It would be great if we could automatically generate info about the types of the arguments supplied by the compiler for each resource key - for example, we could automatically generate the following comment line:

      # {0} = Java type, {1} = Java identifier

            jjg Jonathan Gibbons
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: