[rkward-cvs] SF.net SVN: rkward:[3859] trunk/rkward/rkward/rbackend/rpackages/rkwarddev
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Thu Sep 29 08:07:20 UTC 2011
Revision: 3859
http://rkward.svn.sourceforge.net/rkward/?rev=3859&view=rev
Author: m-eik
Date: 2011-09-29 08:07:19 +0000 (Thu, 29 Sep 2011)
Log Message:
-----------
rkwarddev: added "load" and "show" feature to rk.plugin.skeleton()
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/ChangeLog
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/DESCRIPTION
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.pluginmap.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.plugin.skeleton.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rkwarddev-desc-internal.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rkwarddev-package.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/inst/CITATION
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.plugin.skeleton.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rkwarddev-package.Rd
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/ChangeLog 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/ChangeLog 2011-09-29 08:07:19 UTC (rev 3859)
@@ -1,5 +1,8 @@
ChangeLog for package rkwarddev
+## 0.02-2 (2011-09-29)
+ - added "load" and "show" options to rk.plugin.skeleton() to call rk.load.pluginmaps() and the plugin itself
+
## 0.02-1 (2011-09-28)
- added functions rk.XML.insert(), rk.XML.include(), rk.XML.embed(), rk.XML.preview(),
rk.XML.snippet(), and rk.XML.snippets()
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/DESCRIPTION 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/DESCRIPTION 2011-09-29 08:07:19 UTC (rev 3859)
@@ -4,7 +4,7 @@
Author: m.eik michalke <meik.michalke at hhu.de>
Maintainer: m.eik michalke <meik.michalke at hhu.de>
Depends:
- R (>= 2.9.0),XiMpLe,rkward
+ R (>= 2.9.0),XiMpLe,rkward (>= 0.5.6)
Enhances: rkward
Description: Provides functions to create plugin skeletons
and XML structures for RKWard.
@@ -14,8 +14,8 @@
URL: http://rkward.sourceforge.net
Authors at R: c(person(given="Meik", family="Michalke",
email="meik.michalke at hhu.de", role=c("aut", "cre")))
-Version: 0.02-1
-Date: 2011-09-28
+Version: 0.02-2
+Date: 2011-09-29
Collate:
'rk-internal.R'
'rk.JS.array.R'
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.pluginmap.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.pluginmap.R 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.pluginmap.R 2011-09-29 08:07:19 UTC (rev 3859)
@@ -44,6 +44,7 @@
name="component",
attributes=list(
type="standard",
+ # if this ID get's a change, also change it in rk.plugin.skeleton(show=TRUE)!
id=paste(name, ".", gsub(".xml", "", this.comp), sep=""),
file=paste(plugin.dir, "/", this.comp, sep=""),
label=gsub(".xml", "", this.comp))
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.plugin.skeleton.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.plugin.skeleton.R 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.plugin.skeleton.R 2011-09-29 08:07:19 UTC (rev 3859)
@@ -40,6 +40,10 @@
#' Default is to create all of these files. Existing files will only be overwritten if \code{overwrite=TRUE}.
#' @param edit Logical, if \code{TRUE} RKWard will automatically open the created files for editing, by calling \code{rk.edit.files}.
#' This applies to all files defined in \code{create}.
+#' @param load Logical, if \code{TRUE} and \code{"pmap"} in \code{create}, RKWard will automatically add the created .pluginmap file
+#' to its menu structure by calling \code{rk.load.pluginmaps}. You can then try the plugin immediately.
+#' @param show Logical, if \code{TRUE} and \code{"pmap"} in \code{create}, RKWard will automatically call the created plugin after
+#' it was loaded (i.e., this implies and also sets \code{load=TRUE}).
#' @export
#' @examples
#' \dontrun{
@@ -102,7 +106,7 @@
rk.plugin.skeleton <- function(name, about=NULL, path=tempdir(), dialog=NULL, wizard=NULL, logic=NULL, snippets=NULL,
provides=c("logic", "dialog"), dial.require=c(), overwrite=FALSE, tests=TRUE, lazyLoad=TRUE,
- JS.prep=NULL, JS.calc=NULL, JS.prnt=NULL, create=c("pmap", "xml", "js", "rkh", "desc"), edit=FALSE){
+ JS.prep=NULL, JS.calc=NULL, JS.prnt=NULL, create=c("pmap", "xml", "js", "rkh", "desc"), edit=FALSE, load=FALSE, show=FALSE){
# to besure, remove all non-character symbols from name
name.orig <- name
name <- clean.name(name)
@@ -217,10 +221,17 @@
components=paste(name, ".xml", sep=""),
plugin.dir="plugins",
hierarchy="analysis")
- cat(pasteXMLTree(XML.pluginmap), file=plugin.pluginmap)
+ cat(pasteXMLTree(XML.pluginmap, shine=2), file=plugin.pluginmap)
if(isTRUE(edit)){
rk.edit.files(plugin.pluginmap, title=plugin.fname.pluginmap, prompt=FALSE)
} else {}
+ if(isTRUE(load) | isTRUE(show)){
+ rk.load.pluginmaps(plugin.pluginmap)
+ if(isTRUE(show)){
+ # call the plugin; reconstructed the ID generation from rk.XML.pluginmap()
+ rk.call.plugin(paste("rkward::", name, ".", name, sep=""))
+ } else {}
+ } else {}
} else {}
## create testsuite.R
@@ -237,6 +248,7 @@
include=c("given", "family", "email"), braces=list(email=c("<", ">")))
## TODO: check and add the commented values here:
+## especially dependencies must be created from 'about'
desc <- data.frame(
Package=name,
Type="Package",
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rkwarddev-desc-internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rkwarddev-desc-internal.R 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rkwarddev-desc-internal.R 2011-09-29 08:07:19 UTC (rev 3859)
@@ -9,7 +9,10 @@
AuthorsR="c(person(given=\"Meik\", family=\"Michalke\", email=\"meik.michalke at hhu.de\",
role=c(\"aut\", \"cre\")))",
Maintainer="m.eik michalke <meik.michalke at hhu.de>",
- Depends="R (>= 2.9.0),XiMpLe,rkward",
+## TODO:
+## need this for rk.load.pluginmaps()
+## Depends="R (>= 2.9.0),XiMpLe,rkward (>= 0.5.7)",
+ Depends="R (>= 2.9.0),XiMpLe,rkward (>= 0.5.6)",
Enhances="rkward",
Description="Provides functions to create plugin skeletons and XML structures for RKWard.",
License="GPL (>= 3)",
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rkwarddev-package.R 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rkwarddev-package.R 2011-09-29 08:07:19 UTC (rev 3859)
@@ -3,9 +3,9 @@
#' \tabular{ll}{
#' Package: \tab rkwarddev\cr
#' Type: \tab Package\cr
-#' Version: \tab 0.02-1\cr
-#' Date: \tab 2011-09-28\cr
-#' Depends: \tab R (>= 2.9.0),XiMpLe,rkward\cr
+#' Version: \tab 0.02-2\cr
+#' Date: \tab 2011-09-29\cr
+#' Depends: \tab R (>= 2.9.0),XiMpLe,rkward (>= 0.5.6)\cr
#' Enhances: \tab rkward\cr
#' Encoding: \tab UTF-8\cr
#' License: \tab GPL (>= 3)\cr
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/inst/CITATION
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/inst/CITATION 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/inst/CITATION 2011-09-29 08:07:19 UTC (rev 3859)
@@ -2,12 +2,12 @@
title="rkwarddev: A collection of tools for RKWard plugin development",
author="Meik Michalke",
year="2011",
- note="(Version 0.02-1)",
+ note="(Version 0.02-2)",
url="http://rkward.sourceforge.net",
textVersion =
paste("Michalke, M. (2011). ",
- "rkwarddev: A collection of tools for RKWard plugin development (Version 0.02-1). ",
+ "rkwarddev: A collection of tools for RKWard plugin development (Version 0.02-2). ",
"Available from http://rkward.sourceforge.net",
sep=""),
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.plugin.skeleton.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.plugin.skeleton.Rd 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.plugin.skeleton.Rd 2011-09-29 08:07:19 UTC (rev 3859)
@@ -7,7 +7,8 @@
NULL, provides = c("logic", "dialog"), dial.require =
c(), overwrite = FALSE, tests = TRUE, lazyLoad = TRUE,
JS.prep = NULL, JS.calc = NULL, JS.prnt = NULL, create =
- c("pmap", "xml", "js", "rkh", "desc"), edit = FALSE)
+ c("pmap", "xml", "js", "rkh", "desc"), edit = FALSE, load
+ = FALSE, show = FALSE)
}
\arguments{
\item{name}{Character sting, name of the plugin package.}
@@ -93,6 +94,17 @@
automatically open the created files for editing, by
calling \code{rk.edit.files}. This applies to all files
defined in \code{create}.}
+
+ \item{load}{Logical, if \code{TRUE} and \code{"pmap"} in
+ \code{create}, RKWard will automatically add the created
+ .pluginmap file to its menu structure by calling
+ \code{rk.load.pluginmaps}. You can then try the plugin
+ immediately.}
+
+ \item{show}{Logical, if \code{TRUE} and \code{"pmap"} in
+ \code{create}, RKWard will automatically call the created
+ plugin after it was loaded (i.e., this implies and also
+ sets \code{load=TRUE}).}
}
\description{
Create skeleton for RKWard plugins
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rkwarddev-package.Rd 2011-09-28 19:42:09 UTC (rev 3858)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rkwarddev-package.Rd 2011-09-29 08:07:19 UTC (rev 3859)
@@ -8,11 +8,11 @@
}
\details{
\tabular{ll}{ Package: \tab rkwarddev\cr Type: \tab
- Package\cr Version: \tab 0.02-1\cr Date: \tab
- 2011-09-28\cr Depends: \tab R (>= 2.9.0),XiMpLe,rkward\cr
- Enhances: \tab rkward\cr Encoding: \tab UTF-8\cr License:
- \tab GPL (>= 3)\cr LazyLoad: \tab yes\cr URL: \tab
- http://rkward.sourceforge.net\cr }
+ Package\cr Version: \tab 0.02-2\cr Date: \tab
+ 2011-09-29\cr Depends: \tab R (>= 2.9.0),XiMpLe,rkward
+ (>= 0.5.6)\cr Enhances: \tab rkward\cr Encoding: \tab
+ UTF-8\cr License: \tab GPL (>= 3)\cr LazyLoad: \tab
+ yes\cr URL: \tab http://rkward.sourceforge.net\cr }
Provides functions to create plugin skeletons and XML
structures for RKWard.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list