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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 11 23:36:17 CET 2012


Author: prezez
Date: 2012-02-11 23:36:17 +0100 (Sat, 11 Feb 2012)
New Revision: 433

Added:
   komodo/SciViews-K-dev/content/overlayMain-ko6.xul
   komodo/SciViews-K-dev/content/rbrowserOverlay-ko6.xul
Removed:
   komodo/SciViews-K-dev/content/RObjectsOverlay.xul
Modified:
   komodo/SciViews-K-dev/chrome.manifest
   komodo/SciViews-K-dev/components/koRLinter.py
   komodo/SciViews-K-dev/content/js/commands.js
   komodo/SciViews-K-dev/content/js/interpolate.js
   komodo/SciViews-K-dev/content/js/rconnection.js
   komodo/SciViews-K-dev/content/js/sciviews.js
   komodo/SciViews-K-dev/install.rdf
   komodo/SciViews-K-dev/sciviewsk-1.1.0dev-ko.xpi
Log:
compatibility with both komodo 6 and 7.

Modified: komodo/SciViews-K-dev/chrome.manifest
===================================================================
--- komodo/SciViews-K-dev/chrome.manifest	2012-02-11 14:34:33 UTC (rev 432)
+++ komodo/SciViews-K-dev/chrome.manifest	2012-02-11 22:36:17 UTC (rev 433)
@@ -1,13 +1,16 @@
 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/overlayMain.xul appversion>6.99
+overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/overlayMain-ko6.xul appversion<=6.99
+
 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
+overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/rbrowserOverlay-ko6.xul appversion<=6.99
+overlay chrome://places/content/places_panel.xul chrome://sciviewsk/content/places.xul appversion>6.99
 
-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/
 
+manifest components/component.manifest
\ No newline at end of file

Modified: komodo/SciViews-K-dev/components/koRLinter.py
===================================================================
--- komodo/SciViews-K-dev/components/koRLinter.py	2012-02-11 14:34:33 UTC (rev 432)
+++ komodo/SciViews-K-dev/components/koRLinter.py	2012-02-11 22:36:17 UTC (rev 433)
@@ -50,24 +50,6 @@
 log = logging.getLogger('RLinter')
 log.setLevel(logging.DEBUG)
 
-#ss = s * 5000
-#t0 = time.clock()
-#for n in range(100):
-#    ss.replace("\x03", "").replace("\x02", "")
-#t1 = time.clock() - t0
-#print(t1)
-##0.19073865575
-#ss = s * 5000
-#pat = re.compile('[\x02\x03]')
-#t0 = time.clock()
-#for n in range(100):
-#    pat.sub("", ss)
-#t1 = time.clock() - t0
-#print(t1)
-##0.836379887645
-
-
-
 class KoRLinter:
     _com_interfaces_ = [components.interfaces.koILinter]
     _reg_desc_ = "Komodo R Linter"
@@ -84,10 +66,11 @@
             getService(components.interfaces.svIUtils)
         pass
 
+        # 'lint' first evaluates in R 'quickParse(filename)' which returns R-style
+        # formatted error or empty string. Then it retrieves from the error message
+        # the position within text and description
     def lint(self, request):
-        # TODO: R does not like utf-8 produced by Komodo => use a different encoding?
         text = request.content.encode("utf-8")
-
         tabWidth = request.koDoc.tabWidth
         log.debug("linting %s" % text[1:15])
 

Deleted: komodo/SciViews-K-dev/content/RObjectsOverlay.xul
===================================================================
--- komodo/SciViews-K-dev/content/RObjectsOverlay.xul	2012-02-11 14:34:33 UTC (rev 432)
+++ komodo/SciViews-K-dev/content/RObjectsOverlay.xul	2012-02-11 22:36:17 UTC (rev 433)
@@ -1,334 +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 % 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.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="sciviewsRObjectsOverlay" 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://global/content/nsDragAndDrop.js"/>
-<script type="application/x-javascript" src="chrome://sciviewsk/content/js/robjects.js"/>
-
-
-	<popupset id="extensionPopupSet">
-		<menupopup id="rObjectsContext" onpopupshowing="sv.rbrowser.contextOnShow(event);">
-			<menuitem id="menu_robjects_insertfullname"
-				class="primary_menu_item"
-				oncommand="sv.rbrowser.insertName(true)"
-				accesskey="F"
-				label="&sciviews.robjects.insFullName;"
-				acceltext="Ins" />
-			<menuitem id="menu_cmd_robjects_insertquoted"
-				label="&sciviews.robjects.insertQuoted;"
-				oncommand="sv.rbrowser.insertName(false, true);"
-				accesskey="&sciviews.robjects.insertQuoted.acc;"
-				acceltext="Shift+Ins" />
-			<menuitem id="menu_robjects_insertname"
-				label="&sciviews.robjects.insName;"
-				oncommand="sv.rbrowser.insertName(false)"
-				accesskey="I"
-				acceltext="Ctrl+Ins" />
-
-			<menuseparator keep="false" intoplevel="true"/>
-			<menuitem id="cmd_robjects_removeobj"
-				label="&sciviews.robjects.rmObj;"
-				oncommand="sv.rbrowser.removeSelected(event.shiftKey)"
-				accesskey="R"
-				acceltext="Del"
-				testDisableIf="t:noDelete"
-				key="key_cmd_delete" />
-			<menuitem id="menu_cmd_robjects_deletenow"
-				label="&sciviews.robjects.deleteNow;"
-				oncommand="sv.rbrowser.removeSelected(true);"
-				class="menuitem-iconic list-item-remove-icon"
-				acceltext="Shift+Del"
-				testDisableIf="t:noDelete"
-				accesskey="&sciviews.robjects.deleteNow.acc;" />
-
-			<menuseparator keep="false" intoplevel="true"/>
-			<menuitem id="cmd_robjects_summary"
-				label="&sciviews.robjects.summary;"
-				oncommand="sv.rbrowser.do('summary')"
-				testDisableIf="t:isFunction t:isEnvironment"
-				accesskey="S" />
-			<menuitem id="cmd_robjects_print"
-				label="&sciviews.robjects.print;"
-				oncommand="sv.rbrowser.do('print')"
-				testDisableIf="t:isPackage"
-				accesskey="P" />
-			<menuitem id="cmd_robjects_plot"
-				label="&sciviews.robjects.plot;"
-				oncommand="sv.rbrowser.do('plot')"
-				testDisableIf="t:isFunction t:isEnvironment"
-				accesskey="O"/>
-			<menuitem id="cmd_robjects_str"
-				label="&sciviews.robjects.str;"
-				oncommand="sv.rbrowser.do('str')"
-				testDisableIf="t:isPackage"
-				accesskey="T"/>
-
-			<menuseparator keep="false" intoplevel="true"/>
-			<menuitem id="menu_cmd_robjects_selectall"
-				label="&sciviews.robjects.selectAll;"
-				oncommand="sv.rbrowser.selection.selectAll();"
-				accesskey="&sciviews.robjects.selectAll.acc;"
-				acceltext="Ctrl+A" />
-			<menuitem id="menu_cmd_robjects_selectsiblings"
-				label="&sciviews.robjects.selectSiblings;"
-				oncommand="sv.rbrowser.selectAllSiblings(sv.rbrowser.selection.currentIndex);"
-				accesskey="&sciviews.robjects.selectSiblings.acc;"
-				acceltext="Ctrl+Shift+A" />
-
-			<menuseparator keep="false" intoplevel="true"/>
-			<menuitem id="menu_cmd_robjects_write_table"
-				class="menuitem-iconic save-buffer-icon"
-				label="&sciviews.robjects.write_table;"
-				oncommand="sv.rbrowser.do('write.table')"
-				testDisableIf="t:cannotSaveToFile"
-				accesskey="T"/>
-
-			<menuitem id="menu_cmd_robjects_save"
-				class="menuitem-iconic save-buffer-icon"
-				label="&sciviews.robjects.save;"
-				oncommand="sv.rbrowser.do('save')"
-				testDisableIf="t:cannotSave"
-				accesskey="S" />
-
-			<menuseparator keep="false" intoplevel="true"/>
-			<menuitem id="menu_cmd_robjects_help"
-				label="&sciviews.robjects.help;"
-				oncommand="sv.rbrowser.do('help')"
-				class="menuitem-iconic help-icon"
-				testDisableIf="t:multipleSelection t:noHelp"
-				accesskey="H" />
-
-			</menupopup>
-		</popupset>
-
-	<broadcasterset id="broadcasterset_global">
-		<broadcaster id="cmd_robjects_viewSearchPath"
-			tooltiptext="&sciviews.robjects.tab;: &sciviews.robjects.showHide;"
-			splitter="bottom_splitter"
-			box="robjects_searchpath_panel"
-			oncommand="sv.rbrowser.toggleViewSearchPath(event);"
-			checked="true" state="open"/>
-	</broadcasterset>
-
-
-	<menupopup id="tabPicker_popup">
-		<menuitem id="show_robjects_tab"
-		insertafter="show_runoutput_tab,show_codebrowser_tab"
-		oncommand="uilayout_ensureTabShown('sciviews_robjects_tab', true)"
-		label="&sciviews.robjects.tab;"/>
-	</menupopup>
-
-	<menupopup id="menu_view_tabs_popup">
-		<menuitem id="show_robjects_tab2"
-		insertafter="show_codebrowser_tab2" class="menuitem-iconic-wide"
-		oncommand="uilayout_ensureTabShown('sciviews_robjects_tab', true)"
-		label="&sciviews.robjects.tab;"/>
-	</menupopup>
-
-	<tabbox id="leftTabBox">
-		<tabs id="project_toolbox_tabs">
-			<tab id="sciviews_robjects_tab" label="&sciviews.robjects.tab;"
-			insertafter="project_tab,codebrowser_tab"
-			tooltiptext="&sciviews.robjects.tip;"
-			onclick="sv.rbrowser.getPackageList(false);"/>
-		</tabs>
-		<tabpanels id="project_toolbox_tabpanels">
-			<tabpanel flex="1" id="sciviews_robjects_tabpanel"
-			insertafter="projectviewbox,codebrowserviewbox">
-
-
-<!--				<hbox flex="1" align="center"><vbox align="center" flex="1">
-					<button label="Start "
-						class="r-run-command-icon"
-						observes="cmd_svStartR"
-						dir="reverse"
-						orient="horizontal" />
-				</vbox></hbox>-->
-
-
-				<vbox flex="1" id="sciviews_robjects_vbox">
-					<hbox align="center" id="sciviews_robjects_hbox">
-						<toolbarbutton id="sciviews_robjects_refresh_button"
-						tooltiptext="&sciviews.robjects.refresh.tip;"
-						buttonstyle="pictures"
-						label="&sciviews.robjects.refresh;" class="refresh-icon"
-						oncommand="sv.rbrowser.refreshAll();"/>
-						<toolbarbutton id="sciviews_robjects_searchpath_button"
-						observes="cmd_robjects_viewSearchPath"
-						buttonstyle="pictures" class="searchPath-icon"
-						checked="true" persist="state checked"/>
-						<toolbarbutton id="r_objects_pkg_menu"
-						buttonstyle="pictures" class="robjects-pkg-icon"
-						type="menu" orient="horizontal">
-							<menupopup>
-								<menuitem id="r_objects_pkg_load" label="Load packages..."
-								accesskey="l" class="menuitem-iconic r-pkg-load-icon"
-								oncommand="sv.r.pkg.load();"/>
-								<menuitem id="r_objects_pkg_load" label="Attach workspace..."
-								accesskey="a" class="menuitem-iconic r-data-attach"
-								oncommand="sv.r.loadWorkspace(null, true);"/>
-								<menuitem id="r_objects_pkg_install" label="Install..."
-								accesskey="i" class="menuitem-iconic r-pkg-install-icon"
-								oncommand="sv.r.pkg.install();"/>
-								<menuitem id="r_objects_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_objects_pkg_update" label="Update"
-								accesskey="u" class="menuitem-iconic r-pkg-update-icon"
-								oncommand="sv.r.pkg.update();"/>
-								<menuitem id="r_objects_pkg_remove" label="Remove..."
-								accesskey="r" class="menuitem-iconic r-pkg-remove-icon"
-								oncommand="sv.r.pkg.remove();"/>
-							</menupopup>
-						</toolbarbutton>
-						<toolbarseparator style="min-width:10px;" flex="1"/>
-						<toolbarbutton id="sciviews_robjects_filter"
-						tooltiptext="&sciviews.robjects.filter.tip;"
-						buttonstyle="pictures" type="menu" orient="horizontal"
-						class="rightarrow-button-a r-objects-filter">
-							<menupopup id="sciviews_robjects_filterPopup">
-								<menuitem id="sciviews_robjects_context_filterByName"
-								label="&sciviews.robjects.filterByName;"
-								checked="true" accesskey="n" type="checkbox"
-								oncommand="sv.rbrowser.setFilterBy(this, 'name')"/>
-								<menuitem id="sciviews_robjects_context_filterByClass"
-								label="&sciviews.robjects.filterByClass;"
-								accesskey="c" type="checkbox"
-								oncommand="sv.rbrowser.setFilterBy(this, 'class')"/>
-								<menuitem id="sciviews_robjects_context_filterByGroup"
-								label="&sciviews.robjects.filterByGroup;"
-								accesskey="g" type="checkbox"
-								oncommand="sv.rbrowser.setFilterBy(this, 'group')"/>
-								<menuseparator/>
-								<menuitem id="sciviews_robjects_context_clrFilter"
-								label="&sciviews.robjects.clrFilter;" accesskey="l"
-								oncommand="document.getElementById('sciviews_robjects_filterbox').value = ''; sv.rbrowser.applyFilter();"/>
-							</menupopup>
-						</toolbarbutton>
-						<textbox id="sciviews_robjects_filterbox" flex="1"
-						type="search" timeout="500"
-						tooltiptext="&sciviews.robjects.filter.tip;"
-						style="min-width: 40px; max-width: 200px; margin-right: 0px;"
-							class="search-box"
-							oncommand="sv.rbrowser.applyFilter();"
-							emptytext="&sciviews.robjects.filterEmptyText;"
-						/>
-					</hbox>
-					<vbox id="robjects_searchpath_panel"
-					persist="height collapsed" state="collapsed" flex="1">
-						<listbox flex="1" id="sciviews_robjects_searchpath_listbox"
-						ondragdrop="nsDragAndDrop.drop(event, sv.rbrowser.packageListObserver);"
-						ondragover="nsDragAndDrop.dragOver(event, sv.rbrowser.packageListObserver);"
-						ondraggesture="nsDragAndDrop.startDrag(event, sv.rbrowser.packageListObserver);"
-						onkeypress="sv.rbrowser.packageListKeyEvent(event);"
-						oncommand="sv.rbrowser.packageSelectedEvent(event);"/>
-					</vbox>
-					<splitter id="sciviews_robjects_splitter" collapse="before"
-					resizeafter="closest" resizebefore="closest" persist="state"
-					observes="cmd_robjects_viewSearchPath">
-						<grippy/>
-					</splitter>
-					<vbox flex="5">
-						<tree flex="1" id="sciviews_robjects_objects_tree"
-						persist="sortDirection sortResource"
-						sortDirection="ascending" sortResource="r-name"
-						enableColumnDrag="true"
-						onselect="sv.rbrowser.onEvent(event);"
-						onkeypress="sv.rbrowser.onEvent(event);">
-							<treecols>
-								<treecol id="r-name" label="&sciviews.robjects.Name;"
-								primary="true" sortActive="true"
-								persist="width ordinal hidden"
-								onclick="sv.rbrowser.sort(this);" ordinal="1" flex="4"/>
-								<splitter class="tree-splitter" ordinal="2"/>
-								<treecol id="r-dims" label="&sciviews.robjects.Dims;"
-								persist="width ordinal hidden"
-								onclick="sv.rbrowser.sort(this);" flex="1" ordinal="3"/>
-								<splitter class="tree-splitter" ordinal="4"/>
-								<treecol id="r-group" label="&sciviews.robjects.Group;"
-								flex="2" hidden="true" persist="width ordinal hidden"
-								onclick="sv.rbrowser.sort(this);" ordinal="5"/>
-								<splitter class="tree-splitter" ordinal="6"/>
-								<treecol id="r-class" label="&sciviews.robjects.Class;"
-								flex="2" hidden="true" persist="width ordinal hidden"
-								onclick="sv.rbrowser.sort(this);" ordinal="7"/>
-								<splitter class="tree-splitter" ordinal="8"/>
-								<treecol id="r-fullName" label="&sciviews.robjects.FullName;"
-								persist="width ordinal hidden" flex="1" hidden="true" ordinal="9"/>
-							</treecols>
-							<treechildren id="sciviews_robjects_objects_tree_main"
-							ondraggesture="nsDragAndDrop.startDrag(event, sv.rbrowser.listObserver);"
-							ondragdrop="nsDragAndDrop.drop(event, sv.rbrowser.listObserver);"
-							ondragover="nsDragAndDrop.dragOver(event, sv.rbrowser.listObserver);"
-							onclick="sv.rbrowser.onEvent(event);"
-							ondblclick="sv.rbrowser.onEvent(event);"
-							context="rObjectsContext">
-							</treechildren>
-						</tree>
-					</vbox>
-					<vbox>
-						<hbox align="center">
-							<toolbarbutton id="sciviews_robjects_foldAll_button"
-							label="Fold All" buttonstyle="pictures"
-							class="robjects-fold-all-icon"
-							oncommand="sv.rbrowser.foldAll(true);"
-							tooltiptext="&sciviews.robjects.foldAll;"/>
-							<toolbarbutton id="sciviews_robjects_ExpandAll_button"
-							label="Expand All" buttonstyle="pictures"
-							class="robjects-expand-all-icon"
-							oncommand="sv.rbrowser.foldAll(false);"
-							tooltiptext="&sciviews.robjects.unfoldAll;"/>
-						</hbox>
-					</vbox>
-				</vbox>
-			</tabpanel>
-		</tabpanels>
-	</tabbox>
-</overlay>

Modified: komodo/SciViews-K-dev/content/js/commands.js
===================================================================
--- komodo/SciViews-K-dev/content/js/commands.js	2012-02-11 14:34:33 UTC (rev 432)
+++ komodo/SciViews-K-dev/content/js/commands.js	2012-02-11 22:36:17 UTC (rev 433)
@@ -126,7 +126,7 @@
 
 	_RterminationCallback = function(exitCode) {
 		// do something here...
-		sv.cmdout.message("SciViews-R is closed with code" + exitCode, 2000, true);
+		sv.addNotification("SciViews-R is closed with code" + exitCode, 2000, true);
 		_this.updateRStatus(false);
 		//alert("R is closed with code " + exitCode);
 	}
@@ -528,7 +528,7 @@
 
 	get anyRFilesSelected()
 		ko.places.manager.getSelectedItems().some(function(x)
-			x.file.isLocal && 
+			x.file.isLocal &&
 			x.file.ext.toLowerCase() == ".r"),
 
 	loadSelection: function sv_loadPlacesSelection() {

Modified: komodo/SciViews-K-dev/content/js/interpolate.js
===================================================================
--- komodo/SciViews-K-dev/content/js/interpolate.js	2012-02-11 14:34:33 UTC (rev 432)
+++ komodo/SciViews-K-dev/content/js/interpolate.js	2012-02-11 22:36:17 UTC (rev 433)
@@ -84,12 +84,12 @@
 		family = <menuitem label="Tools"
 			src="chrome://sciviewsk/skin/icons/Tools.html"/>;
 		sv.tools.e4x2dom.appendTo(family, families.firstChild);
-		
+
 		// Keep Open Office family, but place it at the end of the list
 		family = <menuitem label="[Open Office Icons]"
 			src="chrome://openoffice/content/industrial.html"/>;
 		sv.tools.e4x2dom.appendTo(family, families.firstChild);
-		
+
 		// Add a pointer to the icon makers web sites (required by fugue and
 		// diagona icons)
 		var label = win.document.getElementById("iconlabel");
@@ -115,7 +115,7 @@
 		}
 	}
 }
- 
+
 var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
     .getService(Components.interfaces.nsIWindowWatcher);
 ww.registerNotification(new svWindowObserver());
@@ -158,9 +158,9 @@
 {
     try {
     if (typeof(queryTitle) == 'undefined') queryTitle = null;
-	log.info("interpolate.interpolate(editor, strings=[" + strings +
-        "], bracketedStrings=[" + bracketedStrings + "], queryTitle='" +
-        queryTitle + "', viewData)");
+	//log.info("interpolate.interpolate(editor, strings=[" + strings +
+        //"], bracketedStrings=[" + bracketedStrings + "], queryTitle='" +
+        //queryTitle + "', viewData)");
 	viewData = ko.interpolate.getViewData(editor, viewData);
 
     var lastErrorSvc = Components.classes["@activestate.com/koLastErrorService;1"]
@@ -176,7 +176,7 @@
 		brStr = brStr.replace(/%tr:/g, "");
 		bracketedStrings[0] = brStr;
 	} catch(e) { }
-	
+
 	// Interpolation step 1: get queries.
     var queriesCountObj = new Object();
     var queriesObj = new Array();
@@ -206,7 +206,7 @@
         obj.title = queryTitle;
 		// PhG: this is added to allow access to sv... functions
 		obj.sv = sv;
-        
+
 		// PhG: replaced this by my own dialog box with extra features
 		//window.openDialog("chrome://komodo/content/run/interpolationquery.xul",
         window.openDialog("chrome://sciviewsk/content/Rinterpolationquery.xul",
@@ -246,7 +246,7 @@
 		}
 	}
 
-    log.info("interpolate.interpolate: istrings=[" + istrings + "]");
+    //log.info("interpolate.interpolate: istrings=[" + istrings + "]");
     return(istrings);
     } catch(e) {
         log.exception(e);

Modified: komodo/SciViews-K-dev/content/js/rconnection.js
===================================================================
--- komodo/SciViews-K-dev/content/js/rconnection.js	2012-02-11 14:34:33 UTC (rev 432)
+++ komodo/SciViews-K-dev/content/js/rconnection.js	2012-02-11 22:36:17 UTC (rev 433)
@@ -145,7 +145,7 @@
 //}
 
 this.testRAvailability = function(checkProc) {
-	var result = _this.evalAtOnce("cat(123)");
+	var result = _this.evalAtOnce("cat(123L)");
 	var connectionUp = result.indexOf("123") != -1;
 	var ret = connectionUp? "Connection with R successful." :
 		"Cannot connect to R.";

Modified: komodo/SciViews-K-dev/content/js/sciviews.js
===================================================================
--- komodo/SciViews-K-dev/content/js/sciviews.js	2012-02-11 14:34:33 UTC (rev 432)
+++ komodo/SciViews-K-dev/content/js/sciviews.js	2012-02-11 22:36:17 UTC (rev 433)
@@ -983,18 +983,25 @@
 //    //n instanceof Ci.koINotificationProgress;
 //            //n.maxProgress = Ci.koINotificationProgress.PROGRESS_NOT_APPLICABLE;
 
-sv.addNotification = function(msg, severity, timeout) {
-	var sm = Components.classes["@activestate.com/koStatusMessage;1"]
-		.createInstance(Components.interfaces.koIStatusMessage);
-	sm.category = "SV";
-	sm.msg = msg;
-	sm.log = true;
-	sm.severity = severity;
-	sm.timeout = timeout;
-	ko.notifications.addNotification(sm);
+if(ko.notifications) {
+	sv.addNotification = function(msg, severity, timeout) {
+		var sm = Components.classes["@activestate.com/koStatusMessage;1"]
+			.createInstance(Components.interfaces.koIStatusMessage);
+		sm.category = "SV";
+		sm.msg = msg;
+		sm.log = true;
+		sm.severity = severity;
+		sm.timeout = timeout;
+		ko.notifications.addNotification(sm);
+	}
+} else {
+	sv.addNotification = function(msg, severity, timeout) {
+		ko.statusBar.AddMessage(msg, 'sciviewsk', timeout, false, false, true);
+	}
 }
 
 
+
 sv.log.all(true);
 // Installs toolboxes
 sv.checkToolbox = function () {

Added: komodo/SciViews-K-dev/content/overlayMain-ko6.xul
===================================================================
--- komodo/SciViews-K-dev/content/overlayMain-ko6.xul	                        (rev 0)
+++ komodo/SciViews-K-dev/content/overlayMain-ko6.xul	2012-02-11 22:36:17 UTC (rev 433)
@@ -0,0 +1,419 @@
+<?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;
+	<!ENTITY % console SYSTEM "chrome://global/locale/console.dtd"> %console;
+]>
+
+<?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)"
+		/>
+		<broadcaster id="cmd_svRStarted"
+			oncommand="ko.commands.doCommand(sv.r.running? 'cmd_svQuitR' : 'cmd_svStartR');"
+			/>
+	</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"
[TRUNCATED]

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


More information about the Sciviews-commits mailing list