[Sciviews-commits] r426 - in komodo/SciViews-K-dev: . components content content/js lexers skin

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 7 01:13:42 CET 2012


Author: prezez
Date: 2012-02-07 01:13:42 +0100 (Tue, 07 Feb 2012)
New Revision: 426

Added:
   komodo/SciViews-K-dev/components/component.manifest
   komodo/SciViews-K-dev/content/overlayMain.xul
   komodo/SciViews-K-dev/content/places.xul
   komodo/SciViews-K-dev/content/rbrowser-pane.xul
   komodo/SciViews-K-dev/lexers/
   komodo/SciViews-K-dev/lexers/R.lexres
   komodo/SciViews-K-dev/sciviewsk-1.1.0dev-ko.xpi
Removed:
   komodo/SciViews-K-dev/content/js/r_new.js
   komodo/SciViews-K-dev/content/overlayMain.xul
Modified:
   komodo/SciViews-K-dev/
   komodo/SciViews-K-dev/chrome.manifest
   komodo/SciViews-K-dev/content/js/robjects.js
   komodo/SciViews-K-dev/skin/sciviewsk.css
Log:
Further adaptations to Ko-7 (object browser, component registration). Most functionalities restored.
Note that now does not work with Ko-6: must include version select in 'chrome.manifest'
added xpi: version 1.1.0dev 


Property changes on: komodo/SciViews-K-dev
___________________________________________________________________
Modified: svn:ignore
   - !*
*-dev.*
build
*.xpi
*.xpi
*.xpi

   + !*
*-dev.*
*.xpi
build
sciviewsk-1.0.8dev-ko


Modified: komodo/SciViews-K-dev/chrome.manifest
===================================================================
--- komodo/SciViews-K-dev/chrome.manifest	2012-02-06 17:58:24 UTC (rev 425)
+++ komodo/SciViews-K-dev/chrome.manifest	2012-02-07 00:13:42 UTC (rev 426)
@@ -1,14 +1,13 @@
 content sciviewsk jar:sciviewsk.jar!/content/ xpcnativewrappers=yes
 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/pref/pref.xul chrome://sciviewsk/content/pkgman/pkgman.xul
 
-# The following items is not finished yet, and is thus commented out
-#overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/RConsoleOverlay.xul
+overlay chrome://places/content/places_panel.xul chrome://sciviewsk/content/places.xul
 
 locale  sciviewsk     en-GB     jar:sciviewsk.jar!/locale/en-GB/
 locale  sciviewsk     fr-FR     jar:sciviewsk.jar!/locale/fr-FR/
 
 skin    sciviewsk  classic/1.0  jar:sciviewsk.jar!/skin/
+

Added: komodo/SciViews-K-dev/components/component.manifest
===================================================================
--- komodo/SciViews-K-dev/components/component.manifest	                        (rev 0)
+++ komodo/SciViews-K-dev/components/component.manifest	2012-02-07 00:13:42 UTC (rev 426)
@@ -0,0 +1,9 @@
+contract @activestate.com/koLinter?language=R;1 {E5B7415C-81C6-4185-8B53-B527193D251E}
+category category-komodo-linter R @activestate.com/koLinter?language=R;1
+component {E5B7415C-81C6-4185-8B53-B527193D251E} koRLinter.py
+category komodo-language R @activestate.com/koLanguage?language=R;1
+component {4cc23d3b-52e2-426d-8a22-6d7eb2ba81ae} koR_UDL_Language.py
+contract @activestate.com/koLanguage?language=R;1 {4cc23d3b-52e2-426d-8a22-6d7eb2ba81ae}
+contract @sciviews.org/svUtils;1 {22A6C234-CC35-D374-2F01-FD4C605C905C}
+component {22A6C234-CC35-D374-2F01-FD4C605C905C} svUtils.py
+interfaces svIUtils.xpt
\ No newline at end of file

Deleted: komodo/SciViews-K-dev/content/js/r_new.js
===================================================================
--- komodo/SciViews-K-dev/content/js/r_new.js	2012-02-06 17:58:24 UTC (rev 425)
+++ komodo/SciViews-K-dev/content/js/r_new.js	2012-02-07 00:13:42 UTC (rev 426)
@@ -1,212 +0,0 @@
-//{  }
-
-// 's.rnew' object is an interface to R implemented mostly in python
-// 		The workhorse is 'svUtils' XPCOM interface
-//.command (Read only) last command evaluated
-//.result (Read only) last result returned
-//.getRProc(property) get information on currently running R processes
-//		(property is one of 'Handle','ProcessId' or 'CommandLine'
-//.rEval(command, callback) evaluate in R, optional callback (if not provided,
-//		the most recent one is used)
-//.rEvalQuick(command) - do 'quick' evaluation in R, and
-//		return the result
-//.startSocketServer(requestHandler) - optional 'requestHandler' is a function that
-//		handles the received data and returns a string
-//.stopSocketServer()
-//.testRAvailability(checkProc) - test whether R is available, check connection and
-//		optionally look up running processes
-//Debugging functions:
-//.testRCommand(command)
-//.testRCommandNotify(chunk)
-//.enumObservers()
-//Functions below should not be called directy by the user.
-//	they will become private later
-//*.setObserver(callback, topic) set callback function for R command
-//*.removeObserver
-
-
-try { // in case we inject the script more then one time
-	sv.rnew.removeObserver();
-} catch(e) {}
-
-
-sv.rnew = {};
-
-(function() {
-	var _this = this;
-	this.port = 8888;
-	this.serverPort = 7052;
-	this.host = 'localhost';
-
-// get string from nsISupportsString
-function _str(sString) sString.QueryInterface(Components
-	.interfaces.nsISupportsString).data;
-
-var _svuSvc = Components.classes["@sciviews.org/svUtils;1"]
-	.getService(Components.interfaces.svIUtils);
-var _obsSvc = Components.classes["@mozilla.org/observer-service;1"]
-    .getService(Components.interfaces.nsIObserverService);
-
-var observers = {};
-var obsCallback = function() { sv.cmdout.append("test")};
-
-this.__defineGetter__ ('command', function () _svuSvc.lastCommand);
-this.__defineGetter__ ('result', function () _svuSvc.lastResult);
-
-// get list of running R processes
-this.getRProc = function(property) {
-	if (!property) property = "CommandLine";
-	var procList = _svuSvc.getproc(property);
-	proc = [];
-	while(procList.hasMoreElements())
-		proc.push(_str(procList.getNext()));
-	return proc;
-}
-
-// Observer of 'r-command-executed' notification
-function rObserver(topic, callback) this.register(topic, callback);
-rObserver.prototype = {
-	observe: function(subject, topic, data) {
-		//ko.dialogs.alert(topic + ":\r\n" + data);
-		this.callback(_svuSvc.lastCommand, data);
-	},
-	register: function(topic, callback) {
-		if(callback) this.callback = callback;
-		this.topic = topic;
-		_obsSvc.addObserver(this, topic, false);
-	},
-	unregister: function() {
-		_obsSvc.removeObserver(this, this.topic);
-	},
-
-	topic: null,
-	callback: function(cmd, data) ko.dialogs.alert(cmd, data)
-}
-
-this.removeObserver = function(topic) {
-	if (!topic)	for (var i in observers) {
-		observers[i].unregister();
-		delete observers[i];
-	}
-	else {
-		observers[topic].unregister();
-		delete observers[topic];
-	}
-}
-
-// Set callback for executing R command
-this.setObserver = function(callback, topic) {
-	if(!topic) topic = "r-command-executed";
-
-	try {
-		_this.removeObserver(topic);
-	} catch(e) {}
-	observers[topic] = new rObserver(topic, callback);
-}
-
-this.enumObservers = function() {
-	var ret = [];
-	for (var i in observers) ret.push(observers[i]);
-	return ret;
-}
-
-// Evaluate in R
-this.rEval = function(command, callback, hidden) {
-	if(callback) _this.setObserver(callback, "r-command-executed");
-	_svuSvc.execInRBgr(command, _this.host, _this.port, hidden? "h" : "e");
-}
-
-// TODO: this should use <<<h>>>
-// Evaluate in R quickly - and return result
-this.rEvalQuick = function(command)
-	_svuSvc.execInR(command, _this.host, _this.port, "h");
-
-
-// For debugging purposes only
-this.testRCommand = function(command) {
-	if(!command) command = "sample(LETTERS, 10)";
-	_svuSvc.execInRBgr(command, _this.host, _this.port, "e");
-}
-
-this.testRCommandNotify = function(chunk) {
-	topic = "r-command" + (chunk? "chunk" : "executed");
-	_obsSvc.notifyObservers(null, topic, "You are notified. {" + topic + "}");
-}
-
-var rCallback = function(cmd, res) {
-	//sv.cmdout.clear();
-	sv.cmdout.append("::>"+ cmd + ": END")
-}
-
-var rCallbackChunk = function(cmd, res) {
-	sv.cmdout.append("\n<++CHUNK++>\n"+ res, false)
-}
-
-this.testRAvailability = function(checkProc) {
-	var result = _this.rEvalQuick("cat(1)").trim();
-	var connectionUp = result == "1";
-	var rProcess = checkProc? _this.getRProc() : undefined;
-	var rProcessCount = (rProcess == undefined)? -1 : rProcess.length;
-	ret = '';
-	if(!connectionUp) {
-		ret += "Cannot connect to R";
-		if (rProcessCount > 0) {
-			ret += ", but there " + ((rProcessCount > 1)? "are " + rProcessCount
-				+ " R processes": "is one R process") + " running.";
-			result += "\n\nR processes currently running:\n" + rProcess.join("\n");
-		} else if (rProcessCount == 0) {
-			ret += ",  R is not running.";
-		}
-	} else {
-		result = null;
-		ret += "Connection with R successful.";
-	}
-	//ko.dialogs.alert(ret, result, "R connection test");
-	sv.cmdout.append("R connection test:\n" + ret + "\n"  + result);
-	return connectionUp;
-}
-
-_this.setObserver(rCallbackChunk, "r-command-chunk");
-_this.setObserver(rCallback, "r-command-executed");
-
-var defaultRequestHandler = function(str) {
-	str = str.trim();
-	//sv.cmdout.append(str);
-	try {
-		if (str.indexOf("<<<js>>>") == 0)
-			return eval(str.substring(8));
-		 else if(str.indexOf("<<<rjsonp>>>") == 0)
-			return sv.rjson.eval(str.substring(12));
-	} catch(e) {
-		return e.message;
-	}
-	sv.cmdout.append(str);
-	return "Received: [" + str + "]"; // echo
-}
-
-
-this.startSocketServer = function(requestHandler) {
-	_this.host = sv.prefs.getString("sciviews.server.host");
-	_this.serverPort = parseInt(sv.prefs.getString("sciviews.server.socket"));
-
-	if(!requestHandler) requestHandler = defaultRequestHandler;
-	return _svuSvc.startSocketServer(_this.host, _this.serverPort, {onStuff: requestHandler});
-}
-
-this.stopSocketServer = function() _svuSvc.stopSocketServer();
-
-addEventListener("load", function() {
-	sv.command.updateRStatus(_this.testRAvailability(false));
-	_this.startSocketServer();
-}, false);
-
-
-}).apply(sv.rnew);
-
-
-// seems to be no problem with encoding (!!?)
-//sv.rnew.testRCommand("cat('pchn¹æ w tê ³ódŸ je¿a i óœm skrzyñ fig')") // Note this is CP1250 encoding
-
-
-//sv.rnew.rEval("cat(1:10)", ko.dialogs.alert);
-//result = sv.rnew.rEvalQuick("cat(1:10)");

Modified: komodo/SciViews-K-dev/content/js/robjects.js
===================================================================
--- komodo/SciViews-K-dev/content/js/robjects.js	2012-02-06 17:58:24 UTC (rev 425)
+++ komodo/SciViews-K-dev/content/js/robjects.js	2012-02-07 00:13:42 UTC (rev 426)
@@ -118,10 +118,11 @@
 }
 
 */
+//var sv = parent.sv;
 
-
 sv.rbrowser = {};
 
+
 ////DEBUG///
 var print = sv.cmdout.append;	/// XXX DEBUG
 var clear = sv.cmdout.clear;	/// XXX DEBUG
@@ -1541,7 +1542,10 @@
 	_this.selection.rangedSelect(startIndex, endIndex, augment)
 }
 
+this.focus = function() {
 
+}
+
 //_setOnEvent("sciviews_robjects_searchpath_listbox", "ondragdrop",
 //		"nsDragAndDrop.drop(event, sv.rbrowser.packageListObserver);"
 //		);

Deleted: komodo/SciViews-K-dev/content/overlayMain.xul
===================================================================
--- komodo/SciViews-K-dev/content/overlayMain.xul	2012-02-06 17:58:24 UTC (rev 425)
+++ komodo/SciViews-K-dev/content/overlayMain.xul	2012-02-07 00:13:42 UTC (rev 426)
@@ -1,390 +0,0 @@
-<?xml version="1.0"?>
-<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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/
-
- 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.
-
- The Original Code is SciViews-K by Philippe Grosjean et al.
-
- Contributor(s):
-   Philippe Grosjean
-   Romain Francois
-   Kamil Barton
-   ActiveState Software Inc (code inspired from)
-
- 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 ***** -->
-
-<!DOCTYPE overlay PUBLIC "-//MOZILLA//DTD XUL V1.0//EN"
-	"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" [
-	<!ENTITY % komodoDTD SYSTEM "chrome://komodo/locale/komodo.dtd">
-	%komodoDTD;
-	<!ENTITY % sciviewskDTD SYSTEM "chrome://sciviewsk/locale/sciviewsk.dtd">
-	%sciviewskDTD;
-]>
-
-<?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"?>
-
-<overlay id="sciviewskOverlay"
-	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/tools/array.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/file.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/sciviews.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/rjson.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/prefs.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/rconnection.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/r.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/r-help.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/commands.js"/>
-
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/misc.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/ask.js"/>
-	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/interpolate.js"/>
-
-
-
-	<broadcasterset id="broadcasterset_global">
-		<broadcaster id="sv_r_is_running" disabled="false"/>
-		<broadcaster
-			id="cmd_viewrtoolbar" key="key_cmd_viewrtoolbar"
-			desc="&userInterfaceShowHideRToolbar.desc;"
-			autoCheck="false"
-			checked="true"
-			persist="checked"
-			oncommand="ko.commands.doCommandAsync('cmd_viewrtoolbar', event)"
-		/>
-	</broadcasterset>
-
-	<commandset id="allcommands">
-		<commandset id="cmdset_rApp" commandupdater="true"
-			oncommandupdate="ko.commands.updateCommandset(this);"
-			events="r_app_started_closed">
-			<command id="cmd_svStartR" key="key_cmd_svStartR"
-				oncommand="ko.commands.doCommand('cmd_svStartR');"
-				desc="R: &StartR;" label="&StartR;" accesskey="&StartR.key;"/>
-			<command id="cmd_svQuitR" key="key_cmd_svQuitR"
-				oncommand="ko.commands.doCommand('cmd_svQuitR');"
-				desc="R: &QuitR;" label="&QuitR;" accesskey="&QuitR.key;"/>
-			<command id="cmd_svREscape" key="key_cmd_svREscape"
-				oncommand="ko.commands.doCommand('cmd_svREscape');"
-				desc="R: &rEscape;" label="&rEscape;" accesskey="&rEscape.key;"/>
-
-			<command id="cmd_svOpenPkgManager" key="key_cmd_svOpenPkgManager"
-				oncommand="ko.commands.doCommand('cmd_svOpenPkgManager');" disabled="false"
-				desc="R: &pkgMgr;" label="&pkgMgr;" accesskey="&pkgMgr.key;"/>
-			<command id="cmd_svOpenHelp" key="key_cmd_svOpenHelp"
-				oncommand="ko.commands.doCommand('cmd_svOpenHelp');"
-				desc="R: &helpStart;" label="&helpStart;" accesskey="&helpStart.key;"/>
-			<command id="cmd_svBrowseWD" key="key_cmd_svBrowseWD"
-				oncommand="ko.commands.doCommand('cmd_svBrowseWD');"
-				desc="R: &svBrowseWD;" label="&svBrowseWD;" accesskey="&svBrowseWD.key;"/>
-			<command id="cmd_svSessionMgr" key="key_cmd_svSessionMgr"
-				oncommand="ko.commands.doCommand('cmd_svSessionMgr');"
-				desc="R: &svOpenSessMgr;" label="&svOpenSessMgr;" accesskey="&svOpenSessMgr.key;"/>
-
-		</commandset>
-
-<!-- event names changed in Komodo 6: keeping the old one for compatibility
-(current_view_language_changed)
--->
-		<commandset id="cmdset_r_control" commandupdater="true"
-		  events="current_view_language_changed,language_changed,current_view_changed,r_app_started_closed"
-		  oncommandupdate="ko.commands.updateCommandset(this);">
-			<command id="cmd_svRRunAll" key="key_cmd_svRRunAll"
-				oncommand="ko.commands.doCommand('cmd_svRRunAll')"
-				desc="R: &rSendFile;" label="&rSendFile;" accesskey="&rSendFile.key;"/>
-			<command id="cmd_svRSourceAll" key="key_cmd_svRSourceAll"
-				oncommand="ko.commands.doCommand('cmd_svRSourceAll')"
-				desc="R: &rSrcFile;" label="&rSrcFile;" accesskey="&rSrcFile.key;"/>
-			<command id="cmd_svRRunBlock" key="key_cmd_svRRunBlock"
-				oncommand="ko.commands.doCommand('cmd_svRRunBlock')"
-				desc="R: &rSendBlock;" label="&rSendBlock;" accesskey="&rSendBlock.key;"/>
-			<command id="cmd_svRRunFunction" key="key_cmd_svRRunFunction"
-				oncommand="ko.commands.doCommand('cmd_svRRunFunction')"
-				desc="R: &rSendFun;" label="&rSendFun;" accesskey="&rSendFun.key;"/>
-			<command id="cmd_svRRunLine" key="key_cmd_svRRunLine"
-				oncommand="ko.commands.doCommand('cmd_svRRunLine')"
-				desc="R: &rSendLine;" label="&rSendLine;" accesskey="&rSendLine.key;"/>
-			<command id="cmd_svRRunPara" key="key_cmd_svRRunPara"
-				oncommand="ko.commands.doCommand('cmd_svRRunPara')"
-				desc="R: &rSendPara;" label="&rSendPara;" accesskey="&rSendPara.key;"/>
-			<command id="cmd_svRSourceBlock" key="key_cmd_svRSourceBlock"
-				oncommand="ko.commands.doCommand('cmd_svRSourceBlock')"
-				desc="R: &rSrcBlock;" label="&rSrcBlock;" accesskey="&rSrcBlock.key;"/>
-			<command id="cmd_svRSourceFunction" key="key_cmd_svRSourceFunction"
-				oncommand="ko.commands.doCommand('cmd_svRSourceFunction')"
-				desc="R: &rSrcFun;" label="&rSrcFun;" accesskey="&rSrcFun.key;"/>
-			<command id="cmd_svRSourcePara" key="key_cmd_svRSourcePara"
-				oncommand="ko.commands.doCommand('cmd_svRSourcePara')"
-				desc="R: &rSrcPara;" label="&rSrcPara;" accesskey="&rSrcPara.key;"/>
-			<command id="cmd_svRRunLineOrSelection" key="key_cmd_svRRunLineOrSelection"
-				oncommand="ko.commands.doCommand('cmd_svRRunLineOrSelection')"
-				desc="R: &rSendLineOrSelection;" label="&rSendLineOrSelection;"
-				accesskey="&rSendLineOrSelection.key;"/>
-			<command id="cmd_svRSourceLineOrSelection" key="key_cmd_svRSourceLineOrSelection"
-				oncommand="ko.commands.doCommand('cmd_svRSourceLineOrSelection')"
-				desc="R: &rSrcLineOrSelection;" label="&rSrcLineOrSelection;"
-				accesskey="&rSrcLineOrSelection.key;"/>
-
-			<commandset id="cmdset_r_control" commandupdater="false" events="select"
-				oncommandupdate="ko.commands.updateCommandset(this);">
-				<command id="cmd_svRRunSelection" key="key_cmd_svRRunSelection"
-					oncommand="ko.commands.doCommand('cmd_svRRunSelection')"
-					desc="R: &rSendSel;" label="&rSendSel;" accesskey="&rSendSel.key;"/>
-				<command id="cmd_svRSourceSelection" key="key_cmd_svRSourceSelection"
-					oncommand="ko.commands.doCommand('cmd_svRSourceSelection')"
-					desc="R: &rSrcSel;" label="&rSrcSel;" accesskey="&rSrcSel.key;"/>
-			</commandset>
-		</commandset>
-	</commandset>
-
-	<!--<menupopup id="editorContextMenu">-->
-	<!--	<menuseparator id="editor-context-sep-sv"-->
-	<!--	insertafter="context-sep-paste"-->
-	<!--	/>-->
-	<!--	<menuitem id="editor-context-sv-r-send-line-sel"-->
-	<!--			  class="menuitem-iconic r-send-selection-icon"-->
-	<!--			  observes="cmd_svRRunLineOrSelection"-->
-	<!--			  oncommand="ko.commands.doCommand('cmd_svRRunLineOrSelection')"-->
-	<!--			  insertafter="context-sep-paste"-->
-	<!--			  />-->
-	<!--insertafter="context-sep-paste"-->
-	<!--</menupopup>-->
-
-	<menubar id="menubar_main">
-		<menu id="sciviews_menu" label="R" accesskey="R"
-			insertbefore="menu_window,help_menu">
-			<menupopup id="popup_sciviews_main">
-				<menuitem id="r_start_console_menu" observes="cmd_svStartR"
-					class="menuitem-iconic r-run-command-icon"/>
-				<menuitem id="r_quit_console_menu" observes="cmd_svQuitR"
-					class="menuitem-iconic r-quit-command-icon"/>
-				<menuitem id="r_start_help" observes="cmd_svOpenHelp"
-						  class="menuitem-iconic help-icon"/>
-				<menuitem id="r_browse_wd" observes="cmd_svBrowseWD"
-					class="menuitem-iconic r-working-dir-icon"/>
-				<menuitem id="r_session_mgr" observes="cmd_svSessionMgr"
-					class="menuitem-iconic r-session-dir-icon"/>
-				<menuseparator/>
-				<menuitem id="r_start_pkg_manager" observes="cmd_svOpenPkgManager"
-					class="menuitem-iconic r-pkg-manager"/>
-				<menu class="menuitem-iconic robjects-pkg-icon"
-					label="R packages">
-					<menupopup>
-						<menuitem id="r_pkg_load" label="Load packages..."
-							accesskey="l" class="menuitem-iconic r-pkg-load-icon"
-							oncommand="sv.r.pkg.load();"/>
-						<menuitem id="r_pkg_load" label="Attach workspace..."
-							accesskey="a" class="menuitem-iconic r-data-attach"
-							oncommand="sv.r.loadWorkspace(null, true);"/>
-						<menuitem id="r_pkg_install" label="Install..."
-							accesskey="i" class="menuitem-iconic r-pkg-install-icon"
-							oncommand="sv.r.pkg.install();"/>
-						<menuitem id="r_pkg_installLocal" label="Install from local files..."
-							accesskey="c" class="menuitem-iconic r-pkg-install-local-icon"
-							oncommand="sv.r.pkg.install(null, 'local');"/>
-						<menuitem id="r_pkg_update" label="Update"
-							accesskey="u" class="menuitem-iconic r-pkg-update-icon"
-							oncommand="sv.r.pkg.update();"/>
-						<menuitem id="r_pkg_remove" label="Remove..."
-							accesskey="r" class="menuitem-iconic r-pkg-remove-icon"
-							oncommand="sv.r.pkg.remove();"/>
-					</menupopup>
-				</menu>
-
-				<menuseparator/>
-				<menuitem id="r_send_line_sel_menu" observes="cmd_svRRunLineOrSelection"
-					class="menuitem-iconic r-run-selection-icon"/>
-				<menuitem id="r_send_all_menu" observes="cmd_svRRunAll"
-					class="menuitem-iconic r-run-all-icon"/>
-				<menuitem id="r_src_all_menu" observes="cmd_svRSourceAll"
-					class="menuitem-iconic r-source-all-icon"/>
-				<menuitem id="r_send_block_menu" observes="cmd_svRRunBlock"
-					class="menuitem-iconic r-run-block-icon"/>
-				<menuitem id="r_src_block_menu" observes="cmd_svRSourceBlock"
-					class="menuitem-iconic r-source-block-icon"/>
-				<menuitem id="r_send_para_menu" observes="cmd_svRRunPara"
-					class="menuitem-iconic r-run-para-icon"/>
-				<menuitem id="r_src_para_menu" observes="cmd_svRSourcePara"
-					class="menuitem-iconic r-source-para-icon"/>
-				<menuitem id="r_send_function_menu" observes="cmd_svRRunFunction"
-					class="menuitem-iconic r-run-function-icon"/>
-				<menuitem id="r_src_function_menu" observes="cmd_svRSourceFunction"
-					class="menuitem-iconic r-source-function-icon"/>
-				<menuseparator/>
-				<menuitem id="r_install_toolboxes" class="menuitem-iconic-wide"
-                    oncommand="sv.checkToolbox()" label="(Re)install R toolboxes" />
-			</menupopup>
-		</menu>
-	</menubar>
-
-	<toolboxrow id="main-toolboxrow">
-		<toolbar class="chromeclass-toolbar"
-			id="RToolbar"
-			toolboxid="toolbox_main"
-			broadcaster="cmd_viewrtoolbar"
-			grippyhidden="true"
-			align="center"
-			kohidden="true"
-			mode="icons"
-			persist="kohidden collapsed buttonstyle mode"
-			buttonstyle="pictures">
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rEscape;"
-						   persist="buttonstyle"
-						   class="stop-icon"
-						   observes="cmd_svREscape"
-						   label="&rEscape;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSendLineOrSelection;"
-						   persist="buttonstyle"
-						   class="r-run-selection-icon"
-						   observes="cmd_svRRunLineOrSelection"
-						   label="&rSendLineOrSelection;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSendFile;"
-						   persist="buttonstyle"
-						   class="r-run-all-icon"
-						   observes="cmd_svRRunAll"
-						   label="&rSendFile;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSrcFile;"
-						   persist="buttonstyle"
-						   class="r-source-all-icon"
-						   observes="cmd_svRSourceAll"
-						   label="&rSrcFile;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSendBlock;"
-						   persist="buttonstyle"
-						   class="r-run-block-icon"
-						   observes="cmd_svRRunBlock"
-						   label="&rSendBlock;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSrcBlock;"
-						   persist="buttonstyle"
-						   class="r-source-block-icon"
-						   observes="cmd_svRSourceBlock"
-						   label="&rSrcBlock;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSendPara;"
-						   persist="buttonstyle"
-						   class="r-run-para-icon"
-						   observes="cmd_svRRunPara"
-						   label="&rSendPara;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSrcPara;"
-						   persist="buttonstyle"
-						   class="r-source-para-icon"
-						   observes="cmd_svRSourcePara"
-						   label="&rSrcPara;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSendFun;"
-						   persist="buttonstyle"
-						   class="r-run-function-icon"
-						   observes="cmd_svRRunFunction"
-						   label="&rSendFun;" />
-			<toolbarbutton buttonstyle="pictures"
-						   tooltiptext="&rSrcFun;"
-						   persist="buttonstyle"
-						   class="r-source-function-icon"
-						   observes="cmd_svRSourceFunction"
-						   label="rSrcFun;" />
-		</toolbar>
-	</toolboxrow>
-
-	<menupopup id="context-toolbox-menu">
-		<menuitem id="context_viewrtoolbar"
-			label="&RToolbar.label;"
-			type="checkbox"
-			observes="cmd_viewrtoolbar"
-			key="key_viewRToolbar"/>
-	</menupopup>
-
-	<menupopup id="popup_toolbars">
-			<menuitem id="menu_viewrtoolbar"
-			label="&RToolbar.label;"
-			observes="cmd_viewrtoolbar"
-			persist="checked"
-			checked="true"
-			type="checkbox"
-			/>
-	</menupopup>
-
-<menupopup id="places-files-popup">
-	<menuseparator id="placesContextMenu_separatorR"
-		testEval_HideIf="!sv.command.places.anyRFilesSelected && !sv.command.places.anyRDataFilesSelected"
-	/>
-<menuitem oncommand="sv.command.places.sourceSelection()"
-		  disableIf="folder"
-		  class="menuitem-iconic"
-		  id="placesContextMenu_Rsource"
-		  label="Source into R"
-		  testEval_HideIf="!sv.command.places.anyRFilesSelected"
-/>
-
-<menuitem oncommand="sv.command.places.loadSelection()"
-		  disableIf="folder"
-		  class="menuitem-iconic"
-		  id="placesContextMenu_Rload"
-		  label="Load into R"
-		  testEval_HideIf="!sv.command.places.anyRDataFilesSelected"
-/>
-
-</menupopup>
-
-
-
-	<tabbox id="rightTabBox">
-		<tabs id="right_toolbox_tabs">
-			<tab id="rhelp_tab"
-				 label="R Help tabbed"
-				 accesskey="r"
-				 insertafter="toolbox_tab"
-				 oncommand="ko.toolboxes.user.viewMgr.tree.focus();"
-				 onfocus="ko.toolboxes.user.viewMgr.focus();"
-				 hidden="true"
-				 persist="hidden"
-				 />
-		</tabs>
-		<tabpanels id="right_toolbox_tabpanels">
-			<tabpanel id="rhelpviewbox"
-					  flex="1"
-					  insertafter="toolboxviewbox"
-					  hidden="true"
-					  persist="hidden"
-					  >
-				<vbox id="rhelpviewbox-vbox" flex="1">
-				<iframe id="rhelpview-frame"
-						src="about:blank"
-						flex="1"
-						/>
-				</vbox>
-			</tabpanel>
-		</tabpanels>
-	</tabbox>
-</overlay>

Added: komodo/SciViews-K-dev/content/overlayMain.xul
===================================================================
--- komodo/SciViews-K-dev/content/overlayMain.xul	                        (rev 0)
+++ komodo/SciViews-K-dev/content/overlayMain.xul	2012-02-07 00:13:42 UTC (rev 426)
@@ -0,0 +1,349 @@
+<?xml version="1.0"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Version: MPL 1.1/GPL 2.0/LGPL 2.1
+
+ 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/
+
+ 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.
+
+ The Original Code is SciViews-K by Philippe Grosjean et al.
+
+ Contributor(s):
+   Philippe Grosjean
+   Romain Francois
+   Kamil Barton
+   ActiveState Software Inc (code inspired from)
+
+ 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 ***** -->
+
+<!DOCTYPE overlay PUBLIC "-//MOZILLA//DTD XUL V1.0//EN"
+	"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" [
+	<!ENTITY % komodoDTD SYSTEM "chrome://komodo/locale/komodo.dtd">
+	%komodoDTD;
+	<!ENTITY % sciviewskDTD SYSTEM "chrome://sciviewsk/locale/sciviewsk.dtd">
+	%sciviewskDTD;
+]>
+
+<?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"?>
+
+<overlay id="sciviewskOverlay"
+	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/tools/array.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/file.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/sciviews.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/rjson.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/prefs.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/rconnection.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/r.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/r-help.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/commands.js"/>
+
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/misc.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/ask.js"/>
+	<script type="application/x-javascript" src="chrome://sciviewsk/content/js/interpolate.js"/>
+
+
+
+	<broadcasterset id="broadcasterset_global">
+		<broadcaster id="sv_r_is_running" disabled="false"/>
+		<broadcaster
+			id="cmd_viewrtoolbar" key="key_cmd_viewrtoolbar"
+			desc="&userInterfaceShowHideRToolbar.desc;"
+			autoCheck="false"
+			checked="true"
+			persist="checked"
+			oncommand="ko.commands.doCommandAsync('cmd_viewrtoolbar', event)"
+		/>
+	</broadcasterset>
+
+	<commandset id="allcommands">
+		<commandset id="cmdset_rApp" commandupdater="true"
+			oncommandupdate="ko.commands.updateCommandset(this);"
+			events="r_app_started_closed">
+			<command id="cmd_svStartR" key="key_cmd_svStartR"
+				oncommand="ko.commands.doCommand('cmd_svStartR');"
+				desc="R: &StartR;" label="&StartR;" accesskey="&StartR.key;"/>
+			<command id="cmd_svQuitR" key="key_cmd_svQuitR"
+				oncommand="ko.commands.doCommand('cmd_svQuitR');"
+				desc="R: &QuitR;" label="&QuitR;" accesskey="&QuitR.key;"/>
+			<command id="cmd_svREscape" key="key_cmd_svREscape"
+				oncommand="ko.commands.doCommand('cmd_svREscape');"
+				desc="R: &rEscape;" label="&rEscape;" accesskey="&rEscape.key;"/>
+
+			<command id="cmd_svOpenPkgManager" key="key_cmd_svOpenPkgManager"
+				oncommand="ko.commands.doCommand('cmd_svOpenPkgManager');" disabled="false"
+				desc="R: &pkgMgr;" label="&pkgMgr;" accesskey="&pkgMgr.key;"/>
+			<command id="cmd_svOpenHelp" key="key_cmd_svOpenHelp"
+				oncommand="ko.commands.doCommand('cmd_svOpenHelp');"
+				desc="R: &helpStart;" label="&helpStart;" accesskey="&helpStart.key;"/>
+			<command id="cmd_svBrowseWD" key="key_cmd_svBrowseWD"
+				oncommand="ko.commands.doCommand('cmd_svBrowseWD');"
+				desc="R: &svBrowseWD;" label="&svBrowseWD;" accesskey="&svBrowseWD.key;"/>
+			<command id="cmd_svSessionMgr" key="key_cmd_svSessionMgr"
+				oncommand="ko.commands.doCommand('cmd_svSessionMgr');"
+				desc="R: &svOpenSessMgr;" label="&svOpenSessMgr;" accesskey="&svOpenSessMgr.key;"/>
+
+		</commandset>
+
+<!-- event names changed in Komodo 6: keeping the old one for compatibility
+(current_view_language_changed)
+-->
+		<commandset id="cmdset_r_control" commandupdater="true"
+		  events="current_view_language_changed,language_changed,current_view_changed,r_app_started_closed"
+		  oncommandupdate="ko.commands.updateCommandset(this);">
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/sciviews -r 426


More information about the Sciviews-commits mailing list