RFR 8081638: JShell tool: Improve completion for static import

Jan Lahoda jan.lahoda at oracle.com
Wed Jun 3 11:27:00 UTC 2015


Looks fine to me, please push.

Thanks!

Jan

On 3.6.2015 11:47, ShinyaYoshida wrote:
> I've updated my patch:
> http://cr.openjdk.java.net/~shinyafox/kulla/8081638/webrev.01/
>
> Please do again!
>
> Regards,
> shinyafox(Shinya Yoshida)
>
> 2015-06-03 18:21 GMT+09:00 ShinyaYoshida <bitterfoxc at gmail.com
> <mailto:bitterfoxc at gmail.com>>:
>
>     Hi Jan,
>     Thank you for your review.
>
>     2015-06-03 17:51 GMT+09:00 Jan Lahoda <jan.lahoda at oracle.com
>     <mailto:jan.lahoda at oracle.com>>:
>
>         Hi Shinya,
>
>         Overall looks good, thanks! Two comments:
>         -it seems that it might make sense to create a single method
>         that would for a TreePath look up the enclosing ImportTree, if
>         any, and that would be used in the other methods. Something like:
>              public ImportTree findImport(TreePath tp) {
>                  switch (tp.getParentPath().getLeaf().getKind()) {
>                  case MEMBER_SELECT:
>                      return findImport(tp.getParentPath());
>                  case IMPORT:
>                      return (ImporTree) tp.getLeaf();
>                  default:
>                      return null;
>                  }
>              }
>
>         And this would then be used to detect if TreePath is inside the
>         import (isImport) and to detect static imports. Note there is
>         another usecase for such detection in computeSuggestions in the
>         IDENTIFIER identifier section.
>
>     Ok, I'll fix!
>
>         -membersOf has parameter isStaticContext, which in fact mean
>         "shouldGenerateDotClassItem" - would it make sense to rename the
>         parameter?
>
>     Certainly, I'll rename.
>
>     Regards,
>     shinyafox(Shinya Yoshida)
>
>
>         Thanks,
>             Jan
>
>
>         On 2.6.2015 06:12, ShinyaYoshida wrote:
>
>             Hi Jan,
>             Please review this patch:
>
>             webrev:
>             http://cr.openjdk.java.net/~shinyafox/kulla/8081638/webrev.00/
>
>             bugs:
>             https://bugs.openjdk.java.net/browse/JDK-8081638
>
>             Regards,
>             shinyafox(Shinya Yoshida)
>
>
>


More information about the kulla-dev mailing list