[Sciviews-commits] r195 - in komodo/SciViews-K: . content content/js templates
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Sep 21 01:47:27 CEST 2009
Author: phgrosjean
Date: 2009-09-21 01:47:24 +0200 (Mon, 21 Sep 2009)
New Revision: 195
Added:
komodo/SciViews-K/sciviewsk-0.9.0-ko.xpi
komodo/SciViews-K/templates/R reference.kpz
komodo/SciViews-K/templates/svGUI_0.9-46.tar.gz
komodo/SciViews-K/templates/svGUI_0.9-46.tgz
komodo/SciViews-K/templates/svGUI_0.9-46.zip
komodo/SciViews-K/templates/svIDE_0.9-46.tar.gz
komodo/SciViews-K/templates/svIDE_0.9-46.tgz
komodo/SciViews-K/templates/svIDE_0.9-46.zip
komodo/SciViews-K/templates/svMisc_0.9-53.tar.gz
komodo/SciViews-K/templates/svMisc_0.9-53.tgz
komodo/SciViews-K/templates/svMisc_0.9-53.zip
komodo/SciViews-K/templates/svSocket_0.9-48.tar.gz
komodo/SciViews-K/templates/svSocket_0.9-48.tgz
komodo/SciViews-K/templates/svSocket_0.9-48.zip
Removed:
komodo/SciViews-K/sciviewsk-0.8.1-ko.xpi
komodo/SciViews-K/templates/svGUI_0.9-44.tar.gz
komodo/SciViews-K/templates/svGUI_0.9-44.tgz
komodo/SciViews-K/templates/svGUI_0.9-44.zip
komodo/SciViews-K/templates/svIDE_0.9-45.tar.gz
komodo/SciViews-K/templates/svIDE_0.9-45.tgz
komodo/SciViews-K/templates/svIDE_0.9-45.zip
komodo/SciViews-K/templates/svMisc_0.9-48.tar.gz
komodo/SciViews-K/templates/svMisc_0.9-48.tgz
komodo/SciViews-K/templates/svMisc_0.9-48.zip
komodo/SciViews-K/templates/svSocket_0.9-44.tar.gz
komodo/SciViews-K/templates/svSocket_0.9-44.tgz
komodo/SciViews-K/templates/svSocket_0.9-44.zip
Modified:
komodo/SciViews-K/content/RObjectsOverlay.xul
komodo/SciViews-K/content/js/r.js
komodo/SciViews-K/content/js/robjects.js
komodo/SciViews-K/content/js/sciviews.js
komodo/SciViews-K/install.rdf
komodo/SciViews-K/templates/.DS_Store
komodo/SciViews-K/templates/.Rprofile
komodo/SciViews-K/templates/SciViews-K.kpz
Log:
Several little changes towards version 0.9.0 of SciViews-K
Modified: komodo/SciViews-K/content/RObjectsOverlay.xul
===================================================================
--- komodo/SciViews-K/content/RObjectsOverlay.xul 2009-09-20 21:03:36 UTC (rev 194)
+++ komodo/SciViews-K/content/RObjectsOverlay.xul 2009-09-20 23:47:24 UTC (rev 195)
@@ -52,21 +52,21 @@
<popupset id="extensionPopupSet">
<menupopup id="rObjectsContext"
onpopupshowing="sv.r.objects.contextOnShow();">
- <menuitem class="primary_menu_item" id="menu_robjects_cmd_insertname"
- command="robjects_cmd_insertname" acceltext="Ins"/>
- <menuitem id="menu_robjects_cmd_insertfullname"
- command="robjects_cmd_insertfullname" acceltext="Ctrl+Ins"/>
+ <menuitem class="primary_menu_item" id="menu_robjects_cmd_insertfullname"
+ command="robjects_cmd_insertfullname" acceltext="Ins"/>
+ <menuitem id="menu_robjects_cmd_insertname"
+ command="robjects_cmd_insertname" acceltext="Ctrl+Ins"/>
<menuitem id="menu_robjects_cmd_removeobj"
command="robjects_cmd_removeobj" acceltext="Del"
key="key_cmd_delete" class="menuitem-iconic list-item-remove-icon"/>
- <menuitem id="menu_robjects_cmd_attach" command="robjects_cmd_attach"/>
- <menuitem id="menu_robjects_cmd_detach" command="robjects_cmd_detach"/>
+ <!--<menuitem id="menu_robjects_cmd_attach" command="robjects_cmd_attach"/>
+ <menuitem id="menu_robjects_cmd_detach" command="robjects_cmd_detach"/>-->
<menuseparator keep="false" intoplevel="true"/>
<menuitem id="menu_robjects_cmd_print" command="robjects_cmd_print"/>
<menuitem id="menu_robjects_cmd_plot" command="robjects_cmd_plot"/>
<menuitem id="menu_robjects_cmd_summary" command="robjects_cmd_summary"/>
<menuitem id="menu_robjects_cmd_str" command="robjects_cmd_str"/>
- <menuitem id="menu_robjects_cmd_args" command="robjects_cmd_args"/>
+ <!--<menuitem id="menu_robjects_cmd_args" command="robjects_cmd_args"/>-->
<menuitem id="menu_robjects_cmd_names" command="robjects_cmd_names"/>
<menuseparator keep="false" intoplevel="true"/>
<menuitem id="menu_robjects_cmd_help" command="robjects_cmd_help"/>
@@ -84,14 +84,14 @@
<commandset id="allcommands">
<commandset id="r-objects-commands">
+ <command id="robjects_cmd_insertfullname" label="&sciviews.robjects.insFullName;"
+ oncommand="sv.r.objects.insertName(true);" accesskey="F"/>
<command id="robjects_cmd_insertname" label="&sciviews.robjects.insName;"
oncommand="sv.r.objects.insertName(false);" accesskey="I"/>
- <command id="robjects_cmd_insertfullname" label="&sciviews.robjects.insFullName;"
- oncommand="sv.r.objects.insertName(true);" accesskey="F"/>
<command id="robjects_cmd_removeobj" label="&sciviews.robjects.rmObj;"
oncommand="sv.r.objects.removeSelected(event.shiftKey);" accesskey="R"/>
- <command id="robjects_cmd_attach" label="&sciviews.robjects.loadPkg;"
- oncommand="sv.r.objects.do('library');" accesskey="L" disabled="true"/>
+ <!--<command id="robjects_cmd_attach" label="&sciviews.robjects.loadPkg;"
+ oncommand="sv.r.objects.do('library');" accesskey="L" disabled="true"/>-->
<command id="robjects_cmd_summary" label="&sciviews.robjects.summary;"
oncommand="sv.r.objects.do('summary');" accesskey="S"/>
<command id="robjects_cmd_print" label="&sciviews.robjects.print;"
Modified: komodo/SciViews-K/content/js/r.js
===================================================================
--- komodo/SciViews-K/content/js/r.js 2009-09-20 21:03:36 UTC (rev 194)
+++ komodo/SciViews-K/content/js/r.js 2009-09-20 23:47:24 UTC (rev 195)
@@ -45,8 +45,10 @@
// // Save the current R graph in different formats
// sv.r.obj(objClass); // Set active object for objClass (data.frame if omitted)
// sv.r.obj_select(data); // The callback for sv.r.obj() to select an object
-// sv.r.obj_refresh_dataframe(data); // Refresh active data frame's MRUs
-// sv.r.obj_refresh_lm(data); // Refresh active 'lm' object
+// sv.r.obj_select_dataframe(objname); // Select one data frame to activate
+// sv.r.obj_select_lm(objname); // Select one lm object to activate
+// sv.r.obj_refresh_dataframe(data); // Refresh active data frame's MRUs
+// sv.r.obj_refresh_lm(data); // Refresh active 'lm' object
// sv.r.obj_message(); // Refresh statusbar message about active df and lm
// sv.r.refreshSession(); // Refresh MRU lists associated with current session
// sv.r.initSession(dir, datadir, scriptdir, reportdir);
@@ -749,9 +751,9 @@
// Sometimes, we got 'item (data)' => retrieve 'data' in this case
datname = datname.replace(/^[a-zA-Z0-9._ ]*[(]/, "");
datname = datname.replace(/[)]$/, "");
- res = sv.r.eval('data(' + datname + ')');
- // Activate this dataset now and refresh corresponding MRU lists
- sv.r.obj_refresh_dataframe(datname);
+ res = sv.r.evalCallback('data(' + datname + '); cat("' + datname +
+ '"); invisible(try(guiRefresh(force = TRUE), silent = TRUE))',
+ sv.r.obj_select_dataframe);
}
}
return(res);
@@ -914,32 +916,9 @@
var objname = obj[0];
// The rest of the treatment depends on objClass
if (objclass == "data.frame") {
- // Refresh the default val and list of vars
- res = sv.r.evalCallback(
- '.active.data.frame <- list(object = "' + objname +
- '", fun = function () {\n' +
-' if (exists(.active.data.frame$object, envir = .GlobalEnv)) {\n' +
-' obj <- get(.active.data.frame$object, envir = .GlobalEnv)\n' +
-' res <- paste(c(.active.data.frame$object, names(obj)), "\t",\n' +
-' c(class(obj), sapply(obj, class)), "\n", sep = "")\n' +
-' return(.active.data.frame$cache <<- res)\n' +
-' } else return(.active.data.frame$cache <<- NULL)\n' +
- '}, cache = "")\n' +
- 'cat(.active.data.frame$fun(), sep = "")',
- sv.r.obj_refresh_dataframe);
+ sv.r.obj_select_dataframe(objname);
} else if (objclass == "lm") {
- // Refresh the default lm object in R session
- res = sv.r.evalCallback(
- '.active.lm <- list(object = "' + objname +
- '", fun = function () {\n' +
-' if (exists(.active.lm$object, envir = .GlobalEnv)) {\n' +
-' obj <- get(.active.lm$object, envir = .GlobalEnv)\n' +
-' res <- paste(.active.lm$object, class(obj), sep = "\t")\n' +
-' return(.active.lm$cache <<- res)\n' +
-' } else return(.active.lm$cache <<- NULL)\n' +
- '}, cache = "")\n' +
- 'cat(.active.lm$fun(), sep = "")',
- sv.r.obj_refresh_lm);
+ sv.r.obj_select_lm(objname);
} else {
// Not implemented yet for other objects!
//alert("Update of MRU lists not implemented yet for other " +
@@ -971,7 +950,24 @@
", linear model: " + lm, "Rstatus", 0, false);
}
-// Callback for sv.r.obj_select to refresh the MRUs associated with data frames
+// Select one data frame
+sv.r.obj_select_dataframe = function (objname) {
+ // Refresh the default val and list of vars
+ res = sv.r.evalCallback(
+ '.active.data.frame <- list(object = "' + objname +
+ '", fun = function () {\n' +
+ ' if (exists(.active.data.frame$object, envir = .GlobalEnv)) {\n' +
+ ' obj <- get(.active.data.frame$object, envir = .GlobalEnv)\n' +
+ ' res <- paste(c(.active.data.frame$object, names(obj)), "\t",\n' +
+ ' c(class(obj), sapply(obj, class)), "\n", sep = "")\n' +
+ ' return(.active.data.frame$cache <<- res)\n' +
+ ' } else return(.active.data.frame$cache <<- NULL)\n' +
+ '}, cache = "")\n' +
+ 'cat(.active.data.frame$fun(), sep = "")',
+ sv.r.obj_refresh_dataframe);
+}
+
+// Callback for sv.r.obj_select_dataframe to refresh the associated MRUs
sv.r.obj_refresh_dataframe = function (data) {
ko.statusBar.AddMessage("", "R");
// If we got nothing, then the object does not exists any more... clear MRUs
@@ -1031,6 +1027,22 @@
return(true);
}
+// Select one data frame
+sv.r.obj_select_lm = function (objname) {
+ // Refresh the default lm object in R session
+ res = sv.r.evalCallback(
+ '.active.lm <- list(object = "' + objname +
+ '", fun = function () {\n' +
+ ' if (exists(.active.lm$object, envir = .GlobalEnv)) {\n' +
+ ' obj <- get(.active.lm$object, envir = .GlobalEnv)\n' +
+ ' res <- paste(.active.lm$object, class(obj), sep = "\t")\n' +
+ ' return(.active.lm$cache <<- res)\n' +
+ ' } else return(.active.lm$cache <<- NULL)\n' +
+ '}, cache = "")\n' +
+ 'cat(.active.lm$fun(), sep = "")',
+ sv.r.obj_refresh_lm);
+}
+
// Callback for sv.r.obj_select to refresh the MRUs associated with lm objects
sv.r.obj_refresh_lm = function (data) {
ko.statusBar.AddMessage("", "R");
Modified: komodo/SciViews-K/content/js/robjects.js
===================================================================
--- komodo/SciViews-K/content/js/robjects.js 2009-09-20 21:03:36 UTC (rev 194)
+++ komodo/SciViews-K/content/js/robjects.js 2009-09-20 23:47:24 UTC (rev 195)
@@ -1239,8 +1239,8 @@
document.getElementById("robjects_cmd_removeobj")
.setAttribute("disabled", noDetach);
- document.getElementById("robjects_cmd_attach")
- .setAttribute("disabled", noDetach || !isPackage);
+ //document.getElementById("robjects_cmd_attach")
+ // .setAttribute("disabled", noDetach || !isPackage);
document.getElementById("robjects_cmd_summary")
.setAttribute("disabled", isFunction || isPackage);
document.getElementById("robjects_cmd_print")
@@ -1252,7 +1252,7 @@
document.getElementById("robjects_cmd_str")
.setAttribute("disabled", isPackage);
document.getElementById("robjects_cmd_help")
- .setAttribute("disabled", !isPackage && !inPackage);
+ .setAttribute("disabled", isPackage); // && !inPackage);
}
}
@@ -1280,6 +1280,8 @@
sv.r.help(obj[i].name, obj[i].pkg.replace(/^package:/, ''));
} else if (obj[i].name.indexOf("package:") == 0) {
sv.r.help("", obj[i].name.replace(/^package:/, ''));
+ } else {
+ sv.r.help(obj[i].name);
}
}
break;
Modified: komodo/SciViews-K/content/js/sciviews.js
===================================================================
--- komodo/SciViews-K/content/js/sciviews.js 2009-09-20 21:03:36 UTC (rev 194)
+++ komodo/SciViews-K/content/js/sciviews.js 2009-09-20 23:47:24 UTC (rev 195)
@@ -56,8 +56,8 @@
if (typeof(sv) == 'undefined') {
var sv = {
// TODO: set this automatically according to the plugin version
- version: 0.8,
- release: 1,
+ version: 0.9,
+ release: 0,
showVersion: true,
checkVersion: function (version) {
if (this.version < version) {
Modified: komodo/SciViews-K/install.rdf
===================================================================
--- komodo/SciViews-K/install.rdf 2009-09-20 21:03:36 UTC (rev 194)
+++ komodo/SciViews-K/install.rdf 2009-09-20 23:47:24 UTC (rev 195)
@@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>sciviewsk at sciviews.org</em:id>
<em:name>SciViews-K</em:name>
- <em:version>0.8.1</em:version>
+ <em:version>0.9.0</em:version>
<em:description>Edit R (http://www.r-project.org) code with Komodo</em:description>
<em:creator>Philippe Grosjean</em:creator>
<em:homepageURL>http://sciviews.org/SciViews-K</em:homepageURL>
Deleted: komodo/SciViews-K/sciviewsk-0.8.1-ko.xpi
===================================================================
(Binary files differ)
Added: komodo/SciViews-K/sciviewsk-0.9.0-ko.xpi
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/sciviewsk-0.9.0-ko.xpi
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: komodo/SciViews-K/templates/.DS_Store
===================================================================
(Binary files differ)
Modified: komodo/SciViews-K/templates/.Rprofile
===================================================================
--- komodo/SciViews-K/templates/.Rprofile 2009-09-20 21:03:36 UTC (rev 194)
+++ komodo/SciViews-K/templates/.Rprofile 2009-09-20 23:47:24 UTC (rev 195)
@@ -1,11 +1,11 @@
### SciViews install begin ###
# SciViews-R installation and startup for running R with Komodo/SciViews-K
-# Version 0.8.1b, 2009-09-20 Ph. Grosjean (phgrosjean at sciviews.org)
+# Version 0.9.0, 2009-09-20 Ph. Grosjean (phgrosjean at sciviews.org)
# Make sure we don't process this twice in case of duplicate items in .Rprofile
if (!exists(".SciViewsReady", envir = .GlobalEnv)) {
.SciViewsReady <- FALSE
- minVersion <- c(R = "2.6.0", svMisc = "0.9-48", svSocket = "0.9-44", svGUI = "0.9-44")
+ minVersion <- c(R = "2.8.0", svMisc = "0.9-53", svSocket = "0.9-48", svGUI = "0.9-46")
# First of all, check R version... redefine compareVersion() because it is
# not defined in very old R versions... and thus we don't get an explicit
Added: komodo/SciViews-K/templates/R reference.kpz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/R reference.kpz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: komodo/SciViews-K/templates/SciViews-K.kpz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svGUI_0.9-44.tar.gz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svGUI_0.9-44.tgz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svGUI_0.9-44.zip
===================================================================
(Binary files differ)
Added: komodo/SciViews-K/templates/svGUI_0.9-46.tar.gz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svGUI_0.9-46.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: komodo/SciViews-K/templates/svGUI_0.9-46.tgz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svGUI_0.9-46.tgz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: komodo/SciViews-K/templates/svGUI_0.9-46.zip
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svGUI_0.9-46.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: komodo/SciViews-K/templates/svIDE_0.9-45.tar.gz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svIDE_0.9-45.tgz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svIDE_0.9-45.zip
===================================================================
(Binary files differ)
Added: komodo/SciViews-K/templates/svIDE_0.9-46.tar.gz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svIDE_0.9-46.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: komodo/SciViews-K/templates/svIDE_0.9-46.tgz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svIDE_0.9-46.tgz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: komodo/SciViews-K/templates/svIDE_0.9-46.zip
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svIDE_0.9-46.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: komodo/SciViews-K/templates/svMisc_0.9-48.tar.gz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svMisc_0.9-48.tgz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svMisc_0.9-48.zip
===================================================================
(Binary files differ)
Added: komodo/SciViews-K/templates/svMisc_0.9-53.tar.gz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svMisc_0.9-53.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: komodo/SciViews-K/templates/svMisc_0.9-53.tgz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svMisc_0.9-53.tgz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: komodo/SciViews-K/templates/svMisc_0.9-53.zip
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svMisc_0.9-53.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: komodo/SciViews-K/templates/svSocket_0.9-44.tar.gz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svSocket_0.9-44.tgz
===================================================================
(Binary files differ)
Deleted: komodo/SciViews-K/templates/svSocket_0.9-44.zip
===================================================================
(Binary files differ)
Added: komodo/SciViews-K/templates/svSocket_0.9-48.tar.gz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svSocket_0.9-48.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: komodo/SciViews-K/templates/svSocket_0.9-48.tgz
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svSocket_0.9-48.tgz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: komodo/SciViews-K/templates/svSocket_0.9-48.zip
===================================================================
(Binary files differ)
Property changes on: komodo/SciViews-K/templates/svSocket_0.9-48.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the Sciviews-commits
mailing list