From robert.field at oracle.com Wed Mar 4 02:43:11 2020 From: robert.field at oracle.com (Robert Field) Date: Tue, 3 Mar 2020 18:43:11 -0800 Subject: RFR: JDK-8234896: Tab completion does not work for method references in jshell. In-Reply-To: <3fa30208-e398-73c9-66f5-509dee8a649b@oracle.com> References: <3fa30208-e398-73c9-66f5-509dee8a649b@oracle.com> Message-ID: <96067d60-addb-5f4c-1031-2253fa26a3db@oracle.com> Wonderful! Thumbs up! -Robert On 2019-11-27 03:49, Jan Lahoda wrote: > Hi, > > The tab completion does not propose methods for method references. E.g.: > --- > jshell> class C { public static void test() { } } > | created class C > > jshell> Runnable r = C:: > --- > > Produces no proposals. This patch tries to fix that, by proposing > methods (and the smart code completion will filter methods that have > acceptable parameter/return types). > > Webrev: http://cr.openjdk.java.net/~jlahoda/8234896/webrev.00/ > JBS: https://bugs.openjdk.java.net/browse/JDK-8234896 > > How does this look? > > Thanks, > ??? Jan From jan.lahoda at oracle.com Fri Mar 13 12:20:48 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Fri, 13 Mar 2020 13:20:48 +0100 Subject: RFR: JDK-8240658: Code completion not working for lambdas in method invocations that require type inference Message-ID: Hi, When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to non working code completion in JShell (and possibly other tools). For example (in JShell): Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. and press - this leads to no proposals currently, as the type of "v" is not inferred. The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. Proposed patch: http://cr.openjdk.java.net/~jlahoda/8240658/webrev.00/ JBS: https://bugs.openjdk.java.net/browse/JDK-8240658 Thanks, Jan From vicente.romero at oracle.com Wed Mar 18 19:26:37 2020 From: vicente.romero at oracle.com (Vicente Romero) Date: Wed, 18 Mar 2020 15:26:37 -0400 Subject: RFR: JDK-8240658: Code completion not working for lambdas in method invocations that require type inference In-Reply-To: References: Message-ID: <7bff733d-a800-a006-731b-e34375f379e2@oracle.com> looks good, Vicente On 3/13/20 8:20 AM, Jan Lahoda wrote: > Hi, > > When a method invocation requires type inference, and the user is in > the process of typing of a (block) lambda that is a parameter to the > method invocation, javac may not, in some cases, perform the type > inference, which then may lead to non working code completion in > JShell (and possibly other tools). > > For example (in JShell): > Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. > > and press - this leads to no proposals currently, as the type of > "v" is not inferred. > > The idea of the proposed patch is to improve the recovery in cases > significant for cases where the text is being typed, and allow type > inference in these cases. The type of "v" is then inferred, and the > code completion works. > > Proposed patch: > http://cr.openjdk.java.net/~jlahoda/8240658/webrev.00/ > > JBS: https://bugs.openjdk.java.net/browse/JDK-8240658 > > Thanks, > ??? Jan From jan.lahoda at oracle.com Thu Mar 26 11:07:14 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Thu, 26 Mar 2020 12:07:14 +0100 Subject: RFR: JDK-8241598: Upgrade JLine to 3.14.0 Message-ID: Hi, I'd like to upgrade the internal JLine used mainly by JShell to 3.14.0. This change at this time is not intended to bring improvements by itself, but I plan to add auto-indent (which is allowed by this upgrade) as a separate change/patch. Webrev: https://cr.openjdk.java.net/~jlahoda/8241598/webrev.00/ JBS: https://bugs.openjdk.java.net/browse/JDK-8241598 How does this look? Thanks, Jan From paul.sandoz at oracle.com Thu Mar 26 16:03:00 2020 From: paul.sandoz at oracle.com (Paul Sandoz) Date: Thu, 26 Mar 2020 09:03:00 -0700 Subject: RFR: JDK-8241598: Upgrade JLine to 3.14.0 In-Reply-To: References: Message-ID: <02339319-98DB-482F-9D63-A7BD5071BE77@oracle.com> +1 I am assuming its just a straight import. Paul. > On Mar 26, 2020, at 4:07 AM, Jan Lahoda wrote: > > Hi, > > I'd like to upgrade the internal JLine used mainly by JShell to 3.14.0. This change at this time is not intended to bring improvements by itself, but I plan to add auto-indent (which is allowed by this upgrade) as a separate change/patch. > > Webrev: > https://cr.openjdk.java.net/~jlahoda/8241598/webrev.00/ > JBS: > https://bugs.openjdk.java.net/browse/JDK-8241598 > > How does this look? > > Thanks, > Jan From jan.lahoda at oracle.com Thu Mar 26 16:53:11 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Thu, 26 Mar 2020 17:53:11 +0100 Subject: RFR: JDK-8241598: Upgrade JLine to 3.14.0 In-Reply-To: <02339319-98DB-482F-9D63-A7BD5071BE77@oracle.com> References: <02339319-98DB-482F-9D63-A7BD5071BE77@oracle.com> Message-ID: On 26. 03. 20 17:03, Paul Sandoz wrote: > +1 I am assuming its just a straight import. Mostly a straight application of a patch of differences between 3.12.1 and 3.14.0 - but we have some JDK-specific changes (among other things, re-packaging), so some fixes where the patch didn't apply were necessary. Jan > > Paul. > >> On Mar 26, 2020, at 4:07 AM, Jan Lahoda wrote: >> >> Hi, >> >> I'd like to upgrade the internal JLine used mainly by JShell to 3.14.0. This change at this time is not intended to bring improvements by itself, but I plan to add auto-indent (which is allowed by this upgrade) as a separate change/patch. >> >> Webrev: >> https://cr.openjdk.java.net/~jlahoda/8241598/webrev.00/ >> JBS: >> https://bugs.openjdk.java.net/browse/JDK-8241598 >> >> How does this look? >> >> Thanks, >> Jan > From robert.field at oracle.com Thu Mar 26 23:40:59 2020 From: robert.field at oracle.com (Robert Field) Date: Thu, 26 Mar 2020 16:40:59 -0700 Subject: RFR: JDK-8241598: Upgrade JLine to 3.14.0 In-Reply-To: References: Message-ID: Do you have a diff against the straight patch application? Thanks for doing this, Robert On 2020-03-26 04:07, Jan Lahoda wrote: > Hi, > > I'd like to upgrade the internal JLine used mainly by JShell to > 3.14.0. This change at this time is not intended to bring improvements > by itself, but I plan to add auto-indent (which is allowed by this > upgrade) as a separate change/patch. > > Webrev: > https://cr.openjdk.java.net/~jlahoda/8241598/webrev.00/ > JBS: > https://bugs.openjdk.java.net/browse/JDK-8241598 > > How does this look? > > Thanks, > ??? Jan From jan.lahoda at oracle.com Fri Mar 27 12:05:21 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Fri, 27 Mar 2020 13:05:21 +0100 Subject: RFR: JDK-8241598: Upgrade JLine to 3.14.0 In-Reply-To: References: Message-ID: <090ee948-0eb9-abb1-07a3-6f8ee4bb3f38@oracle.com> On 27. 03. 20 0:40, Robert Field wrote: > Do you have a diff against the straight patch application? I guess a closest view would be this: http://cr.openjdk.java.net/~jlahoda/8241598/webrev.applied.to.final/ It is a diff between the 3.12.1->3.14.0 patch applied, with all the rejects left in place; and the final patch (with rejects manually applied, reject files removed, etc.) Jan > > Thanks for doing this, > Robert > > On 2020-03-26 04:07, Jan Lahoda wrote: >> Hi, >> >> I'd like to upgrade the internal JLine used mainly by JShell to >> 3.14.0. This change at this time is not intended to bring improvements >> by itself, but I plan to add auto-indent (which is allowed by this >> upgrade) as a separate change/patch. >> >> Webrev: >> https://cr.openjdk.java.net/~jlahoda/8241598/webrev.00/ >> JBS: >> https://bugs.openjdk.java.net/browse/JDK-8241598 >> >> How does this look? >> >> Thanks, >> ??? Jan From robert.field at oracle.com Fri Mar 27 19:19:59 2020 From: robert.field at oracle.com (Robert Field) Date: Fri, 27 Mar 2020 12:19:59 -0700 Subject: RFR: JDK-8241598: Upgrade JLine to 3.14.0 In-Reply-To: <090ee948-0eb9-abb1-07a3-6f8ee4bb3f38@oracle.com> References: <090ee948-0eb9-abb1-07a3-6f8ee4bb3f38@oracle.com> Message-ID: Thumbs up! -Robert On 2020-03-27 05:05, Jan Lahoda wrote: > On 27. 03. 20 0:40, Robert Field wrote: >> Do you have a diff against the straight patch application? > > I guess a closest view would be this: > http://cr.openjdk.java.net/~jlahoda/8241598/webrev.applied.to.final/ > > It is a diff between the 3.12.1->3.14.0 patch applied, with all the > rejects left in place; and the final patch (with rejects manually > applied, reject files removed, etc.) > > Jan > >> >> Thanks for doing this, >> Robert >> >> On 2020-03-26 04:07, Jan Lahoda wrote: >>> Hi, >>> >>> I'd like to upgrade the internal JLine used mainly by JShell to >>> 3.14.0. This change at this time is not intended to bring >>> improvements by itself, but I plan to add auto-indent (which is >>> allowed by this upgrade) as a separate change/patch. >>> >>> Webrev: >>> https://cr.openjdk.java.net/~jlahoda/8241598/webrev.00/ >>> JBS: >>> https://bugs.openjdk.java.net/browse/JDK-8241598 >>> >>> How does this look? >>> >>> Thanks, >>> ??? Jan