Community
Participate
Working Groups
Although not documented in the JEP, the current EA javac supports generation of parameter names by option '-options' in javac. ECJ should follow this lead for now. There should be a distinct Java Code Generation option for this in the UI, too.
Actually, the javac option for parameters is '-parameters'.
Created attachment 233121 [details] Patch for -parameters option Patch available for review. This is just standard boilerplate-like code.
Requesting pre-commit review for this pretty simple change.
Haven't reviewed the patch fully, but did you mean to include the code to preserve the parameter information in code generation?
(In reply to comment #4) > Haven't reviewed the patch fully, but did you mean to include the code to > preserve the parameter information in code generation? No, this is just the plumbing for the option. The codegen will come in bug 406982.
Patch looks good - just couple of minor comments: 1. Some of the existing similar options use GENERATE and DO_NOT_GENERATE. Shouldn't this one use them too instead of ENABLED/DISABLED? 2. Consider replacing "from Java SE 8 and later" with something like 'target' or 'compliance' (not sure about this) to be consistent with other docs.
Committed as: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=1b18be0be9e4004bc36c661ce71eb9b1106a6444
(In reply to comment #0) > Although not documented in the JEP, the current EA javac supports generation > of parameter names by option '-options' in javac. > ECJ should follow this lead for now. There should be a distinct Java Code > Generation option for this in the UI, too. Raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=415846 for the UI portion of work.
Minor follow up commit to dot some i's and cross some t's here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=17d73264c709eb08acaa64b6fb890141e6700656
Javadoc fix to acknowledge that the MethodParameters attribute not only contains name_index but also access_flags: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=57bd7f827fb4e26e2f4fcfb421451c18e4a1d09f