Search in sources :

Example 1 with FunctionCompletion

use of org.fife.ui.autocomplete.FunctionCompletion in project lara-framework by specs-feup.

the class EditorConfigurer method addPrintlnCompletion.

static void addPrintlnCompletion(DefaultCompletionProvider provider) {
    FunctionCompletion printlnCompletion = new FunctionCompletion(provider, "println", "void");
    List<Parameter> params = new ArrayList<>();
    Parameter messageParam = new Parameter(null, "message", true);
    messageParam.setDescription("The message to print");
    params.add(messageParam);
    printlnCompletion.setParams(params);
    printlnCompletion.setShortDescription("Print a message");
    printlnCompletion.setSummary("Print a message");
    provider.addCompletion(printlnCompletion);
}
Also used : FunctionCompletion(org.fife.ui.autocomplete.FunctionCompletion) ArrayList(java.util.ArrayList) Parameter(org.fife.ui.autocomplete.ParameterizedCompletion.Parameter)

Aggregations

ArrayList (java.util.ArrayList)1 FunctionCompletion (org.fife.ui.autocomplete.FunctionCompletion)1 Parameter (org.fife.ui.autocomplete.ParameterizedCompletion.Parameter)1