-1

Can Anyone tell me how the code completion(or code assist whatever is preferable) in Eclipse works?? I mean the tricks/algorithms/Data-Structures it is using.. Somewhere I found that "maybe" it uses Trie, but i want a definite answer, Can anyone please answer it??

  • I would really appreciate if somebody explains(a bit) about the algorithm it uses, – sumpm_iis Sep 22 '14 at 12:03
  • 2
    Eclipse is open source. You could always take a look at the code yourself ;-) – André Stannek Sep 22 '14 at 12:17
  • Indeed, it's rather complex, and I'm not sure whether it is possible to summarize it in an answer that is adequate here (given that the question in its current form is rather broad). You may start reading at http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/plain/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProposalComputer.java and see whether you can find pointers to the parts that are relevant (or of interest) for you. – Marco13 Sep 22 '14 at 14:37

1 Answers1

-1

There are different Token-Scanners who search for known tokens like { and ; to colorize the current viewport-scopes and fill a history. If you press Ctrl+Spc it looks backward and search for occourences in the history.

Grim
  • 1,938
  • 10
  • 56
  • 123