Update build files.

This commit is contained in:
William Candillon 2012-04-13 16:10:22 +02:00
commit 4d0f3dd059
6 changed files with 7152 additions and 6700 deletions

View file

@ -1,21 +1,40 @@
/*
* eXide - web-based XQuery IDE
*
* Copyright (C) 2011 Wolfgang Meier
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* The Original Code is Ajax.org Code Editor (ACE).
*
* 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) {
"use strict";
@ -340,7 +359,6 @@ define('ace/mode/xquery_tokenizer', ['require', 'exports', 'module' , 'ace/token
{
var c = this.cache[i];
if(c && c.line == line && c.state == startState) {
console.log("RETURN CACHE");
return c.tokens;
}
}

File diff suppressed because one or more lines are too long

View file

@ -1,28 +1,47 @@
/*
* eXide - web-based XQuery IDE
*
* Copyright (C) 2011 Wolfgang Meier
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* The Original Code is Ajax.org Code Editor (ACE).
*
* 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) {
"use strict";
var WorkerClient = require("../worker/worker_client").WorkerClient;
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var Tokenizer = require("./xquery_tokenizer").XQueryTokenizer;
var XQueryTokenizer = require("./xquery_tokenizer").XQueryTokenizer;
var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
var Range = require("../range").Range;
@ -109,6 +128,9 @@ oop.inherits(Mode, TextMode);
session.clearAnnotations();
});
worker.on("highlight", function(tokens) {
session.getMode().$tokenizer.cache = tokens.data;
});
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 XQueryTokenizer = exports.XQueryTokenizer = function(){
this.cache = [];
this.$regexpTokenizer = new Tokenizer(new XQueryHighlightRules().getRules());
};
(function() {
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);
};
}).call(XQueryTokenizer.prototype);

View file

@ -1,28 +1,47 @@
/*
* eXide - web-based XQuery IDE
*
* Copyright (C) 2011 Wolfgang Meier
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* The Original Code is Ajax.org Code Editor (ACE).
*
* 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) {
"use strict";
var WorkerClient = require("../worker/worker_client").WorkerClient;
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var Tokenizer = require("./xquery_tokenizer").XQueryTokenizer;
var XQueryTokenizer = require("./xquery_tokenizer").XQueryTokenizer;
var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
var Range = require("../range").Range;
@ -109,6 +128,9 @@ oop.inherits(Mode, TextMode);
session.clearAnnotations();
});
worker.on("highlight", function(tokens) {
session.getMode().$tokenizer.cache = tokens.data;
});
return worker;
};
@ -160,11 +182,20 @@ define('ace/mode/xquery_tokenizer', ['require', 'exports', 'module' , 'ace/token
var XQueryHighlightRules = require("./xquery_highlight_rules").XQueryHighlightRules;
var XQueryTokenizer = exports.XQueryTokenizer = function(){
this.cache = [];
this.$regexpTokenizer = new Tokenizer(new XQueryHighlightRules().getRules());
};
(function() {
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);
};
}).call(XQueryTokenizer.prototype);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff