RFR: 8153761: JShell: Completion -- Show parameter names if possible
Robert Field
robert.field at oracle.com
Tue May 10 05:11:58 UTC 2016
Cool!
On May 9, 2016 12:40:01 PM Jan Lahoda <jan.lahoda at oracle.com> wrote:
> On 6.5.2016 07:14, Robert Field wrote:
>> Looks good.
>
> Thanks.
>
>>
>> I notice that the SourceCache initialization (including findSources())
>> gets run every time, even if all the real parameter names are in the
>> classfile. I don't know how significant that is.
>
> The result of findSources() should be cached, so it should be just the
> initialization of the file manager (caching the file manager would be
> troublesome, as there is no clear point when it could be closed). I hope
> the initialization shouldn't be a significant problem (in my
> measurements on my laptop, the first SourceCache initialization took
> 1-2ms, and the subsequent initializations took <1ms).
>
> Jan
>
>>
>> -Robert
>>
>>
>> On 05/05/2016 05:14 AM, Jan Lahoda wrote:
>>> Hi,
>>>
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8153761
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~jlahoda/8153761/webrev.00/index.html
>>>
>>> Currently, when showing the synopsis of methods (Shift-<tab>),
>>> synthesised, not real, parameter names are shown. This patches
>>> improves that by:
>>> -reading the parameter names from the classfiles if they are available
>>> (by using "-XDsave-parameter-names=true")
>>> -storing parameter names when compiling user's snippets (by using
>>> "-parameters")
>>> -looking for src.zip in the JDK installation if the parameter names
>>> are not available in the classfiles, and reading the parameter names
>>> from the sources.
>>>
>>> Comments are welcome!
>>>
>>> Jan
>>
More information about the kulla-dev
mailing list