Quation about the spec of SourceCodeAnalysis#analyzeCompletion WAS: RFR 8143006: JShell tool: EditPad doesn't process each line as same as inputs for jshell

Robert Field robert.field at oracle.com
Mon Nov 16 07:33:15 UTC 2015


Completion only defects missing semicolons at the end of input. It detects 
ends of snippets with semicolons and end braces.

It is scanning technology not parsing.  It could be argued that it should 
do full parsing ...

-Robert



On November 16, 2015 7:13:13 AM ShinyaYoshida <bitterfoxc at gmail.com> wrote:

> Hi,
> I'd like ask about the spec of SourceCodeAnalysis#analyzeCompletion.
>
> When I call SourceCodeAnalysis#analyzeCompletion with "f()\nf()", what
> result should be returned?
>
> Currently, it returns:
> CompletionInfo {
>     completeness = COMPLETE
>     unitEndPos = 7
>     source = "f()\nf()"
>     remaining = ""
> }
>
> Is this correct?
>
> I think it is not suitable for JShell API
> Another possibility which is suitable for JShell API is here:
> CompletionInfo {
>     completeness = COMPLETE
>     unitEndPos = 4
>     source = "f()"
>     remaining = "\nf()"
> }
>
> Which should be do?
>
> If this is a bug, can I work for this?
>
> Regards,
> shinyafox(Shinya Yoshida)


More information about the kulla-dev mailing list