Skip to content

Latest commit

 

History

History
78 lines (57 loc) · 2.07 KB

File metadata and controls

78 lines (57 loc) · 2.07 KB

communication documentation

The backend uses a unix socket ($TMP/javacomplete.sock) to communicate with the client.

api call

Currently planned / implemented are the following api calls:

  • complete
  • cleanimports
  • addimport
  • definition

A call has to be made in json encoding with the format:

{
    "file":"filename",
    "expression":"expression",
    "prefix":"prefix",
    "apicall":"complete",
    "line":0,
    "buffer":"buffercontent"
}

expression

Contains the current statement without the prefix that will be completed. The statement can be a parameter list, a block statement (for, while, if) or anything that can be parsed using the ExpressionParser class.

prefix

Contains the prefix that will be completed. Can be empty.

apicall

One of the apicalls enumerated above.

line

The current line inside the buffer.

buffer

The buffer. Currently the buffer needs to be correct syntax. I am planning to replace the parser with the eclipse ASTParser, which will allow to parse incomplete / incorrect syntax.

return value

The backend yields an integer followed by a newline ('\n') seperated list of the following format:

NAME!TYPE!PARAMETER

The number of items are given by the integer in the first line. The parameters are formated in a comma seperated list.