use of org.fife.ui.autocomplete.ShorthandCompletion in project fql by CategoricalData.
the class AqlCodeEditor method createCompletionProvider.
private static CompletionProvider createCompletionProvider() {
DefaultCompletionProvider provider = new DefaultCompletionProvider();
provider.addCompletion(new ShorthandCompletion(provider, "typeside", "typeside ? = literal {\n\timports\n\ttypes\n\tsconstants\n\tfunctions\n\tequations\n\tjava_types\n\tjava_constants\n\tjava_functions\n\toptions\n} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "schema", "schema ? = literal : ? {\n\timports\n\tentities\n\tforeign_keys\n\tpath_equations\n\tattributes\n\tobservation_equations\n\toptions\n} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "instance", "instance ? = literal : ? {\n\timports\n\tgenerators\n\tequations\n\toptions\n} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "graph", "graph ? = literal : ? {\n\timports\n\tnodes\n\tedges\n} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "mapping", "mapping ? = literal : ? -> ? {\n\timports\n\tentities\n\tforeign_keys\n\tattributes\n\toptions\n} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "transform", "transform ? = literal : ? -> ? {\n\timports\n\tgenerators\n\toptions\n} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "query", "query ? = literal : ? -> ? {\n" + "\n entities" + "\n e -> {for x:X y:Y " + "\n where f(x)=f(x) g(y)=f(y) " + "\n return att -> at(a) att2 -> at(a) " + "\n options" + "\n }" + "\n" + "\n foreign_keys" + "\n f -> {x -> a.g y -> f(y) " + "\n options" + "\n }" + "\n options" + "\n}", ""));
provider.addCompletion(new ShorthandCompletion(provider, "import_csv", "import_csv path : schema (resp. inst -> inst) {imports options} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "export_csv", "export_csv_instance (resp. export_csv_transform) inst (resp. trans) path {options} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "import_csv", "import_jdbc classname url prefix : schema (resp. inst -> inst) {\nen -> sql ty -> sql (resp + att -> sql fk -> sql) ...}", ""));
provider.addCompletion(new ShorthandCompletion(provider, "export_csv", "export_jdbc_instance (resp export_jdbc_transform) classname url prefix {options} ", ""));
return provider;
}
use of org.fife.ui.autocomplete.ShorthandCompletion in project fql by CategoricalData.
the class FQLPPCodeEditor method createCompletionProvider.
private static CompletionProvider createCompletionProvider() {
DefaultCompletionProvider provider = new DefaultCompletionProvider();
provider.addCompletion(new ShorthandCompletion(provider, "set", "set = { }", ""));
provider.addCompletion(new ShorthandCompletion(provider, "function", "function = { } : -> ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "category", "category = {\n\tobjects;\n\tarrows;\n\tequations;\n}", ""));
provider.addCompletion(new ShorthandCompletion(provider, "functor", " functor = {\n\tobjects;\n\tarrows;\n} : -> ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "transform", "transform = {\n\tobjects;\n} : ( : -> ) -> ( : -> ) ", ""));
return provider;
}
use of org.fife.ui.autocomplete.ShorthandCompletion in project fql by CategoricalData.
the class FqlCodeEditor method createCompletionProvider.
private static CompletionProvider createCompletionProvider() {
DefaultCompletionProvider provider = new DefaultCompletionProvider();
provider.addCompletion(new ShorthandCompletion(provider, "schema", "schema = {\n\tnodes;\n\tattributes;\n\tarrows;\n\tequations;\n}", ""));
provider.addCompletion(new ShorthandCompletion(provider, "mapping", "mapping = {\n\tnodes;\n\tattributes;\n\tarrows;\n} : -> ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "instance", "instance = {\n\tnodes;\n\tattributes;\n\tarrows;\n} : ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "query", "query = delta pi sigma", ""));
provider.addCompletion(new ShorthandCompletion(provider, "QUERY", "QUERY = match {} src dst \"deta sigma forward\" ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "transform", "transform = {\n\tnodes;\n} : -> ", ""));
return provider;
}
use of org.fife.ui.autocomplete.ShorthandCompletion in project fql by CategoricalData.
the class OplCodeEditor method createCompletionProvider.
private static CompletionProvider createCompletionProvider() {
DefaultCompletionProvider provider = new DefaultCompletionProvider();
provider.addCompletion(new ShorthandCompletion(provider, "theory", "theory {\n\tsorts;\n\tsymbols;\n\tequations;\n}", ""));
provider.addCompletion(new ShorthandCompletion(provider, "SCHEMA", "SCHEMA {\n\tentities;\n\tedges;\n\tattributes;\n\tpathEqualities;\n\tobsEqualities;\n} : ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "model", "model {\n\tsorts;\n\tsymbols;\n} : ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "query", "query {\n q1 = " + "\n {for a:b; " + "\n where f(a)=f(b), f(b)=f(c); " + "\n return att = at(a), att2 = at(a); " + "\n keys fk1 = {a=f(b), b=f(g(a))} : q2," + "\n fk2 = {c=f(b)} : q3; " + " } : t \n/* , another block */ \n} : S -> T ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "sql", "sql {\n " + "\n insert into A " + "\n select (f(a) as a, f(a) as b) as a," + "\n f(x) as x" + "\n from A as a " + "\n where f(a)=f(b) and f(b)=f(c) " + "\n /* , another block */ \n} : S -> T ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "javascript", "javascript {\n\tsymbols;\n} : ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "mapping", "mapping {\n\tsorts;\n\tsymbols;\n} : -> ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "transform", "tranform {\n\tsorts;\n} : -> ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "transpres", "transpres {\n\tsorts;\n} : -> ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "presentation", "presentation {\n\tgenerators;\n\tequations;\n} : ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "INSTANCE", "INSTANCE {\n\tgenerators;\n\tequations;\n} : ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "graph", "graph {\n\tnodes;\n\tedges;\n} ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "tables", "tables {\n\tentities;\n\tedges;\n\tattributes;} : ", ""));
provider.addCompletion(new ShorthandCompletion(provider, "colimit", "colimit typeSideOrSchema graph ", ""));
return provider;
}
use of org.fife.ui.autocomplete.ShorthandCompletion 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;
}
Aggregations