Update build files.
This commit is contained in:
parent
d069b8508c
commit
4d0f3dd059
6 changed files with 7152 additions and 6700 deletions
|
|
@ -1,21 +1,40 @@
|
||||||
/*
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
* eXide - web-based XQuery IDE
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Wolfgang Meier
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
* it under the terms of the GNU General Public License as published by
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the License. You may obtain a copy of the License at
|
||||||
* (at your option) any later version.
|
* http://www.mozilla.org/MPL/
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* for the specific language governing rights and limitations under the
|
||||||
* GNU General Public License for more details.
|
* License.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* The Original Code is Ajax.org Code Editor (ACE).
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
*/
|
* The Initial Developer of the Original Code is
|
||||||
|
* Ajax.org B.V.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Wolfgang Meier
|
||||||
|
* William Candillon <wcandillon AT gmail DOT com>
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery_tokenizer', 'ace/mode/behaviour/xquery', 'ace/range'], function(require, exports, module) {
|
define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery_tokenizer', 'ace/mode/behaviour/xquery', 'ace/range'], function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
@ -340,7 +359,6 @@ define('ace/mode/xquery_tokenizer', ['require', 'exports', 'module' , 'ace/token
|
||||||
{
|
{
|
||||||
var c = this.cache[i];
|
var c = this.cache[i];
|
||||||
if(c && c.line == line && c.state == startState) {
|
if(c && c.line == line && c.state == startState) {
|
||||||
console.log("RETURN CACHE");
|
|
||||||
return c.tokens;
|
return c.tokens;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,28 +1,47 @@
|
||||||
/*
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
* eXide - web-based XQuery IDE
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Wolfgang Meier
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
* it under the terms of the GNU General Public License as published by
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the License. You may obtain a copy of the License at
|
||||||
* (at your option) any later version.
|
* http://www.mozilla.org/MPL/
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* for the specific language governing rights and limitations under the
|
||||||
* GNU General Public License for more details.
|
* License.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* The Original Code is Ajax.org Code Editor (ACE).
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
*/
|
* The Initial Developer of the Original Code is
|
||||||
|
* Ajax.org B.V.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Wolfgang Meier
|
||||||
|
* William Candillon <wcandillon AT gmail DOT com>
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
ace.define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery_tokenizer', 'ace/mode/behaviour/xquery', 'ace/range'], function(require, exports, module) {
|
ace.define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery_tokenizer', 'ace/mode/behaviour/xquery', 'ace/range'], function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
||||||
var oop = require("../lib/oop");
|
var oop = require("../lib/oop");
|
||||||
var TextMode = require("./text").Mode;
|
var TextMode = require("./text").Mode;
|
||||||
var Tokenizer = require("./xquery_tokenizer").XQueryTokenizer;
|
var XQueryTokenizer = require("./xquery_tokenizer").XQueryTokenizer;
|
||||||
var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
|
var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
|
||||||
var Range = require("../range").Range;
|
var Range = require("../range").Range;
|
||||||
|
|
||||||
|
|
@ -109,6 +128,9 @@ oop.inherits(Mode, TextMode);
|
||||||
session.clearAnnotations();
|
session.clearAnnotations();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
worker.on("highlight", function(tokens) {
|
||||||
|
session.getMode().$tokenizer.cache = tokens.data;
|
||||||
|
});
|
||||||
return worker;
|
return worker;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -160,11 +182,20 @@ ace.define('ace/mode/xquery_tokenizer', ['require', 'exports', 'module' , 'ace/t
|
||||||
var XQueryHighlightRules = require("./xquery_highlight_rules").XQueryHighlightRules;
|
var XQueryHighlightRules = require("./xquery_highlight_rules").XQueryHighlightRules;
|
||||||
|
|
||||||
var XQueryTokenizer = exports.XQueryTokenizer = function(){
|
var XQueryTokenizer = exports.XQueryTokenizer = function(){
|
||||||
|
this.cache = [];
|
||||||
this.$regexpTokenizer = new Tokenizer(new XQueryHighlightRules().getRules());
|
this.$regexpTokenizer = new Tokenizer(new XQueryHighlightRules().getRules());
|
||||||
};
|
};
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
this.getLineTokens = function(line, startState) {
|
this.getLineTokens = function(line, startState) {
|
||||||
|
var cachedLine = null;
|
||||||
|
for(var i in this.cache)
|
||||||
|
{
|
||||||
|
var c = this.cache[i];
|
||||||
|
if(c && c.line == line && c.state == startState) {
|
||||||
|
return c.tokens;
|
||||||
|
}
|
||||||
|
}
|
||||||
return this.$regexpTokenizer.getLineTokens(line, startState);
|
return this.$regexpTokenizer.getLineTokens(line, startState);
|
||||||
};
|
};
|
||||||
}).call(XQueryTokenizer.prototype);
|
}).call(XQueryTokenizer.prototype);
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,47 @@
|
||||||
/*
|
/* ***** BEGIN LICENSE BLOCK *****
|
||||||
* eXide - web-based XQuery IDE
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Wolfgang Meier
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* The contents of this file are subject to the Mozilla Public License Version
|
||||||
* it under the terms of the GNU General Public License as published by
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the License. You may obtain a copy of the License at
|
||||||
* (at your option) any later version.
|
* http://www.mozilla.org/MPL/
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* for the specific language governing rights and limitations under the
|
||||||
* GNU General Public License for more details.
|
* License.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* The Original Code is Ajax.org Code Editor (ACE).
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
*/
|
* The Initial Developer of the Original Code is
|
||||||
|
* Ajax.org B.V.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||||
|
* the Initial Developer. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Contributor(s):
|
||||||
|
* Wolfgang Meier
|
||||||
|
* William Candillon <wcandillon AT gmail DOT com>
|
||||||
|
*
|
||||||
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||||
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||||
|
* of those above. If you wish to allow use of your version of this file only
|
||||||
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||||
|
* use your version of this file under the terms of the MPL, indicate your
|
||||||
|
* decision by deleting the provisions above and replace them with the notice
|
||||||
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||||
|
* the provisions above, a recipient may use your version of this file under
|
||||||
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
|
*
|
||||||
|
* ***** END LICENSE BLOCK ***** */
|
||||||
define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery_tokenizer', 'ace/mode/behaviour/xquery', 'ace/range'], function(require, exports, module) {
|
define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery_tokenizer', 'ace/mode/behaviour/xquery', 'ace/range'], function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
||||||
var oop = require("../lib/oop");
|
var oop = require("../lib/oop");
|
||||||
var TextMode = require("./text").Mode;
|
var TextMode = require("./text").Mode;
|
||||||
var Tokenizer = require("./xquery_tokenizer").XQueryTokenizer;
|
var XQueryTokenizer = require("./xquery_tokenizer").XQueryTokenizer;
|
||||||
var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
|
var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
|
||||||
var Range = require("../range").Range;
|
var Range = require("../range").Range;
|
||||||
|
|
||||||
|
|
@ -109,6 +128,9 @@ oop.inherits(Mode, TextMode);
|
||||||
session.clearAnnotations();
|
session.clearAnnotations();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
worker.on("highlight", function(tokens) {
|
||||||
|
session.getMode().$tokenizer.cache = tokens.data;
|
||||||
|
});
|
||||||
return worker;
|
return worker;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -160,11 +182,20 @@ define('ace/mode/xquery_tokenizer', ['require', 'exports', 'module' , 'ace/token
|
||||||
var XQueryHighlightRules = require("./xquery_highlight_rules").XQueryHighlightRules;
|
var XQueryHighlightRules = require("./xquery_highlight_rules").XQueryHighlightRules;
|
||||||
|
|
||||||
var XQueryTokenizer = exports.XQueryTokenizer = function(){
|
var XQueryTokenizer = exports.XQueryTokenizer = function(){
|
||||||
|
this.cache = [];
|
||||||
this.$regexpTokenizer = new Tokenizer(new XQueryHighlightRules().getRules());
|
this.$regexpTokenizer = new Tokenizer(new XQueryHighlightRules().getRules());
|
||||||
};
|
};
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
this.getLineTokens = function(line, startState) {
|
this.getLineTokens = function(line, startState) {
|
||||||
|
var cachedLine = null;
|
||||||
|
for(var i in this.cache)
|
||||||
|
{
|
||||||
|
var c = this.cache[i];
|
||||||
|
if(c && c.line == line && c.state == startState) {
|
||||||
|
return c.tokens;
|
||||||
|
}
|
||||||
|
}
|
||||||
return this.$regexpTokenizer.getLineTokens(line, startState);
|
return this.$regexpTokenizer.getLineTokens(line, startState);
|
||||||
};
|
};
|
||||||
}).call(XQueryTokenizer.prototype);
|
}).call(XQueryTokenizer.prototype);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue