[Sciviews-commits] r386 - komodo/SciViews-K komodo/SciViews-K/components komodo/SciViews-K/content komodo/SciViews-K/content/js komodo/SciViews-K/content/js/tools komodo/SciViews-K/defaults pkg/svDialogs pkg/svDialogs/R pkg/svHttp pkg/svHttp/R pkg/svKomodo pkg/svKomodo/R pkg/svKomodo/man pkg/svMisc pkg/svMisc/R pkg/svSocket pkg/svSocket/R pkg/svSocket/man pkg/svUnit/inst/doc
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 10 04:07:10 CEST 2011
Author: phgrosjean
Date: 2011-08-10 04:07:09 +0200 (Wed, 10 Aug 2011)
New Revision: 386
Added:
komodo/SciViews-K/content/RConsoleOverlayOld.xul
komodo/SciViews-K/content/js/rconsoleOld.js
komodo/SciViews-K/defaults/R reference (0.9.23).kpz
komodo/SciViews-K/defaults/SciViews-K (0.9.23).kpz
komodo/SciViews-K/defaults/SciViews_0.9-4.tar.gz
komodo/SciViews-K/defaults/SciViews_0.9-4.zip
komodo/SciViews-K/defaults/codetools_0.2-8.tar.gz
komodo/SciViews-K/defaults/codetools_0.2-8.zip
komodo/SciViews-K/defaults/svHttp_0.9-52.tar.gz
komodo/SciViews-K/defaults/svHttp_0.9-52.zip
komodo/SciViews-K/defaults/svKomodo_0.9-52.tar.gz
komodo/SciViews-K/defaults/svKomodo_0.9-52.zip
komodo/SciViews-K/defaults/svMisc_0.9-62.tar.gz
komodo/SciViews-K/defaults/svMisc_0.9-62.zip
komodo/SciViews-K/defaults/svSocket_0.9-52.tar.gz
komodo/SciViews-K/defaults/svSocket_0.9-52.zip
pkg/svKomodo/R/svTaskCallbackManager.R
pkg/svKomodo/man/svTaskCallbackManager.Rd
Removed:
komodo/SciViews-K/defaults/SciViews_0.9-2.tar.gz
komodo/SciViews-K/defaults/SciViews_0.9-2.zip
komodo/SciViews-K/defaults/codetools_0.2-2.tar.gz
komodo/SciViews-K/defaults/codetools_0.2-2.zip
komodo/SciViews-K/defaults/svGUI_0.9-50.tar.gz
komodo/SciViews-K/defaults/svGUI_0.9-50.zip
komodo/SciViews-K/defaults/svMisc_0.9-60.tar.gz
komodo/SciViews-K/defaults/svMisc_0.9-60.zip
komodo/SciViews-K/defaults/svSocket_0.9-51.tar.gz
komodo/SciViews-K/defaults/svSocket_0.9-51.zip
pkg/svSocket/R/svTaskCallbackManager.R
pkg/svSocket/man/svTaskCallbackManager.Rd
Modified:
komodo/SciViews-K/SciViews-K.komodoproject
komodo/SciViews-K/chrome.manifest
komodo/SciViews-K/components/svRinterpreter.js
komodo/SciViews-K/content/RConsoleOverlay.xul
komodo/SciViews-K/content/RObjectsOverlay.xul
komodo/SciViews-K/content/RPkgManager.xul
komodo/SciViews-K/content/js/commands.js
komodo/SciViews-K/content/js/pref-R.js
komodo/SciViews-K/content/js/r.js
komodo/SciViews-K/content/js/rconsole.js
komodo/SciViews-K/content/js/robjects.js
komodo/SciViews-K/content/js/sciviews.js
komodo/SciViews-K/content/js/socket.js
komodo/SciViews-K/content/js/tools/file.js
komodo/SciViews-K/content/overlayMain.xul
komodo/SciViews-K/content/pref-R.xul
komodo/SciViews-K/defaults/.Rprofile
komodo/SciViews-K/defaults/svStart.R
komodo/SciViews-K/defaults/svTools_0.9-1.tar.gz
komodo/SciViews-K/defaults/svTools_0.9-1.zip
komodo/SciViews-K/defaults/toolbox.zip
komodo/SciViews-K/install.rdf
pkg/svDialogs/R/dlgMessage.R
pkg/svDialogs/TODO
pkg/svHttp/NEWS
pkg/svHttp/R/httpServer.R
pkg/svKomodo/NAMESPACE
pkg/svKomodo/NEWS
pkg/svKomodo/R/koInstall.R
pkg/svKomodo/R/koRefresh.R
pkg/svKomodo/R/koUninstall.R
pkg/svKomodo/R/svKomodo-internal.R
pkg/svMisc/NEWS
pkg/svMisc/R/objList.R
pkg/svSocket/NAMESPACE
pkg/svSocket/NEWS
pkg/svSocket/R/processSocket.R
pkg/svSocket/R/svSocket-Internal.R
pkg/svSocket/man/processSocket.Rd
pkg/svUnit/inst/doc/svUnit.pdf
Log:
Preparation of version for T.P. and courses: many bugs corrected in main SciViews-K + added R Output, better Http server, reworkable UI, etc. Code from svGUI is now in svKomodo and svHttp. Entering beta test for one month before installing new version on the University's machines.
Modified: komodo/SciViews-K/SciViews-K.komodoproject
===================================================================
--- komodo/SciViews-K/SciViews-K.komodoproject 2011-08-08 21:20:43 UTC (rev 385)
+++ komodo/SciViews-K/SciViews-K.komodoproject 2011-08-10 02:07:09 UTC (rev 386)
@@ -6,552 +6,35 @@
<file id="46c370a6-978b-4513-9cb8-056aebcf01f3" idref="aeee779f-9156-4b41-be2d-675d32098ff1" name="setup.xul" url="_prj_internal_/setup.xul">
</file>
<macro async="0" icon="chrome://famfamfamsilk/skin/icons/wrench.png" id="51c7310c-805d-4bcb-af72-57b51804be23" idref="aeee779f-9156-4b41-be2d-675d32098ff1" keyboard_shortcut="" language="JavaScript" name="Configure" rank="100" trigger="trigger_postopen" trigger_enabled="0">
-try {
-
-var libPart = ko.projects.findPart('macro', 'extension_lib', 'container');
-eval(libPart.value);
-
-var koExt = new extensionLib();
-
-var project = ko.macros.current.project;
-
-var setupWin = project.getChildByAttributeValue('name','setup.xul', 1);
-var rdf = project.getChildByAttributeValue('name','install.rdf', 1);
-var data = {};
-
-var prefset = project.prefset;
-
-if(prefset.hasPrefHere('configured')) {
- var rdf_xml = koExt.readFile(rdf.getFile().URI);
- data = {
- 'valid': false,
- 'configured': true,
- 'vars': koExt.getRdfVars(rdf_xml)
- };
- data.vars['ext_name'] = koExt.getNiceName(data.vars.name);
-} else { // init data
- data = {
- 'valid': false,
- 'configured': false,
- 'vars': {
- 'id': '',
- 'name': 'My Extension',
- 'creator': 'Me',
- 'version': '0.1',
- 'description': '',
- 'homepageURL': '',
- 'ext_name': ''
- }
- };
-}
-
-window.openDialog(
- setupWin.getFile().URI,
- "_blank",
- "centerscreen,chrome,resizable,scrollbars,dialog=no,close,modal=yes",
- data
-);
-
-if(data.valid) {
- if(koExt.updateProject(data.vars)) {
- prefset.setBooleanPref('configured', true);
- var part = project.getChildByAttributeValue('name', 'oncreate',1);
- if(part) { part.name = 'Configure'; }
- var msg = 'Extension Project '+data.vars.name+' configured!';
- ko.statusBar.AddMessage(msg, 'project', 3000, true);
- ko.projects.manager.saveProject(project);
- } else {
- alert('Error encountered: '+koExt.error+"\nConfiguration aborted.");
- }
-}
-
-} catch(e) {
- alert(e);
-}
</macro>
<macro async="0" icon="chrome://famfamfamsilk/skin/icons/lightning_go.png" id="a9aadbbc-4089-4c4e-b7ed-87089102aa06" idref="aeee779f-9156-4b41-be2d-675d32098ff1" keyboard_shortcut="" language="JavaScript" name="Build" rank="100" trigger="trigger_postopen" trigger_enabled="0">
-/**
- * Script to build an xpi, running koext build in the current project root.
- */
-
-var project = ko.macros.current.project;
-
-var os = Components.classes['@activestate.com/koOs;1'].
- getService(Components.interfaces.koIOs);
-
-var koSysUtils = Components.classes["@activestate.com/koSysUtils;1"].
- getService(Components.interfaces.koISysUtils);
-
-var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].
- getService(Components.interfaces.nsIXULRuntime);
-
-var koDirs = Components.classes['@activestate.com/koDirs;1'].
- getService(Components.interfaces.koIDirs);
-
-var pythonExe = koDirs.pythonExe;
-var projectDir = ko.interpolate.interpolateStrings('%p');
-var scriptName = 'koext';
-
-if (appInfo.OS == 'WINNT') {
- scriptName += ".py";
-}
-
-var arr = [koDirs.sdkDir, 'bin', scriptName]
-var app = os.path.joinlist(arr.length, arr);
-var cmd = '"'+pythonExe+'" "'+app+'" build -d "'+projectDir+'"';
-
-if (appInfo.OS == 'WINNT') {
- cmd = '"' + cmd + '"';
-}
-var cwd = koDirs.mozBinDir;
-cmd += " {'cwd': u'"+cwd+"'}";
-
-ko.run.runEncodedCommand(window, cmd, function() {
- ko.statusBar.AddMessage('Build complete', 'projects', 5000, true);
- ko.projects.manager.saveProject(project);
-});
</macro>
<macro async="0" icon="chrome://famfamfamsilk/skin/icons/brick.png" id="ff0456a2-4546-480a-897e-6bc9f30d58a2" idref="aeee779f-9156-4b41-be2d-675d32098ff1" keyboard_shortcut="" language="JavaScript" name="extension_lib" rank="100" trigger="trigger_postopen" trigger_enabled="0">
-try {
-
-var extensionLib = function() {
- this.os = Components.classes['@activestate.com/koOs;1'].
- getService(Components.interfaces.koIOs);
- this.error = false;
-}
-
-extensionLib.prototype.getPath = function(relative) {
- try {
- var prj_path = ko.interpolate.interpolateStrings('%p');
- path = this.os.path.join(prj_path, relative);
- return path;
- } catch(e) {
- alert(e+"\narg name: "+name);
- }
-}
-
-extensionLib.prototype.readFile = function(filename) {
- // read the template file
- try {
- var fileEx = Components.classes["@activestate.com/koFileEx;1"]
- .createInstance(Components.interfaces.koIFileEx);
- fileEx.URI = filename;
- fileEx.open('rb');
- var content = fileEx.readfile();
- fileEx.close();
- return content;
- } catch(e) {
- alert(e+"\narg filename: "+filename);
- }
-}
-
-extensionLib.prototype.writeFile = function(filename, content) {
- try {
- var fileEx = Components.classes["@activestate.com/koFileEx;1"]
- .createInstance(Components.interfaces.koIFileEx);
- fileEx.URI = filename;
- fileEx.open('wb+');
- fileEx.puts(content);
- fileEx.close();
- } catch(e) {
- alert(e+"\narg filename: "+filename);
- }
-}
-
-extensionLib.prototype.getRdfVars = function(txt) {
- try {
- var Rx = /\<em\:([\w]+)[\ \S]*\>([\S\ ]+?)\<\//g;
- var ext_vars = {};
- while(results = Rx.exec(txt)) {
- var idRx = /type|min|max|\{/;
- if(!idRx.test(results[0])) { // filter out stuff we don't want
- ext_vars[results[1]] = results[2];
- }
- }
- return ext_vars;
- } catch(e) {
- alert(e+"\narg rdf_path: "+rdf_path);
- }
-}
-
-extensionLib.prototype.getManifestVars = function(txt) {
- try {
- var rx1 = /content ([\S]+?) jar\:([\S]+?)\.jar/g;
- var res1 = rx1.exec(txt);
- var rx2 = /chrome:\/\/([\S]+?)\/content\/overlay\.xul/g;
- var res2 = rx2.exec(txt);
- return new Array(res1[1], res1[2], res2[1]);
- } catch(e) {
- alert(e+"\narg path: "+path);
- }
-}
-
-extensionLib.prototype.getOverlayVars = function(txt) {
- try {
- var rx1 = /<overlay id="([\S]+?)"/g;
- var res1 = rx1.exec(txt);
- var rx2 = /<menuitem id="([\S]+?)"[\s]+?label="([\S\ ]+?)"/g;
- var res2 = rx2.exec(txt);
- return [res1[1], res2[1], res2[2]];
- } catch(e) {
- alert(e+"\narg path: "+path);
- }
-}
-
-extensionLib.prototype.updateProject = function(vars) {
- try {
- var overlayPath = this.getPath('content/overlay.xul');
- if(this.os.path.exists(overlayPath)) {
- var ovl_str = this.readFile(overlayPath);
- var ov_vars = this.getOverlayVars(ovl_str);
- var ovl_new = [vars.ext_name+'Overlay', 'menu_'+vars.ext_name, vars.name];
- this.writeFile(overlayPath, this.replaceAll(ov_vars, ovl_new, ovl_str));
- } else { this.error = "Doesn't exist: "+overlayPath; return false; }
-
- var manifestPath = this.getPath('chrome.manifest');
- if(this.os.path.exists(manifestPath)) {
- var man_str = this.readFile(manifestPath);
- var man_vars = this.getManifestVars(man_str);
- var man_new = [vars.ext_name, vars.ext_name, vars.ext_name];
- this.writeFile(manifestPath, this.replaceAll(man_vars, man_new, man_str));
- } else { this.error = "Doesn't exist: "+overlayPath; return false; }
-
- var rdf_path = this.getPath('install.rdf');
- if(this.os.path.exists(rdf_path)) {
- var rdf_str = this.readFile(rdf_path);
- var rdf_vars = this.getRdfVars(rdf_str);
- this.writeFile(rdf_path, this.replaceAll(rdf_vars, vars, rdf_str));
- } else { this.error = "Doesn't exist: "+overlayPath; return false; }
-
- } catch(e) {
- this.error = e;
- return false;
- }
- return true;
-}
-
-extensionLib.prototype.replaceAll = function(orig_vars, new_vars, str) {
- try {
- var out = str;
- for(v in orig_vars) {
- out = out.replace(orig_vars[v], new_vars[v]);
- }
- return out;
- } catch(e) {
- alert(e);
- }
-}
-
-extensionLib.prototype.getNiceName = function(name) {
- return this.trim(name).replace(/[\W]/g,'').toLowerCase();
-}
-
-extensionLib.prototype.trim = function(str) {
- return str.replace(/^\s*/, '').replace(/\s*$/, '');
-}
-
-extensionLib.prototype.clone = function(obj) {
- var newobj = {}; for(i in obj) {
- newobj[i] = obj[i];
- } return newobj;
-}
-
-extensionLib.prototype._dump = function(obj) {
- var str = ''; for(i in obj) {
- str += i+': '+obj[i]+'\n';
- } return(str);
-}
-
-extensionLib.prototype._keys = function(obj) {
- var out = new Array(); for(i in obj) {
- out.push(i);
- } return out;
-}
-
-} catch(e) {
- allert(e);
-}
</macro>
<file id="ce09e80e-4f8e-784c-81c1-6564f46e2cf8" idref="f5feb14c-33f6-a44d-ad41-ab38bf630926" name="setup.xul" url="_prj_internal_/setup.xul">
</file>
<file id="1d542d8f-6043-4618-85b2-750f688afb86" idref="fd57ad7e-32b5-46a5-8b5a-36f513b953ad" name="setup.xul" url="_prj_internal_/setup.xul">
</file>
<macro async="0" icon="chrome://famfamfamsilk/skin/icons/wrench.png" id="45c63c14-27f6-4b60-b387-43ea4946597f" idref="fd57ad7e-32b5-46a5-8b5a-36f513b953ad" keyboard_shortcut="" language="JavaScript" name="Configure" rank="100" trigger="trigger_postopen" trigger_enabled="0">
-try {
-
-var libPart = ko.projects.findPart('macro', 'extension_lib', 'container');
-eval(libPart.value);
-
-var koExt = new extensionLib();
-
-var project = ko.macros.current.project;
-
-var setupWin = project.getChildByAttributeValue('name','setup.xul', 1);
-var rdf = project.getChildByAttributeValue('name','install.rdf', 1);
-var data = {};
-
-var prefset = project.prefset;
-
-if(prefset.hasPrefHere('configured')) {
- var rdf_xml = koExt.readFile(rdf.getFile().URI);
- data = {
- 'valid': false,
- 'configured': true,
- 'vars': koExt.getRdfVars(rdf_xml)
- };
- data.vars['ext_name'] = koExt.getNiceName(data.vars.name);
-} else { // init data
- data = {
- 'valid': false,
- 'configured': false,
- 'vars': {
- 'id': '',
- 'name': 'My Extension',
- 'creator': 'Me',
- 'version': '0.1',
- 'description': '',
- 'homepageURL': '',
- 'ext_name': ''
- }
- };
-}
-
-window.openDialog(
- setupWin.getFile().URI,
- "_blank",
- "centerscreen,chrome,resizable,scrollbars,dialog=no,close,modal=yes",
- data
-);
-
-if(data.valid) {
- if(koExt.updateProject(data.vars)) {
- prefset.setBooleanPref('configured', true);
- var part = project.getChildByAttributeValue('name', 'oncreate',1);
- if(part) { part.name = 'Configure'; }
- var msg = 'Extension Project '+data.vars.name+' configured!';
- ko.statusBar.AddMessage(msg, 'project', 3000, true);
- ko.projects.manager.saveProject(project);
- } else {
- alert('Error encountered: '+koExt.error+"\nConfiguration aborted.");
- }
-}
-
-} catch(e) {
- alert(e);
-}
</macro>
<macro async="0" icon="chrome://famfamfamsilk/skin/icons/lightning_go.png" id="4b74a155-8acd-4a55-97e9-f193ab92dc4a" idref="fd57ad7e-32b5-46a5-8b5a-36f513b953ad" keyboard_shortcut="" language="JavaScript" name="Build" rank="100" trigger="trigger_postopen" trigger_enabled="0">
-/**
- * Script to build an xpi, running koext build in the current project root.
- */
-
-var project = ko.macros.current.project;
-
-var os = Components.classes['@activestate.com/koOs;1'].
- getService(Components.interfaces.koIOs);
-
-var koSysUtils = Components.classes["@activestate.com/koSysUtils;1"].
- getService(Components.interfaces.koISysUtils);
-
-var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].
- getService(Components.interfaces.nsIXULRuntime);
-
-var koDirs = Components.classes['@activestate.com/koDirs;1'].
- getService(Components.interfaces.koIDirs);
-
-var pythonExe = koDirs.pythonExe;
-var projectDir = ko.interpolate.interpolateStrings('%p');
-var scriptName = 'koext';
-
-if (appInfo.OS == 'WINNT') {
- scriptName += ".py";
-}
-
-var arr = [koDirs.sdkDir, 'bin', scriptName]
-var app = os.path.joinlist(arr.length, arr);
-var cmd = '"'+pythonExe+'" "'+app+'" build -d "'+projectDir+'"';
-
-if (appInfo.OS == 'WINNT') {
- cmd = '"' + cmd + '"';
-}
-var cwd = koDirs.mozBinDir;
-cmd += " {'cwd': u'"+cwd+"'}";
-
-ko.run.runEncodedCommand(window, cmd, function() {
- ko.statusBar.AddMessage('Build complete', 'projects', 5000, true);
- ko.projects.manager.saveProject(project);
-});
</macro>
<macro async="0" icon="chrome://famfamfamsilk/skin/icons/brick.png" id="a2c99057-bcb3-43d5-8284-66628a53eadb" idref="fd57ad7e-32b5-46a5-8b5a-36f513b953ad" keyboard_shortcut="" language="JavaScript" name="extension_lib" rank="100" trigger="trigger_postopen" trigger_enabled="0">
-try {
-
-var extensionLib = function() {
- this.os = Components.classes['@activestate.com/koOs;1'].
- getService(Components.interfaces.koIOs);
- this.error = false;
-}
-
-extensionLib.prototype.getPath = function(relative) {
- try {
- var prj_path = ko.interpolate.interpolateStrings('%p');
- path = this.os.path.join(prj_path, relative);
- return path;
- } catch(e) {
- alert(e+"\narg name: "+name);
- }
-}
-
-extensionLib.prototype.readFile = function(filename) {
- // read the template file
- try {
- var fileEx = Components.classes["@activestate.com/koFileEx;1"]
- .createInstance(Components.interfaces.koIFileEx);
- fileEx.URI = filename;
- fileEx.open('rb');
- var content = fileEx.readfile();
- fileEx.close();
- return content;
- } catch(e) {
- alert(e+"\narg filename: "+filename);
- }
-}
-
-extensionLib.prototype.writeFile = function(filename, content) {
- try {
- var fileEx = Components.classes["@activestate.com/koFileEx;1"]
- .createInstance(Components.interfaces.koIFileEx);
- fileEx.URI = filename;
- fileEx.open('wb+');
- fileEx.puts(content);
- fileEx.close();
- } catch(e) {
- alert(e+"\narg filename: "+filename);
- }
-}
-
-extensionLib.prototype.getRdfVars = function(txt) {
- try {
- var Rx = /\<em\:([\w]+)[\ \S]*\>([\S\ ]+?)\<\//g;
- var ext_vars = {};
- while(results = Rx.exec(txt)) {
- var idRx = /type|min|max|\{/;
- if(!idRx.test(results[0])) { // filter out stuff we don't want
- ext_vars[results[1]] = results[2];
- }
- }
- return ext_vars;
- } catch(e) {
- alert(e+"\narg rdf_path: "+rdf_path);
- }
-}
-
-extensionLib.prototype.getManifestVars = function(txt) {
- try {
- var rx1 = /content ([\S]+?) jar\:([\S]+?)\.jar/g;
- var res1 = rx1.exec(txt);
- var rx2 = /chrome:\/\/([\S]+?)\/content\/overlay\.xul/g;
- var res2 = rx2.exec(txt);
- return new Array(res1[1], res1[2], res2[1]);
- } catch(e) {
- alert(e+"\narg path: "+path);
- }
-}
-
-extensionLib.prototype.getOverlayVars = function(txt) {
- try {
- var rx1 = /<overlay id="([\S]+?)"/g;
- var res1 = rx1.exec(txt);
- var rx2 = /<menuitem id="([\S]+?)"[\s]+?label="([\S\ ]+?)"/g;
- var res2 = rx2.exec(txt);
- return [res1[1], res2[1], res2[2]];
- } catch(e) {
- alert(e+"\narg path: "+path);
- }
-}
-
-extensionLib.prototype.updateProject = function(vars) {
- try {
- var overlayPath = this.getPath('content/overlay.xul');
- if(this.os.path.exists(overlayPath)) {
- var ovl_str = this.readFile(overlayPath);
- var ov_vars = this.getOverlayVars(ovl_str);
- var ovl_new = [vars.ext_name+'Overlay', 'menu_'+vars.ext_name, vars.name];
- this.writeFile(overlayPath, this.replaceAll(ov_vars, ovl_new, ovl_str));
- } else { this.error = "Doesn't exist: "+overlayPath; return false; }
-
- var manifestPath = this.getPath('chrome.manifest');
- if(this.os.path.exists(manifestPath)) {
- var man_str = this.readFile(manifestPath);
- var man_vars = this.getManifestVars(man_str);
- var man_new = [vars.ext_name, vars.ext_name, vars.ext_name];
- this.writeFile(manifestPath, this.replaceAll(man_vars, man_new, man_str));
- } else { this.error = "Doesn't exist: "+overlayPath; return false; }
-
- var rdf_path = this.getPath('install.rdf');
- if(this.os.path.exists(rdf_path)) {
- var rdf_str = this.readFile(rdf_path);
- var rdf_vars = this.getRdfVars(rdf_str);
- this.writeFile(rdf_path, this.replaceAll(rdf_vars, vars, rdf_str));
- } else { this.error = "Doesn't exist: "+overlayPath; return false; }
-
- } catch(e) {
- this.error = e;
- return false;
- }
- return true;
-}
-
-extensionLib.prototype.replaceAll = function(orig_vars, new_vars, str) {
- try {
- var out = str;
- for(v in orig_vars) {
- out = out.replace(orig_vars[v], new_vars[v]);
- }
- return out;
- } catch(e) {
- alert(e);
- }
-}
-
-extensionLib.prototype.getNiceName = function(name) {
- return this.trim(name).replace(/[\W]/g,'').toLowerCase();
-}
-
-extensionLib.prototype.trim = function(str) {
- return str.replace(/^\s*/, '').replace(/\s*$/, '');
-}
-
-extensionLib.prototype.clone = function(obj) {
- var newobj = {}; for(i in obj) {
- newobj[i] = obj[i];
- } return newobj;
-}
-
-extensionLib.prototype._dump = function(obj) {
- var str = ''; for(i in obj) {
- str += i+': '+obj[i]+'\n';
- } return(str);
-}
-
-extensionLib.prototype._keys = function(obj) {
- var out = new Array(); for(i in obj) {
- out.push(i);
- } return out;
-}
-
-} catch(e) {
- allert(e);
-}
</macro>
<preference-set idref="6200c0ed-45ec-4f46-a159-284803d65c04">
<boolean id="configured">1</boolean>
+ <string relative="path" id="import_dirname"></string>
<string id="import_exclude_matches">*.*~;*.bak;*.tmp;CVS;.#*;*.pyo;*.pyc;.svn;*%*;tmp*.html;.DS_Store;_prj_internal_</string>
<string id="import_include_matches"></string>
<boolean id="import_live">1</boolean>
<boolean id="import_recursive">1</boolean>
<string id="import_type">useFolders</string>
+ <string id="javascriptExtraPaths"></string>
+ <string id="mappedPaths"></string>
+ <string id="perlExtraPaths"></string>
+ <boolean id="perl_lintOption_includeCurrentDirForLinter">1</boolean>
+ <string id="phpExtraPaths"></string>
+ <string id="pythonExtraPaths"></string>
+ <string id="rubyExtraPaths"></string>
</preference-set>
-<preference-set idref="6200c0ed-45ec-4f46-a159-284803d65c04/content/js/rinterpolationquery.js">
- <string id="spellcheckLangID">en-US</string>
-</preference-set>
</project>
Modified: komodo/SciViews-K/chrome.manifest
===================================================================
--- komodo/SciViews-K/chrome.manifest 2011-08-08 21:20:43 UTC (rev 385)
+++ komodo/SciViews-K/chrome.manifest 2011-08-10 02:07:09 UTC (rev 386)
@@ -2,10 +2,8 @@
overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/overlayMain.xul
overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/RObjectsOverlay.xul
overlay chrome://komodo/content/pref/pref.xul chrome://sciviewsk/content/prefOverlay.xul
+overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/RConsoleOverlay.xul
-# The following items is not finished yet, and is thus commented out
-#overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/RConsoleOverlay.xul
-
locale sciviewsk en-GB jar:sciviewsk.jar!/locale/en-GB/
locale sciviewsk fr-FR jar:sciviewsk.jar!/locale/fr-FR/
Modified: komodo/SciViews-K/components/svRinterpreter.js
===================================================================
--- komodo/SciViews-K/components/svRinterpreter.js 2011-08-08 21:20:43 UTC (rev 385)
+++ komodo/SciViews-K/components/svRinterpreter.js 2011-08-10 02:07:09 UTC (rev 386)
@@ -11,7 +11,6 @@
// R = components.classes["@sciviews.org/svRinterpreter;1"].\
// getService(components.interfaces.svIRinterpreter)
////////////////////////////////////////////////////////////////////////////////
-// sv.clientType; // Global variable with 'socket' or 'http'
// R.escape(); // Escape R code
// R.calltip(code); // Get a calltip for this code
// R.complete(code); // Get completion list for this code
@@ -213,7 +212,6 @@
}
-
//// Komodo preferences access /////////////////////////////////////////////////
var prefsSvc = Components.classes["@activestate.com/koPrefService;1"]
.getService(Components.interfaces.koIPrefService);
@@ -233,19 +231,25 @@
}
-//// R socket server configuration /////////////////////////////////////////////
-// Get server type preference and set sv.clientType accordingly
+//// R socket server ///////////////////////////////////////////////////////////
if (typeof(sv) == "undefined") var sv = {};
-sv.clientType = getPrefString("sciviews.client.type", "socket"); // We use http by default
+sv.clientType = getPrefString("sciviews.client.type", "socket");
+setPrefString("sciviews.client.currentType", sv.clientType, true);
// String converter used between Komodo and R (localeToCharset()[1] in R)
var converter = Components
.classes["@mozilla.org/intl/scriptableunicodeconverter"]
.createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
-// Use ASCII encoding by default
-try { converter.charset = "ASCII"; } catch (e) { }
+// Use UTF-8 encoding by default, except on Windows where ISO8859-1 is a better bet
+try {
+ if (navigator.platform.search(/Win\d+$/) === 0) {
+ converter.charset = "ISO8859-1";
+ } else {
+ converter.charset = "UTF-8";
+ }
+} catch (e) { }
// The conversion functions
function _fromUnicode (str, charset) {
@@ -255,7 +259,8 @@
if (converter.charset)
str = converter.ConvertFromUnicode(str) + converter.Finish();
} catch(e) {
- koLoggerException(e, "sv.socket is unable to convert from Unicode to " +
+ koLoggerException(e,
+ "svRinterpreter is unable to convert from Unicode to " +
converter.charset + ". The string was " + str);
}
return(str);
@@ -268,7 +273,8 @@
if (converter.charset)
str = converter.ConvertToUnicode(str);
} catch(e) {
- koLoggerException(e, "sv.socket is unable to convert to Unicode from " +
+ koLoggerException(e,
+ "svRinterpreter is unable to convert to Unicode from " +
converter.charset + ". The string was " + str);
}
return(str);
@@ -404,6 +410,7 @@
function rCommand(cmd, procfun) {
var host = getPrefString("sciviews.server.host", "127.0.0.1");
var port = getPrefString("sciviews.client.socket", "8888");
+ var clientType = getPrefString("sciviews.client.currentType", "socket");
var id = "<<<id=" +
getPrefString("sciviews.client.id", "SciViewsK") + ">>>";
cmd = cmd.replace(/(\r?\n|\r)/g, "<<<n>>>"); // Replace CRLF
@@ -426,7 +433,7 @@
}
}
var res = "";
- if (sv.clientType == "socket") { // Socket server in svSocket
+ if (clientType == "socket") { // Socket server in svSocket
res = rClientSocket(host, port, id + cmd + "\n", listener);
} else { // Http server in svGUI
res = rClientHttp(host, port, id + cmd + "\n", listener);
Modified: komodo/SciViews-K/content/RConsoleOverlay.xul
===================================================================
--- komodo/SciViews-K/content/RConsoleOverlay.xul 2011-08-08 21:20:43 UTC (rev 385)
+++ komodo/SciViews-K/content/RConsoleOverlay.xul 2011-08-10 02:07:09 UTC (rev 386)
@@ -15,7 +15,8 @@
The Original Code is SciViews-K by Philippe Grosjean et al.
Contributor(s):
- Romain Francois
+ Activestate staff (original code is Komodo's runOutput window)
+ Philippe Grosjean, SciViews
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
@@ -31,132 +32,97 @@
***** END LICENSE BLOCK ***** -->
-<!DOCTYPE overlay PUBLIC "-//MOZILLA//DTD XUL V1.0//EN"
- "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" [
- <!ENTITY % sciviewskDTD SYSTEM "chrome://sciviewsk/locale/sciviewsk.dtd">
- %sciviewskDTD;
+<!DOCTYPE overlay PUBLIC "-//MOZILLA//DTD XUL V1.0//EN" "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" [
+ <!ENTITY % debuggerDTD SYSTEM "chrome://komodo/locale/komodo.dtd">
+ %debuggerDTD;
]>
+<?xml-stylesheet href="chrome://komodo/skin/komodo.css" type="text/css"?>
+<?xml-stylesheet href="chrome://komodo/skin/global/global.css" type="text/css"?>
+<?xml-stylesheet href="chrome://komodo/skin/toolbar.css" type="text/css"?>
+<?xml-stylesheet href="chrome://komodo/skin/bindings/scrolltabs.css" type="text/css"?>
+<?xml-stylesheet href="chrome://komodo/skin/bindings/sidebar.css" type="text/css"?>
+<?xml-stylesheet href="chrome://komodo/skin/bindings/views.css" type="text/css"?>
+<?xml-stylesheet href="chrome://komodo/skin/bindings/widgets.css" type="text/css"?>
+<?xml-stylesheet href="chrome://komodo/skin/platform.css" type="text/css"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="chrome://komodo/skin/global/global.p.css" type="text/css"?>
-<?xml-stylesheet href="chrome://komodo/skin/bindings/buttons.css" type="text/css"?>
-<?xml-stylesheet href="chrome://sciviewsk/skin/sciviewsk.css" type="text/css"?>
-<?xml-stylesheet href="chrome://sciviewsk/skin/sciviewsk_console.css" type="text/css"?>
+<?xul-overlay href="chrome://komodo/content/bindings/scintilla-overlay.xul"?>
<overlay id="sciviewskRconsoleOverlay"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/sciviews.js"/>
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/prefs.js"/>
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/tools/file.js"/>
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/tools/strings.js"/>
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/tools/e4x2dom.js"/>
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/tools/array.js"/>
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/socket.js"/>
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/r.js"/>
- <script type="application/x-javascript" src="chrome://sciviewsk/content/js/rconsole.js"/>
+ <script type="application/x-javascript" src="chrome://sciviewsk/content/js/rconsole.js"/>
<menupopup id="tabPicker_popup">
- <menuitem id="show_rconsole_tab" label="&sciviews.console.tab;"
- oncommand="uilayout_ensureTabShown('sciviews_rconsole_tab', true)"/>
+ <menuitem id="show_rconsole_tab" label="R Output"
+ insertbefore="show_runoutput_tab"
+ observes="show_sciviews_rconsole_tab"
+ oncommand="ko.uilayout.ensureTabShown('sciviews_rconsole_tab', true);"/>
</menupopup>
<menupopup id="menu_view_tabs_popup">
<menuitem id="show_rconsole_tab2" class="menuitem-iconic-wide"
- label="&sciviews.console.tab;"
- oncommand="uilayout_ensureTabShown('sciviews_rconsole_tab', true)"/>
+ insertbefore="show_runoutput_tab2"
+ label="R Output" type="checkbox"
+ observes="show_sciviews_rconsole_tab"
+ oncommand="ko.uilayout.ensureTabShown('sciviews_rconsole_tab', true);"/>
</menupopup>
- <tabbox id="output_area">
- <tabs id="output_tabs">
- <tab id="sciviews_rconsole_tab" label="&sciviews.console.tab;"
- tooltiptext="&sciviews.console.tip;" onclick="sv.r.console.init();"/>
- </tabs>
- <tabpanels id="output_tabpanels">
-
- <tabpanel flex="1" id="sciviews_rconsole_tabpanel">
- <vbox id="sciviews_rconsole_console_vbox" flex="1" style="margin-left:10px;">
- <richlistbox id="sciviews_rconsole_console_results" flex="1"/>
- <splitter id="sciviews_rconsole_console_splitter">
- <grippy/>
- </splitter>
- <hbox>
- <!-- TODO: replace this with a scintilla editor, would we get syntax highlighting for free? -->
- <!-- TODO: needs a bit of styling -->
- <!-- here is the input area where R code is typed and sent to the console -->
- <textbox id="sciviews_rconsole_console_input" cols="20"
- onkeypress="sv.r.console.handleConsoleKeyPress(event)"
- onkeyup="sv.r.console.handleConsoleKeyUp(event)"
- flex="1" multiline="true" rows="2"/>
+ <tabs id="output_tabs">
+ <tab id="sciviews_rconsole_tab" label="R Output"
+ insertbefore="runoutput_tab"/>
+ <!--tooltiptext="A R process running locally"/>
+ onclick="sv.rconsole.run();"/>-->
+ </tabs>
+
+ <tabpanels id="output_tabpanels">
+ <tabpanel flex="1" id="rconsole_tabpanel"
+ insertbefore="runoutput-desc-tabpanel">
+ <vbox flex="1" id="rconsole-desc-tabpane">
+ <hbox id="rconsole-desc-tabpanel-toolbar-hbox"
+ class="toolbar-background toolbar-hbox">
+ <vbox flex="1">
+ <spring flex="1"/>
+ <label id="rconsole-desc" style="height: 15px;"
+ flex="1" crop="center"/>
+ <spring flex="1"/>
+ </vbox>
+ <spacer flex="1"/>
+ <hbox id="rconsole-button-box" class="no-border solo-toolbaritem">
+ <toolbarbutton id="rconsole-list-button"
+ class="bulletlist-icon"
+ tooltiptext="Show R command history"
+ oncommand="sv.rconsole.toggleView();"
+ disabled="true"/>
+ <toolbarbutton id="rconsole-close-button"
+ class="find-stop-icon"
+ tooltiptext="Clear R Output"
+ oncommand="sv.cmdout.clear(true);"
+ disabled="false"/>
+ <!-- original action: oncommand="sv.rconsole.kill(-1);"-->
+ </hbox>
</hbox>
- </vbox>
- <splitter>
- <grippy/>
- </splitter>
-
- <tabbox flex="1">
- <tabs>
- <tab label="completion" id="sciviews_rconsole_console_tab_completion"/>
- <tab label="history" id="sciviews_rconsole_console_tab_history"/>
- </tabs>
- <tabpanels flex="1">
-
- <!-- completion tab -->
- <!-- TODO: use this as a tooltip -->
- <tabpanel>
- <vbox flex="1">
- <hbox>
- <label value="&sciviews.rconsole.completion.settings.label;"
- tooltiptext="&sciviews.rconsole.completion.settings.tip;"/>
- <checkbox label="&sciviews.rconsole.completion.cb.arguments;"
- id="sciviews_rconsole_completion_cb_arguments"
- tooltiptext="&sciviews.rconsole.completion.cb.arguments.tip;"
- onclick="sv.r.console.updateCompletionChoiceSetting(event, 'arguments' )"/>
- <checkbox label="&sciviews.rconsole.completion.cb.functions;"
- id="sciviews_rconsole_completion_cb_functions"
- tooltiptext="&sciviews.rconsole.completion.cb.functions.tip;"
- onclick="sv.r.console.updateCompletionChoiceSetting(event, 'functions' )"/>
- <checkbox label="&sciviews.rconsole.completion.cb.packages;"
- id="sciviews_rconsole_completion_cb_packages"
- tooltiptext="&sciviews.rconsole.completion.cb.packages.tip;"
- onclick="sv.r.console.updateCompletionChoiceSetting(event, 'packages' )"/>
- <checkbox label="&sciviews.rconsole.completion.cb.history;"
- id="sciviews_rconsole_completion_cb_history"
- tooltiptext="&sciviews.rconsole.completion.cb.history.tip;"
- onclick="sv.r.console.updateCompletionChoiceSetting(event, 'history' )"/>
- </hbox>
- <tree flex="1">
+ <vbox flex="1" id="rconsole-desc-tabpanel-vbox">
+ <hbox flex="1" id="rconsole-desc-tabpanel-hbox">
+ <deck id="rconsole-deck" selectedIndex="1" flex="1">
+ <view type="terminal"
+ id="rconsole-scintilla"
+ flex="1" style="cursor: text;"
+ onclick="sv.rconsole.scintillaOnClick(event);"/>
+ <view type="terminal"
+ id="rconsole-scintilla2"
+ flex="1" style="cursor: text;"/>
+ <tree id="rconsole-tree" flex="1" class="no-border">
<treecols>
- <treecol primary="true" label="completion" flex="1"/>
- <treecol label="position" flex="1"/>
- <treecol label="description" flex="6"/>
</treecols>
- <treechildren id="sciviews_rconsole_completion_tree_main"/>
+ <treechildren id="rconsole-tree-body" flex="1"/>
</tree>
- </vbox>
- </tabpanel>
-
- <!-- history tab -->
- <tabpanel>
- <vbox flex="1">
- <hbox>
- <label>history</label>
- <textbox id="sciviews_rconsole_history_filter"
- style="min-width:40px; margin-right:0px; max-width:100px;"
- type="timed" timeout="500" flex="1"
- oninput="sv.r.console.refreshHistory();"
- multiline="false" rows="1"
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/sciviews -r 386
More information about the Sciviews-commits
mailing list