Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] GSoC Code completion refactorings

Hi Christian,

I will start the refactoring this weekend and let you know when I am finished. For now your suggestions seem clear but if any questions arise I will let you know.

I already started with the editor autocompletion but did not have too much time because of university. I will stash my code for now and continue the work there once the shell refactoring is finished.

Best regards,
Martin



Am 2015-07-07 um 16:41 schrieb Christian Pontesegger:
Hi Martin,

now that mid term evaluations are passed and you have your first deliverable done I would like to do some refactorings on the completion code:

I want these proposals to be generic and extensible. Therefore we already have an extension point 'completionProcessor' and an interface 'ICompletionProvider'. In its current form it is very simple and leaves the task to decode content information to each completion provider.

The refactoring should provide a helper method capable of parsing and understanding the source code left of the cursor position. A created context information then could be passed to ICompletionProviders. As script code always depends on the script language a good place for those helper method(s) would be the ModuleWrappers that exist for each script language.

Information that should be gathered:
content proposal source type (enum): eg when we need proposals for a java class then we would need an indicator for this
content proposal source: the java class to use
filter: parts of the text that is to be completed.
context: relevant code left from the cursor

Example:
Packages.java.io.
-> source type: java package
-> source: "java.io"
-> filter: null/empty

Packages.java.io.Fi
-> source type: java package
-> source: "java.io"
-> filter: "Fi"

include("file://
-> source type: module function
-> source: Module Definition instance
-> filter: "file://"

Together with the context this will allow to create content proposals for
* Java classes
* java instances
* methods exported from modules
* string literals (eg for includes, loadModule, ...)

Getting the relevant context from the cursor position will also help Vidura to provide relevant help information. The information to be gathered might need some extensions. Please discuss this together with Vidura as you both should use the same helper methods for this task.




Back to the top