angelozerr / codemirror-xquery Goto Github PK
View Code? Open in Web Editor NEWXQuery Editor based on CodeMirror
XQuery Editor based on CodeMirror
How can we acheive Autocompletion of Method Parameters for User-Defined Functions. It only displays Autocompletion for javascript functions. I want to achieve this for my functions used in that particular project.
The online demo seems to be down:
http://codemirror-java.opensagres.eu.cloudbees.net/xquery.html
Thanks for the great extensions! Particularly helpful is the expansion text-hover.js
Unfortunately, there is a strange behavior with the tooltips and I have not found a solution:
If the page downwards contains more content, and I scroll down a bit the main window, the tooltips no longer work. This behavior can also be observed in the demo (http://demo-angelozerr.rhcloud.com/CodeMirror-Java//xquery.html).
I am thankful for every help...
...best regards!
hyperlink with ctl+click in Firefox 35 is not working for me. F4 does.
Both work in Chrome 40
Hi Angelo,
I think CodeMirror should provide templates and text hover features too.
One thing I want to know about templates is
it jumps between vars perfectly, I just want to change cursor position after last jump:
for (var index = 0; index < array.length; index++) {
}
It jumps to array var, When user presses Enter or Tab it should end template editing and jump to this pos:
for (var index = 0; index < array.length; index++) {
|
}
Maybe I just missing something.
Many thanks for help.
Best regards,
Boyan
Today there are codemirror-xquery folder which hosts the whole addons. It should be better to create this hierarchy :
codemirror-extended : "generic" extended addons like template completion, context info, etc
codemirror-xquery : xquery addons like xquery completion based on template completion
codemirror-javascript: javascript addons like javascript completion based on template completion + tern
Hello
Thanks for great extension for codemirror.
I have some basic problem while doing autocomplete. When tag have extra starting chr then pressing control + space is working but without extra chr it's not showing me autocomplete list. You can see in image. This is happning with all tags. Example: <ddiv, <aa, <fform....
file: codemirror-xquery/addon/templates-hint.js
line 136: var char = cm.getRange(cursor.to(), CodeMirror.Pos(cursor.to().line, cursor.to().ch + 1));
this line generate error: "Parse error. missing variable name"
Variable name char not allowed
Please change it to other
file: codemirror-extension/addon/hint/templates-hint.js
var completion = {
"className" : className,
"text" : label,
"template" : template,
};
this block of code generate error: "Parse error. IE8 (and below) will parse trailing commas in array and object literals incorrectly"
Do you have any idea how to make an autocomplete for function parameters of type string? For example, I have a function getProperty with one parameter of type string. So there are many valid property names like 'cm:name', 'cm:title' or 'cm:modified' [getProperty("cm:name")]. How can I describe that via tern.js? I do not wanna create all kind of combinations (getProperty("cm:name" , getProperty("cm:title"), getProperty("cm:modified") in the json file.
I'm trying to use the template-hint.js in an arbitrary mode (prolog). I'm still pretty much new to
the CodeMirror code base. I have the impression though that template-hint.js does not work
with the current CodeMirror as hinting tools are now registered using registerHelper(). Stepping
through CodeMirror.showHint(), shows it steps through the helpers, cannot find the template
helper and gives up.
All I do is simply load template-hint.js and the css files, bind Ctrl-Space to "autohint" and define
this as
CodeMirror.commands.autohint = function(cm) {
CodeMirror.showHint(cm, CodeMirror.templateHint, {async:true});
}
Anything trivial I'm missing, or does template-hint.js need rewriting?
P.s. appears that hinters are functions that return an object holding a list of completions, and
the from and to locations of what is completed. Is this a fundamentally different interface?
I think this post is relevant: https://groups.google.com/forum/#!topic/codemirror/cOc0xvUUEUU
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.