[Sciviews-commits] r492 - in komodo/SciViews-K: . components content content/js content/js/tools pylib
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Dec 16 20:54:36 CET 2012
Author: phgrosjean
Date: 2012-12-16 20:54:36 +0100 (Sun, 16 Dec 2012)
New Revision: 492
Added:
komodo/SciViews-K/components/component.manifest
Modified:
komodo/SciViews-K/chrome.manifest
komodo/SciViews-K/components/Conscript
komodo/SciViews-K/components/koRLinter.py
komodo/SciViews-K/components/svIRinterpreter.idl
komodo/SciViews-K/components/svRinterpreter.js
komodo/SciViews-K/content/RConsole2Pane.xul
komodo/SciViews-K/content/RConsoleOverlay.xul
komodo/SciViews-K/content/RObjects2Pane.xul
komodo/SciViews-K/content/RObjectsOverlay.xul
komodo/SciViews-K/content/js/commands.js
komodo/SciViews-K/content/js/pref-R.js
komodo/SciViews-K/content/js/rconsole.js
komodo/SciViews-K/content/js/robjects.js
komodo/SciViews-K/content/js/tools/file.js
komodo/SciViews-K/content/overlayMain.xul
komodo/SciViews-K/pylib/lang_r.py
Log:
Change in Komodo R language definition to match version 7
Modified: komodo/SciViews-K/chrome.manifest
===================================================================
--- komodo/SciViews-K/chrome.manifest 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/chrome.manifest 2012-12-16 19:54:36 UTC (rev 492)
@@ -1,14 +1,10 @@
content sciviewsk jar:sciviewsk.jar!/content/
-overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/RConsoleOverlay.xul appversion<=6.99
-
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/komodo.xul chrome://sciviewsk/content/RConsoleOverlay.xul appversion<=6.99
overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/RObjectsOverlay.xul appversion<=6.99
-
overlay chrome://places/content/places_panel.xul chrome://sciviewsk/content/placesOverlay.xul appversion>6.99
locale sciviewsk en-GB jar:sciviewsk.jar!/locale/en-GB/
Modified: komodo/SciViews-K/components/Conscript
===================================================================
--- komodo/SciViews-K/components/Conscript 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/components/Conscript 2012-12-16 19:54:36 UTC (rev 492)
@@ -36,18 +36,18 @@
#
# ***** END LICENSE BLOCK *****
-Import(
- 'cons',
- 'build',
- 'ranRegxpcomStateFileName',
- 'mozComponentsDir',
- 'mozIdlIncludePath',
- 'idlExportDir',
- 'komodoPythonUtilsDir',
- 'siloedPython',
- 'supportDir',
- 'sdkDir',
- 'platform',
- 'havePy2to3',
-);
-$cons->InstallXpcomComponent('koRLinter.py');
+#Import(
+# 'cons',
+# 'build',
+# 'ranRegxpcomStateFileName',
+# 'mozComponentsDir',
+# 'mozIdlIncludePath',
+# 'idlExportDir',
+# 'komodoPythonUtilsDir',
+# 'siloedPython',
+# 'supportDir',
+# 'sdkDir',
+# 'platform',
+# 'havePy2to3',
+#);
+#$cons->InstallXpcomComponent('koRLinter.py');
Added: komodo/SciViews-K/components/component.manifest
===================================================================
--- komodo/SciViews-K/components/component.manifest (rev 0)
+++ komodo/SciViews-K/components/component.manifest 2012-12-16 19:54:36 UTC (rev 492)
@@ -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/svRinterpreter;1 {22A6C234-CC35-D374-2F01-FD4C605C905B}
+component {22A6C234-CC35-D374-2F01-FD4C605C905B} svRinterpreter.js
+interfaces svIRinterpreter.xpt
\ No newline at end of file
Modified: komodo/SciViews-K/components/koRLinter.py
===================================================================
--- komodo/SciViews-K/components/koRLinter.py 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/components/koRLinter.py 2012-12-16 19:54:36 UTC (rev 492)
@@ -53,7 +53,7 @@
# R error line format with svTools:::koLint(..., type = "flat")
# warning|error+++line+++column+++error message\n
-class KoRCompileLinter:
+class KoRLinter:
_com_interfaces_ = [components.interfaces.koILinter]
_reg_desc_ = "Komodo R Linter"
_reg_clsid_ = "{E5B7415C-81C6-4185-8B53-B527193D251E}"
Modified: komodo/SciViews-K/components/svIRinterpreter.idl
===================================================================
--- komodo/SciViews-K/components/svIRinterpreter.idl 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/components/svIRinterpreter.idl 2012-12-16 19:54:36 UTC (rev 492)
@@ -33,7 +33,7 @@
#include "nsISupports.idl"
-[scriptable, uuid(5e04a8de-ac01-4df1-af7a-184130e645b8)]
+[scriptable, uuid(22A6C234-CC35-D374-2F01-FD4C605C905B)]
interface svIRinterpreter : nsISupports {
/**
Modified: komodo/SciViews-K/components/svRinterpreter.js
===================================================================
--- komodo/SciViews-K/components/svRinterpreter.js 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/components/svRinterpreter.js 2012-12-16 19:54:36 UTC (rev 492)
@@ -28,7 +28,7 @@
// Properties required for XPCOM registration
classDescription: "The SciViews-K R interpreter",
- classID: Components.ID("{57dbf673-ce91-4858-93f9-2e47fea3495d}"),
+ classID: Components.ID("{22A6C234-CC35-D374-2F01-FD4C605C905B}"),
contractID: "@sciviews.org/svRinterpreter;1",
// Category: An array of categories to register this component in.
Modified: komodo/SciViews-K/content/RConsole2Pane.xul
===================================================================
--- komodo/SciViews-K/content/RConsole2Pane.xul 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/RConsole2Pane.xul 2012-12-16 19:54:36 UTC (rev 492)
@@ -66,36 +66,8 @@
<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/rconsole.js"/>
-
-<!-- <menupopup id="tabPicker_popup">
- <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"
- insertbefore="show_runoutput_tab2"
- label="R Output" type="checkbox"
- observes="show_sciviews_rconsole_tab"
- oncommand="ko.uilayout.ensureTabShown('sciviews_rconsole_tab', true);"/>
- </menupopup> -->
-
-<!-- <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="rconsoleViewBox_Wrapper">
-
-
<vbox flex="1" id="rconsole-desc-tabpane">
<hbox id="rconsole-desc-tabpanel-toolbar-hbox"
class="toolbar-background toolbar-hbox">
@@ -142,8 +114,5 @@
<hbox id="scintillaOverlayXul"/> <!--<commandset id="rconsole-commandset"/>-->
</vbox>
</vbox>
-<!-- </tabpanel>
- </tabpanels>
-</overlay> -->
</vbox>
</page>
Modified: komodo/SciViews-K/content/RConsoleOverlay.xul
===================================================================
--- komodo/SciViews-K/content/RConsoleOverlay.xul 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/RConsoleOverlay.xul 2012-12-16 19:54:36 UTC (rev 492)
@@ -36,6 +36,8 @@
<!ENTITY % debuggerDTD SYSTEM "chrome://komodo/locale/komodo.dtd">
%debuggerDTD;
]>
+
+<?xml-stylesheet href="chrome://global/content/xul.css" type="text/css"?>
<?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"?>
Modified: komodo/SciViews-K/content/RObjects2Pane.xul
===================================================================
--- komodo/SciViews-K/content/RObjects2Pane.xul 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/RObjects2Pane.xul 2012-12-16 19:54:36 UTC (rev 492)
@@ -141,7 +141,6 @@
oncommand="sv.robjects.do('write.table')"
testDisableIf="t:cannotSaveToFile"
accesskey="T"/>
-
<menuitem id="menu_cmd_robjects_save"
class="menuitem-iconic save-buffer-icon"
label="&sciviews.robjects.save;"
@@ -157,20 +156,19 @@
class="menuitem-iconic help-icon"
testDisableIf="t:multipleSelection t:noHelp"
accesskey="H" />
+ </menupopup>
+</popupset>
- </menupopup>
- </popupset>
-
<broadcasterset id="broadcasterset_global">
<broadcaster id="cmd_robjects_viewSearchPath"
tooltiptext="&sciviews.robjects.tab;: &sciviews.robjects.showHide;"
- label="&sciviews.robjects.showHide;" splitter="bottom_splitter"
+ splitter="bottom_splitter"
box="robjects_searchpath_panel"
oncommand="sv.robjects.toggleViewSearchPath(event);"
checked="true" state="open"/>
</broadcasterset>
+ <!-- label="&sciviews.robjects.showHide;" -->
-
<vbox flex="1" id="robjectsViewbox_robjectsWrapper">
<vbox flex="99" id="robjectsViewbox_robjects">
<hbox align="center" id="robjectsToolbar" class="toolbar-box">
@@ -178,34 +176,43 @@
tooltiptext="&sciviews.robjects.refresh.tip;"
buttonstyle="pictures"
class="refresh-icon"
- oncommand="sv.robjects.refreshAll();"/>
+ oncommand="sv.robjects.smartRefresh(true);"/>
+ <!-- label="&sciviews.robjects.refresh;" -->
+ <!-- or oncommand="sv.robjects.refreshAll();"-->
<toolbarbutton id="sciviews_robjects_searchpath_button"
observes="cmd_robjects_viewSearchPath"
- buttonstyle="pictures" class="searchPath-icon"
- checked="true" persist="state checked"/>
+ 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">
+ 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);"/>
+ accesskey="l" class="menuitem-iconic r-pkg-load-icon"
+ oncommand="sv.r.pkg.load();"/>
+ <menuitem id="r_objects_pkg_unload" label="Unload..."
+ accesskey="l" class="menuitem-iconic r-pkg-unload-icon"
+ oncommand="sv.r.pkg.unload();"/>
+ <menuitem id="r_objects_wkspce_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();"/>
+ 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');"/>
+ 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();"/>
+ 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();"/>
+ accesskey="r" class="menuitem-iconic r-pkg-remove-icon"
+ oncommand="sv.r.pkg.remove();"/>
<menuseparator/>
@@ -215,7 +222,6 @@
<menuitem id="r_repositories" label="Select R repositories"
accesskey="r" class="menuitem-iconic r-repositories-icon"
oncommand="sv.r.pkg.repositories();"/>
-
</menupopup>
</toolbarbutton>
@@ -228,21 +234,23 @@
<menupopup id="sciviews_robjects_filterPopup">
<menuitem id="sciviews_robjects_context_filterByName"
- label="&sciviews.robjects.filterByName;"
- checked="true" accesskey="n" type="checkbox"
- oncommand="sv.robjects.setFilterBy(this, 'name')"/>
+ label="&sciviews.robjects.filterByName;"
+ checked="true" accesskey="n" type="checkbox"
+ oncommand="sv.robjects.setFilterBy(this, 'name')"/>
<menuitem id="sciviews_robjects_context_filterByClass"
- label="&sciviews.robjects.filterByClass;"
- accesskey="c" type="checkbox"
- oncommand="sv.robjects.setFilterBy(this, 'class')"/>
+ label="&sciviews.robjects.filterByClass;"
+ accesskey="c" type="checkbox"
+ oncommand="sv.robjects.setFilterBy(this, 'class')"/>
<menuitem id="sciviews_robjects_context_filterByGroup"
- label="&sciviews.robjects.filterByGroup;"
- accesskey="g" type="checkbox"
- oncommand="sv.robjects.setFilterBy(this, 'group')"/>
+ label="&sciviews.robjects.filterByGroup;"
+ accesskey="g" type="checkbox"
+ oncommand="sv.robjects.setFilterBy(this, 'group')"/>
+
<menuseparator/>
+
<menuitem id="sciviews_robjects_context_clrFilter"
- label="&sciviews.robjects.clrFilter;" accesskey="l"
- oncommand="document.getElementById('sciviews_robjects_filterbox')
+ label="&sciviews.robjects.clrFilter;" accesskey="l"
+ oncommand="document.getElementById('sciviews_robjects_filterbox')
.value = ''; sv.robjects.applyFilter();"/>
</menupopup>
</toolbarbutton>
@@ -268,18 +276,18 @@
</vbox>
<splitter id="sciviews_robjects_splitter" collapse="before"
- resizeafter="closest" resizebefore="closest" persist="state"
- observes="cmd_robjects_viewSearchPath">
+ 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.robjects.onEvent(event);"
- onkeypress="sv.robjects.onEvent(event);">
+ persist="sortDirection sortResource"
+ sortDirection="ascending" sortResource="r-name"
+ enableColumnDrag="true"
+ onselect="sv.robjects.onEvent(event);"
+ onkeypress="sv.robjects.onEvent(event);">
<treecols>
<treecol id="r-name" label="&sciviews.robjects.Name;"
@@ -304,12 +312,12 @@
</treecols>
<treechildren id="sciviews_robjects_objects_tree_main"
- ondraggesture="nsDragAndDrop.startDrag(event, sv.robjects.listObserver);"
- ondragdrop="nsDragAndDrop.drop(event, sv.robjects.listObserver);"
- ondragover="nsDragAndDrop.dragOver(event, sv.robjects.listObserver);"
- onclick="sv.robjects.onEvent(event);"
- ondblclick="sv.robjects.onEvent(event);"
- context="rObjectsContext">
+ ondraggesture="nsDragAndDrop.startDrag(event, sv.robjects.listObserver);"
+ ondragdrop="nsDragAndDrop.drop(event, sv.robjects.listObserver);"
+ ondragover="nsDragAndDrop.dragOver(event, sv.robjects.listObserver);"
+ onclick="sv.robjects.onEvent(event);"
+ ondblclick="sv.robjects.onEvent(event);"
+ context="rObjectsContext">
</treechildren>
</tree>
</vbox>
@@ -317,15 +325,17 @@
<vbox>
<hbox align="center">
<toolbarbutton id="sciviews_robjects_foldAll_button"
- buttonstyle="pictures"
- class="robjects-fold-all-icon"
- oncommand="sv.robjects.foldAll(true);"
- tooltiptext="&sciviews.robjects.foldAll;"/>
+ label="Fold All"
+ buttonstyle="pictures"
+ class="robjects-fold-all-icon"
+ oncommand="sv.robjects.foldAll(true);"
+ tooltiptext="&sciviews.robjects.foldAll;"/>
<toolbarbutton id="sciviews_robjects_ExpandAll_button"
- buttonstyle="pictures"
- class="robjects-expand-all-icon"
- oncommand="sv.robjects.foldAll(false);"
- tooltiptext="&sciviews.robjects.unfoldAll;"/>
+ label="Expand All"
+ buttonstyle="pictures"
+ class="robjects-expand-all-icon"
+ oncommand="sv.robjects.foldAll(false);"
+ tooltiptext="&sciviews.robjects.unfoldAll;"/>
</hbox>
</vbox>
</vbox>
Modified: komodo/SciViews-K/content/RObjectsOverlay.xul
===================================================================
--- komodo/SciViews-K/content/RObjectsOverlay.xul 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/RObjectsOverlay.xul 2012-12-16 19:54:36 UTC (rev 492)
@@ -192,16 +192,22 @@
<toolbarbutton id="sciviews_robjects_refresh_button"
tooltiptext="&sciviews.robjects.refresh.tip;"
buttonstyle="pictures"
- label="&sciviews.robjects.refresh;" class="refresh-icon"
+ label="&sciviews.robjects.refresh;"
+ class="refresh-icon"
oncommand="sv.robjects.smartRefresh(true);"/>
<!-- or oncommand="sv.robjects.refreshAll();"-->
<toolbarbutton id="sciviews_robjects_searchpath_button"
observes="cmd_robjects_viewSearchPath"
- buttonstyle="pictures" class="searchPath-icon"
- checked="true" persist="state checked"/>
+ tooltiptext="&sciviews.robjects.showHide.tip;"
+ 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">
+ buttonstyle="pictures"
+ class="robjects-pkg-icon"
+ type="menu"
+ orient="horizontal">
<menupopup>
<menuitem id="r_objects_pkg_load" label="Load packages..."
@@ -210,7 +216,7 @@
<menuitem id="r_objects_pkg_unload" label="Unload..."
accesskey="l" class="menuitem-iconic r-pkg-unload-icon"
oncommand="sv.r.pkg.unload();"/>
- <menuitem id="r_objects_pkg_load" label="Attach workspace..."
+ <menuitem id="r_objects_wkspce_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..."
@@ -336,12 +342,14 @@
<vbox>
<hbox align="center">
<toolbarbutton id="sciviews_robjects_foldAll_button"
- label="Fold All" buttonstyle="pictures"
+ label="Fold All"
+ buttonstyle="pictures"
class="robjects-fold-all-icon"
oncommand="sv.robjects.foldAll(true);"
tooltiptext="&sciviews.robjects.foldAll;"/>
<toolbarbutton id="sciviews_robjects_ExpandAll_button"
- label="Expand All" buttonstyle="pictures"
+ label="Expand All"
+ buttonstyle="pictures"
class="robjects-expand-all-icon"
oncommand="sv.robjects.foldAll(false);"
tooltiptext="&sciviews.robjects.unfoldAll;"/>
Modified: komodo/SciViews-K/content/js/commands.js
===================================================================
--- komodo/SciViews-K/content/js/commands.js 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/js/commands.js 2012-12-16 19:54:36 UTC (rev 492)
@@ -575,46 +575,52 @@
}
if (!svSchemeDefault) return(false);
- // If current config is not writable, clone it (with a suffix)
- var currentConfiguration = kbMgr.currentConfiguration;
- if (!kbMgr.configurationWriteable(currentConfiguration)) {
- currentConfiguration =
- kbMgr.makeNewConfiguration(currentConfiguration +
+ try {
+ // If current config is not writable, clone it (with a suffix)
+ var currentConfiguration = kbMgr.currentConfiguration;
+ if (!kbMgr.configurationWriteable(currentConfiguration)) {
+ currentConfiguration =
+ kbMgr.makeNewConfiguration(currentConfiguration +
" (SciViews-K)");
- }
+ }
+ } catch (e) { }
- //from: gKeybindingMgr.parseConfiguration
- var bindingRx = /[\r\n]+(# *SciViews|binding cmd_sv.*)/g;
- function _getSvKeys (data, pattern) {
- if (!pattern) pattern = "";
- var keys = data.match(new RegExp("^binding " + pattern +
- ".*$", "gm"));
- var res = {};
- for (var j in keys) {
- try {
- keys[j].search(/^binding\s+(\S+)\s+(\S+)$/);
- res[RegExp.$1] = RegExp.$2;
- } catch(e) { }
+ try {
+ //from: gKeybindingMgr.parseConfiguration
+ var bindingRx = /[\r\n]+(# *SciViews|binding cmd_sv.*)/g;
+ function _getSvKeys (data, pattern) {
+ if (!pattern) pattern = "";
+ var keys = data.match(new RegExp("^binding " + pattern +
+ ".*$", "gm"));
+ var res = {};
+ for (var j in keys) {
+ try {
+ keys[j].search(/^binding\s+(\S+)\s+(\S+)$/);
+ res[RegExp.$1] = RegExp.$2;
+ } catch(e) { }
+ }
+ return(res);
}
- return(res);
- }
- var svKeysDefault = _getSvKeys (svSchemeDefault, "cmd_sv");
- if (clearOnly) {
- for (var i in svKeysDefault) kbMgr.clearBinding(i, "", false);
- } else {
- var keysequence;
- for (var i in svKeysDefault) {
- keysequence = svKeysDefault[i].split(/, /);
- if (!kbMgr.usedBy(keysequence).length) {
- kbMgr.assignKey(i, keysequence, '');
- kbMgr.makeKeyActive(i, keysequence);
+ var svKeysDefault = _getSvKeys (svSchemeDefault, "cmd_sv");
+ if (clearOnly) {
+ for (var i in svKeysDefault) kbMgr.clearBinding(i, "", false);
+ } else {
+ var keysequence;
+ for (var i in svKeysDefault) {
+ keysequence = svKeysDefault[i].split(/, /);
+ if (!kbMgr.usedBy(keysequence).length) {
+ kbMgr.assignKey(i, keysequence, '');
+ kbMgr.makeKeyActive(i, keysequence);
+ }
}
}
- }
- //kbMgr.saveAndApply(ko.prefs);
- kbMgr.saveCurrentConfiguration();
- kbMgr.loadConfiguration(kbMgr.currentConfiguration, true);
+ //kbMgr.saveAndApply(ko.prefs);
+ kbMgr.saveCurrentConfiguration();
+ kbMgr.loadConfiguration(kbMgr.currentConfiguration, true);
+ } catch (e) {
+ return(false);
+ }
return(true);
}
Modified: komodo/SciViews-K/content/js/pref-R.js
===================================================================
--- komodo/SciViews-K/content/js/pref-R.js 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/js/pref-R.js 2012-12-16 19:54:36 UTC (rev 492)
@@ -504,7 +504,12 @@
var rType = document.getElementById('sciviews.r.type').value;
prefset.setStringPref("sciviews.r.type", rType);
var rPort = parseInt(document.getElementById('sciviews.r.port').value);
- prefset.setLongPref("sciviews.r.port", rPort);
+ // Allow for both a long or a double for sciviews.r.port
+ try {
+ prefset.setLongPref("sciviews.r.port", rPort);
+ } catch (e) {
+ prefset.setDoublePref("sciviews.r.port", rPort);
+ }
// TODO: shouldn't we test for rPort too?
// Check if selected item is different from current sv.clientType
// and if R is running
@@ -523,12 +528,22 @@
// Restart socket server if running and port or channel changed
var koType = document.getElementById('sciviews.ko.type').value;
var koPort = parseInt(document.getElementById('sciviews.ko.port').value);
- if (koPort != prefset.getLongPref("sciviews.ko.port") ||
- koType != sv.serverType) {
+ var curKoPort; // Either long or double
+ try {
+ curKoPort = prefset.getLongPref("sciviews.ko.port");
+ } catch (e) {
+ curKoPort = parseInt(prefset.getDoublePref("sciviews.ko.port"));
+ }
+ if (koPort != curKoPort || koType != sv.serverType) {
// Stop server with old config, if it is started
var isStarted = sv.socket.serverIsStarted;
if (isStarted) sv.socket.serverStop();
- prefset.setLongPref("sciviews.ko.port", koPort);
+ // Allow for both a long or a double for sciviews.ko.port
+ try {
+ prefset.setLongPref("sciviews.ko.port", koPort);
+ } catch (e) {
+ prefset.setDoublePref("sciviews.ko.port", koPort);
+ }
prefset.setStringPref("sciviews.ko.type", koType);
sv.serverType = koType;
Modified: komodo/SciViews-K/content/js/rconsole.js
===================================================================
--- komodo/SciViews-K/content/js/rconsole.js 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/js/rconsole.js 2012-12-16 19:54:36 UTC (rev 492)
@@ -309,7 +309,7 @@
onTerminate: function (retval) {
//dump("_terminationListener::onTerminate(retval="+retval+")\n");
this._editor.sv.rconsole.endSession(retval);
- var msg = "R quitted with return value " + retval;
+ var msg = "R has quit with return value " + retval;
this._editor.ko.statusBar.AddMessage(msg, "run_command", 3000,
retval ? 1 : 0);
if (this._callback) {
Modified: komodo/SciViews-K/content/js/robjects.js
===================================================================
--- komodo/SciViews-K/content/js/robjects.js 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/js/robjects.js 2012-12-16 19:54:36 UTC (rev 492)
@@ -1164,18 +1164,21 @@
var text = _this.getSelectedNames(fullNames, extended).join(', ');
//view.setFocus();
var scimoz = view.scimoz;
- var length = scimoz.length;
+ // Sometimes, scimoz could not be defined
+ try {
+ var length = scimoz.length;
- if (scimoz.getWCharAt(scimoz.selectionStart - 1)
- .search(/^[\w\.\u0100-\uFFFF"'`,\.;:=]$/) != -1)
- text = " " + text;
- if (scimoz.getWCharAt(scimoz.selectionEnd)
- .search(/^[\w\.\u0100-\uFFFF"'`]$/) != -1)
- text += " ";
+ if (scimoz.getWCharAt(scimoz.selectionStart - 1)
+ .search(/^[\w\.\u0100-\uFFFF"'`,\.;:=]$/) != -1)
+ text = " " + text;
+ if (scimoz.getWCharAt(scimoz.selectionEnd)
+ .search(/^[\w\.\u0100-\uFFFF"'`]$/) != -1)
+ text += " ";
- scimoz.insertText(scimoz.currentPos, text);
- scimoz.currentPos += scimoz.length - length;
- scimoz.charRight();
+ scimoz.insertText(scimoz.currentPos, text);
+ scimoz.currentPos += scimoz.length - length;
+ scimoz.charRight();
+ } catch (e) { } // TODO: do something here?
}
this.setFilterBy = function (menuItem, column) {
Modified: komodo/SciViews-K/content/js/tools/file.js
===================================================================
--- komodo/SciViews-K/content/js/tools/file.js 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/js/tools/file.js 2012-12-16 19:54:36 UTC (rev 492)
@@ -374,7 +374,7 @@
} else { // Not Windows
this.whereIs = function (appName, firstOne) {
if (firstOne === undefined) firstOne = false;
- res = _WhichAll(appName);
+ var res = _WhichAll(appName);
if (!res) return(null);
if (firstOne) {
return(res[0]);
Modified: komodo/SciViews-K/content/overlayMain.xul
===================================================================
--- komodo/SciViews-K/content/overlayMain.xul 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/content/overlayMain.xul 2012-12-16 19:54:36 UTC (rev 492)
@@ -540,7 +540,8 @@
id="sciviews_robjects_tab"
label="&sciviews.robjects.tab;"
src="chrome://sciviewsk/content/RObjects2Pane.xul"
- tab_onfocus="sv.robjects.focus();"/>
+ tab_onfocus="sv.robjects.focus();"
+ insertbefore="placesViewbox"/>
</ko-pane>
<ko-pane id="workspace_bottom_area">
@@ -548,7 +549,8 @@
id="sciviews_rconsole_tab"
label="&sciviews.console.tab;"
src="chrome://sciviewsk/content/RConsole2Pane.xul"
- tab_onfocus="sv.rconsole.focus();"/>
+ tab_onfocus="sv.rconsole.focus();"
+ insertbefore="runoutput-desc-tabpanel"/>
</ko-pane>
<!--<ko-pane id="workspace_right_area">
Modified: komodo/SciViews-K/pylib/lang_r.py
===================================================================
--- komodo/SciViews-K/pylib/lang_r.py 2012-12-15 14:41:37 UTC (rev 491)
+++ komodo/SciViews-K/pylib/lang_r.py 2012-12-16 19:54:36 UTC (rev 492)
@@ -16,7 +16,7 @@
#
# Contributor(s):
# Philippe Grosjean
-# ActiveState Software Inc (code inspired from)
+# ActiveState Software Inc (code inspired from Komodo code)
#
# 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
More information about the Sciviews-commits
mailing list