Search in sources :

Example 6 with DefaultCompletionProvider

use of org.fife.ui.autocomplete.DefaultCompletionProvider in project fql by CategoricalData.

the class XCodeEditor method createCompletionProvider.

private static CompletionProvider createCompletionProvider() {
    DefaultCompletionProvider provider = new DefaultCompletionProvider();
    provider.addCompletion(new ShorthandCompletion(provider, "type", "type \"\"", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "polynomial", "polynomial {\n\t q = {for v:t; where v=v; attributes l=v.l; edges f = {e=v.l} : q;} : t\n}\n : s -> s", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "query", "query {\n\tpi;\n\tdelta;\n\tsigma;\n} ", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "flower", "flower {\n\tselect;\n\tfrom;\n\twhere;\n} ", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "FLOWER", "FLOWER {\n\tselect;\n\tfrom;\n\twhere;\n} ", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "schema", "schema {\n\tnodes;\n\tedges;\n\tequations;\n}", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "mapping", "mapping {\n\tnodes;\n\tedges;\n}\n :  -> ", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "instance", "instance {\n\tvariables;\n\tequations;\n}\n : ", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "INSTANCE", "INSTANCE {\n\tvariables;\n\tequations;\n}\n : ", ""));
    provider.addCompletion(new ShorthandCompletion(provider, "homomorphism", "homomorphism {\n\tvariables;\n}\n :  ->  ", ""));
    return provider;
}
Also used : DefaultCompletionProvider(org.fife.ui.autocomplete.DefaultCompletionProvider) ShorthandCompletion(org.fife.ui.autocomplete.ShorthandCompletion)

Aggregations

DefaultCompletionProvider (org.fife.ui.autocomplete.DefaultCompletionProvider)6 ShorthandCompletion (org.fife.ui.autocomplete.ShorthandCompletion)5 Font (java.awt.Font)1 CollapsibleSectionPanel (org.fife.rsta.ui.CollapsibleSectionPanel)1 AutoCompletion (org.fife.ui.autocomplete.AutoCompletion)1 CompletionProvider (org.fife.ui.autocomplete.CompletionProvider)1 RSyntaxTextArea (org.fife.ui.rsyntaxtextarea.RSyntaxTextArea)1 RTextScrollPane (org.fife.ui.rtextarea.RTextScrollPane)1