[rkward-cvs] SF.net SVN: rkward:[3899] trunk/rkward/packages/rkwarddev

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Fri Oct 7 15:11:32 UTC 2011


Revision: 3899
          http://rkward.svn.sourceforge.net/rkward/?rev=3899&view=rev
Author:   m-eik
Date:     2011-10-07 15:11:32 +0000 (Fri, 07 Oct 2011)
Log Message:
-----------
rkwarddev: another restructuring of the overwhelmingly many rk.plugin.skeleton() options. there are less options listed now, but it's still a gain in flexibility.

Modified Paths:
--------------
    trunk/rkward/packages/rkwarddev/ChangeLog
    trunk/rkward/packages/rkwarddev/DESCRIPTION
    trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
    trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
    trunk/rkward/packages/rkwarddev/inst/CITATION
    trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd
    trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd

Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog	2011-10-07 08:43:50 UTC (rev 3898)
+++ trunk/rkward/packages/rkwarddev/ChangeLog	2011-10-07 15:11:32 UTC (rev 3899)
@@ -1,5 +1,9 @@
 ChangeLog for package rkwarddev
 
+## 0.03-0 (2011-10-07)
+  - redesigned options for rk.plugin.skeleton() again, to make them more intuitive and flexible
+    at the same time. unfortunately, this breaks backwards compatibility again.
+
 ## 0.02-5 (2011-10-06)
   - added functions rk.rkh.caption(), rk.rkh.link(), rk.rkh.related(), rk.rkh.section(), rk.rkh.setting(),
     rk.rkh.settings(), rk.rkh.summary(), rk.rkh.technical(), rk.rkh.title() and rk.rkh.usage()

Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION	2011-10-07 08:43:50 UTC (rev 3898)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION	2011-10-07 15:11:32 UTC (rev 3899)
@@ -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-5
-Date: 2011-10-06
+Version: 0.03-0
+Date: 2011-10-07
 Collate:
     'echo.R'
     'id.R'

Modified: trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R	2011-10-07 08:43:50 UTC (rev 3898)
+++ trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R	2011-10-07 15:11:32 UTC (rev 3899)
@@ -1,4 +1,4 @@
-#' Create skeleton for RKWard plugins
+#' Generate skeletons for RKWard plugins
 #'
 #' @param name Character sting, name of the plugin package.
 #' @param about A list with descriptive information on the plugin, its authors and dependencies.
@@ -6,51 +6,41 @@
 #'		See \code{\link[rkwarddev:rk.XML.about]{rk.XML.about}} for details and a full list of elements!
 #'		If \code{NULL}, no \code{DESCRIPTION} file will be created either.
 #' @param path Character sting, path to the main directory where the skeleton should be created.
-#' @param dialog An object of class \code{XiMpLe.node} to be pasted as the \code{<dialog>} section. See
-#'		\code{\link[rkwarddev:rk.XML.dialog]{rk.XML.dialog}} for details.
-#' @param wizard An object of class \code{XiMpLe.node} to be pasted as the \code{<wizard>} section. See
-#'		\code{\link[rkwarddev:rk.XML.wizard]{rk.XML.wizard}} for details.
-#' @param logic An object of class \code{XiMpLe.node} to be pasted as the \code{<logic>} section. See
-#'		\code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}} for details.
-#' @param snippets An object of class \code{XiMpLe.node} to be pasted as the \code{<snippets>} section. See
-#'		\code{\link[rkwarddev:rk.XML.snippets]{rk.XML.snippets}} for details.
 #' @param provides Character vector with possible entries of \code{"logic"}, \code{"dialog"} or \code{"wizard"}, defining what
-#'		sections the document should provide even if \code{dialog}, \code{wizard} and \code{logic} are \code{NULL}.
+#'		sections the GUI XML file should provide even if \code{dialog}, \code{wizard} and \code{logic} are \code{NULL}.
 #'		These sections must be edited manually and some parts are therefore commented out.
-#' @param dial.require A character vector with names of R packages that the dialog requires.
+#' @param scan A character vector to trigger various automatic scans of the generated GUI XML file. Valid enties are:
+#'		\itemize{
+#'			\item{\code{"var"}}{Calls \code{\link{rk.JS.scan}} to define all needed variables in the \code{calculate()} function
+#'				of the JavaScript file. These variables will be added to variables defined by the \code{js} option, if any (see below).}
+#'			\item{\code{"saveobj"}}{Calls \code{\link{rk.JS.saveobj}} to generate code to save R results in the \code{printout()}
+#'				function of the JavaScript file. This code will be added to the code defined by the \code{js} option, if any (see below).}
+#'			\item{\code{"settings"}}{Calls \code{\link{rk.rkh.scan}} to generate \code{<setting>} sections for each relevant GUI element in
+#'				the \code{<settings>} section of the help file. This option will be overruled if you provide that section manually
+#'				by the \code{rkh} option (see below).}
+#'		}
+#' @param xml A named list of options to be forwarded to \code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}}, to generate the GUI XML file.
+#'		Not all options are supported because some don't make sense in this context. Valid options are:
+#'		\code{"dialog"}, \code{"wizard"}, \code{"logic"} and \code{"snippets"}.
+#'		If not set, their default values are used. See \code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}} for details.
+#' @param js A named list of options to be forwarded to \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}}, to generate the JavaScript file.
+#'		Not all options are supported because some don't make sense in this context. Valid options are:
+#'		\code{"require"}, \code{"results.header"}, \code{"variables"}, \code{"preprocess"}, \code{"calculate"} and \code{"printout"}.
+#'		If not set, their default values are used. See \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}} for details.
+#' @param pluginmap A named list of options to be forwarded to \code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}}, to generate the pluginmap file.
+#'		Not all options are supported because some don't make sense in this context. Valid options are:
+#'		\code{"hierarchy"} and \code{"require"}.
+#'		If not set, their default values are used. See \code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}} for details.
+#' @param rkh A named list of options to be forwarded to \code{\link[rkwarddev:rk.rkh.doc]{rk.rkh.doc}}, to generate the help file.
+#'		Not all options are supported because some don't make sense in this context. Valid options are:
+#'		\code{"summary"}, \code{"usage"}, \code{"sections"}, \code{"settings"}, \code{"related"} and \code{"technical"}.
+#'		If not set, their default values are used. See \code{\link[rkwarddev:rk.rkh.doc]{rk.rkh.doc}} for details.
+
 #' @param overwrite Logical, whether existing files should be replaced. Defaults to \code{FALSE}.
 #' @param tests Logical, whether directories and files for plugin tests should be created.
 #'		Defaults to \code{TRUE}.
 #' @param lazyLoad Logical, whether the package should be prepared for lazy loading or not. Should be left \code{TRUE},
 #'		unless you have very good reasons not to.
-#' @param menu A character string with instructions where to place the plugin in the menu hierarchy, Valid values are
-#'		\code{"file"}, \code{"edit"}, \code{"view"}, \code{"workspace"}, \code{"run"}, \code{"data"},
-#'		\code{"analysis"}, \code{"plots"}, \code{"distributions"}, \code{"windows"}, \code{"settings"} and \code{"help"}.
-#'		Anything else will place it in a "test" menu.
-#' @param results.header A character string to headline the printed results.
-#' @param JS.prep A character string with JavaScript code to be included in the \code{preprocess()} function of the .js file. This string will be
-#'		pasted as-is, see \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}}.
-#' @param JS.calc Either a character string with JavaScript code to be included in the \code{calculate()} function of the .js file. This string will be
-#'		pasted as-is, see \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}}.
-#' @param JS.prnt A character string with JavaScript code to be included in the \code{printout()} function of the .js file. This string will be
-#'		pasted as-is, see \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}}.
-#' @param var.scan Logical, if \code{TRUE} \code{\link{rk.JS.scan}} will be called automatically to  to define the needed variables
-#'		which will be added to the code in the \code{calculate()} function.
-#' @param saveobj.scan Logical, if \code{TRUE} \code{\link{rk.JS.saveobj}} will be called automatically to generate code to save R results
-#'		which will be appended to the code in the \code{printout()} function.
-#' @param summary An object of class \code{XiMpLe.node} to be pasted as the \code{<summary>} section of the help file. See
-#'		\code{\link[rkwarddev:rk.rkh.summary]{rk.rkh.summary}} for details.
-#' @param usage An object of class \code{XiMpLe.node} to be pasted as the \code{<usage>} section of the help file. See
-#'		\code{\link[rkwarddev:rk.rkh.usage]{rk.rkh.usage}} for details.
-#' @param sections A (list of) objects of class \code{XiMpLe.node} to be pasted as \code{<section>} sections of the help file. See
-#'		\code{\link[rkwarddev:rk.rkh.section]{rk.rkh.section}} for details.
-#' @param settings Either an object of class \code{XiMpLe.node} to be pasted as the \code{<settings>} section of the help file (see
-#'		\code{\link[rkwarddev:rk.rkh.settings]{rk.rkh.settings}} for details), or the special value "scan", in which case
-#'		\code{\link{rk.rkh.scan}} will be called automatically to prepare empty \code{<setting>} nodes according to the plugin structure.
-#' @param related An object of class \code{XiMpLe.node} to be pasted as the \code{<related>} section. See
-#'		\code{\link[rkwarddev:rk.rkh.related]{rk.rkh.related}} for details.
-#' @param technical An object of class \code{XiMpLe.node} to be pasted as the \code{<technical>} section. See
-#'		\code{\link[rkwarddev:rk.rkh.technical]{rk.rkh.technical}} for details.
 #' @param create A character vector with one or more of these possible entries:
 #'		\describe{
 #'			\item{\code{"pmap"}}{Create the \code{.pluginmap} file.}
@@ -66,6 +56,7 @@
 #'		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}).
+#' @param indent.by A character string defining the indentation string to use.
 #' @return Character string with the path to the plugin root directory.
 #' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
 #' @export
@@ -125,14 +116,16 @@
 #'   "Second Tab"), children=list(test.checkboxes, test.vars)))
 #' 
 #' rk.plugin.skeleton("Square the Circle", about=about.info,
-#'   dialog=test.tabbook, overwrite=TRUE)
+#'   xml=list(dialog=test.tabbook), overwrite=TRUE)
 #' }
 
-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, menu="test", results.header=NULL,
-	JS.prep=NULL, JS.calc=NULL, JS.prnt=NULL, var.scan=TRUE, saveobj.scan=TRUE,
-	summary=NULL, usage=NULL, sections=NULL, settings="scan", related=NULL, technical=NULL,
-	create=c("pmap", "xml", "js", "rkh", "desc"), edit=FALSE, load=FALSE, show=FALSE){
+rk.plugin.skeleton <- function(name, about=NULL, path=tempdir(),
+	provides=c("logic", "dialog"),
+	scan=c("var", "saveobj", "settings"),
+	xml=list(), js=list(), pluginmap=list(), rkh=list(),
+	overwrite=FALSE, tests=TRUE, lazyLoad=TRUE,
+	create=c("pmap", "xml", "js", "rkh", "desc"),
+	edit=FALSE, load=FALSE, show=FALSE, indent.by="\t"){
 	# to besure, remove all non-character symbols from name
 	name.orig <- name
 	name <- clean.name(name)
@@ -201,16 +194,22 @@
 	## create plugin.xml
 	if("xml" %in% create){
 		if(isTRUE(checkCreateFiles(plugin.xml))){
+			got.XML.options <- names(xml)
+			for (this.opt in c("dialog", "wizard", "logic", "snippets")){
+				if(!this.opt %in% got.XML.options) {
+					xml[[this.opt]] <- eval(formals(rk.XML.plugin)[[this.opt]])
+				} else {}
+			}
 			XML.plugin <- rk.XML.plugin(
 				name=name,
 				label=name.orig,
-				dialog=dialog,
-				wizard=wizard,
-				logic=logic,
-				snippets=snippets,
+				dialog=xml[["dialog"]],
+				wizard=xml[["wizard"]],
+				logic=xml[["logic"]],
+				snippets=xml[["snippets"]],
 				provides=provides,
 				pluginmap=paste("../", name, ".pluginmap", sep=""))
-			cat(pasteXMLTree(XML.plugin, shine=1), file=plugin.xml)
+			cat(pasteXMLTree(XML.plugin, shine=1, indent.by=indent.by), file=plugin.xml)
 		} else {}
 		if(isTRUE(edit)){
 			rk.edit.files(plugin.xml, title=plugin.fname.xml, prompt=FALSE)
@@ -220,24 +219,30 @@
 	## create plugin.js
 	if("js" %in% create){
 		if(isTRUE(checkCreateFiles(plugin.js))){
-			if(is.null(results.header)){
-				results.header <- paste(name.orig, " results", sep="")
-			} else {}
-			if(isTRUE(var.scan)){
-				variables <- rk.JS.scan(XML.plugin)
-			} else {
-				variables <- NULL
+			# require=c(), variables=NULL, preprocess=NULL, calculate=NULL, printout=NULL, results.header=NULL
+			got.JS.options <- names(js)
+			for (this.opt in c("require", "variables", "preprocess", "calculate", "printout")){
+				if(!this.opt %in% got.JS.options) {
+					js[[this.opt]] <- eval(formals(rk.JS.doc)[[this.opt]])
+				} else {}
 			}
-			if(isTRUE(saveobj.scan)){
-				JS.prnt <- paste(JS.prnt, rk.JS.saveobj(XML.plugin), sep="\n")
+			if(!"results.header" %in% got.JS.options) {
+				js[["results.header"]] <- paste(name.orig, " results", sep="")
 			} else {}
+			if("var" %in% scan){
+				js[["variables"]] <- paste(js[["variables"]], rk.JS.scan(XML.plugin), sep="\n")
+			} else {}
+			if("saveobj" %in% scan){
+				js[["printout"]] <- paste(js[["printout"]], rk.JS.saveobj(XML.plugin), sep="\n")
+			} else {}
 			JS.code <- rk.JS.doc(
-				require=dial.require,
-				variables=variables,
-				results.header=results.header,
-				preprocess=JS.prep,
-				calculate=JS.calc,
-				printout=JS.prnt)
+				require=js[["require"]],
+				variables=js[["variables"]],
+				results.header=js[["results.header"]],
+				preprocess=js[["preprocess"]],
+				calculate=js[["calculate"]],
+				printout=js[["printout"]],
+				indent.by=indent.by)
 			cat(JS.code, file=plugin.js)
 		} else {}
 		if(isTRUE(edit)){
@@ -248,18 +253,26 @@
 	## create plugin.rkh
 	if("rkh" %in% create){
 		if(isTRUE(checkCreateFiles(plugin.rkh))){
-			if(identical(settings, "scan")){
-				settings <- rk.rkh.settings(rk.rkh.scan(XML.plugin))
+			# summary=NULL, usage=NULL, sections=NULL, settings="scan", related=NULL, technical=NULL
+			got.rkh.options <- names(js)
+			# if settings were defined manually, this overwrites the scan
+			if("settings" %in% scan & !"settings" %in% got.rkh.options){
+				rkh[["settings"]] <- rk.rkh.settings(rk.rkh.scan(XML.plugin))
 			} else {}
+			for (this.opt in c("summary", "usage", "sections", "settings", "related", "technical")){
+				if(!this.opt %in% got.rkh.options) {
+					rkh[[this.opt]] <- eval(formals(rk.rkh.doc)[[this.opt]])
+				} else {}
+			}
 			rkh.doc <- rk.rkh.doc(
-				summary=summary,
-				usage=usage,
-				sections=sections,
-				settings=settings,
-				related=related,
-				technical=technical,
+				summary=rkh[["summary"]],
+				usage=rkh[["usage"]],
+				sections=rkh[["sections"]],
+				settings=rkh[["settings"]],
+				related=rkh[["related"]],
+				technical=rkh[["technical"]],
 				title=rk.rkh.title(name.orig))
-			cat(pasteXMLTree(rkh.doc, shine=1), file=plugin.rkh)
+			cat(pasteXMLTree(rkh.doc, shine=1, indent.by=indent.by), file=plugin.rkh)
 		} else {}
 		if(isTRUE(edit)){
 			rk.edit.files(plugin.rkh, title=plugin.fname.rkh, prompt=FALSE)
@@ -269,13 +282,20 @@
 	## create plugin.pluginmap
 	if("pmap" %in% create){
 		if(isTRUE(checkCreateFiles(plugin.pluginmap))){
+			got.pm.options <- names(pluginmap)
+			for (this.opt in c("hierarchy", "require")){
+				if(!this.opt %in% got.pm.options) {
+					pluginmap[[this.opt]] <- eval(formals(rk.XML.pluginmap)[[this.opt]])
+				} else {}
+			}
 			XML.pluginmap <- rk.XML.pluginmap(
 				name=name.orig,
 				about=about,
 				components=paste("plugins/", name, ".xml", sep=""),
-				hierarchy=as.character(menu),
+				hierarchy=pluginmap[["hierarchy"]],
+				require=pluginmap[["require"]],
 				hints=TRUE)
-			cat(pasteXMLTree(XML.pluginmap, shine=2), file=plugin.pluginmap)
+			cat(pasteXMLTree(XML.pluginmap, shine=2, indent.by=indent.by), file=plugin.pluginmap)
 		} else {}
 		if(isTRUE(edit)){
 			rk.edit.files(plugin.pluginmap, title=plugin.fname.pluginmap, prompt=FALSE)

Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R	2011-10-07 08:43:50 UTC (rev 3898)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R	2011-10-07 15:11:32 UTC (rev 3899)
@@ -3,8 +3,8 @@
 #' \tabular{ll}{
 #' Package: \tab rkwarddev\cr
 #' Type: \tab Package\cr
-#' Version: \tab 0.02-5\cr
-#' Date: \tab 2011-10-06\cr
+#' Version: \tab 0.03-0\cr
+#' Date: \tab 2011-10-07\cr
 #' Depends: \tab R (>= 2.9.0),XiMpLe,rkward (>= 0.5.6)\cr
 #' Enhances: \tab rkward\cr
 #' Encoding: \tab UTF-8\cr

Modified: trunk/rkward/packages/rkwarddev/inst/CITATION
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/CITATION	2011-10-07 08:43:50 UTC (rev 3898)
+++ trunk/rkward/packages/rkwarddev/inst/CITATION	2011-10-07 15:11:32 UTC (rev 3899)
@@ -2,12 +2,12 @@
 		title="rkwarddev: A collection of tools for RKWard plugin development",
 		author="Meik Michalke",
 		year="2011",
-		note="(Version 0.02-5)",
+		note="(Version 0.03-0)",
 		url="http://rkward.sourceforge.net",
 
 		textVersion =
 		paste("Michalke, M. (2011). ",
-				"rkwarddev: A collection of tools for RKWard plugin development (Version 0.02-5). ",
+				"rkwarddev: A collection of tools for RKWard plugin development (Version 0.03-0). ",
 				"Available from http://rkward.sourceforge.net",
 				sep=""),
 

Modified: trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd	2011-10-07 08:43:50 UTC (rev 3898)
+++ trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd	2011-10-07 15:11:32 UTC (rev 3899)
@@ -1,17 +1,14 @@
 \name{rk.plugin.skeleton}
 \alias{rk.plugin.skeleton}
-\title{Create skeleton for RKWard plugins}
+\title{Generate skeletons for RKWard plugins}
 \usage{
   rk.plugin.skeleton(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,
-  menu = "test", results.header = NULL, JS.prep = NULL,
-  JS.calc = NULL, JS.prnt = NULL, var.scan = TRUE,
-  saveobj.scan = TRUE, summary = NULL, usage = NULL,
-  sections = NULL, settings = "scan", related = NULL,
-  technical = NULL, create = c("pmap", "xml", "js", "rkh",
-  "desc"), edit = FALSE, load = FALSE, show = FALSE)
+  provides = c("logic", "dialog"), scan = c("var",
+  "saveobj", "settings"), xml = list(), js = list(),
+  pluginmap = list(), rkh = list(), overwrite = FALSE,
+  tests = TRUE, lazyLoad = TRUE, create = c("pmap", "xml",
+  "js", "rkh", "desc"), edit = FALSE, load = FALSE, show =
+  FALSE, indent.by = "\t")
 }
 \arguments{
   \item{name}{Character sting, name of the plugin package.}
@@ -26,36 +23,75 @@
   \item{path}{Character sting, path to the main directory
   where the skeleton should be created.}
 
-  \item{dialog}{An object of class \code{XiMpLe.node} to be
-  pasted as the \code{<dialog>} section. See
-  \code{\link[rkwarddev:rk.XML.dialog]{rk.XML.dialog}} for
-  details.}
+  \item{provides}{Character vector with possible entries of
+  \code{"logic"}, \code{"dialog"} or \code{"wizard"},
+  defining what sections the GUI XML file should provide
+  even if \code{dialog}, \code{wizard} and \code{logic} are
+  \code{NULL}. These sections must be edited manually and
+  some parts are therefore commented out.}
 
-  \item{wizard}{An object of class \code{XiMpLe.node} to be
-  pasted as the \code{<wizard>} section. See
-  \code{\link[rkwarddev:rk.XML.wizard]{rk.XML.wizard}} for
+  \item{scan}{A character vector to trigger various
+  automatic scans of the generated GUI XML file. Valid
+  enties are: \itemize{ \item{\code{"var"}}{Calls
+  \code{\link{rk.JS.scan}} to define all needed variables
+  in the \code{calculate()} function of the JavaScript
+  file. These variables will be added to variables defined
+  by the \code{js} option, if any (see below).}
+  \item{\code{"saveobj"}}{Calls \code{\link{rk.JS.saveobj}}
+  to generate code to save R results in the
+  \code{printout()} function of the JavaScript file. This
+  code will be added to the code defined by the \code{js}
+  option, if any (see below).}
+  \item{\code{"settings"}}{Calls \code{\link{rk.rkh.scan}}
+  to generate \code{<setting>} sections for each relevant
+  GUI element in the \code{<settings>} section of the help
+  file. This option will be overruled if you provide that
+  section manually by the \code{rkh} option (see below).}
+  }}
+
+  \item{xml}{A named list of options to be forwarded to
+  \code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}}, to
+  generate the GUI XML file. Not all options are supported
+  because some don't make sense in this context. Valid
+  options are: \code{"dialog"}, \code{"wizard"},
+  \code{"logic"} and \code{"snippets"}. If not set, their
+  default values are used. See
+  \code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}} for
   details.}
 
-  \item{logic}{An object of class \code{XiMpLe.node} to be
-  pasted as the \code{<logic>} section. See
-  \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}} for
+  \item{js}{A named list of options to be forwarded to
+  \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}}, to generate
+  the JavaScript file. Not all options are supported
+  because some don't make sense in this context. Valid
+  options are: \code{"require"}, \code{"results.header"},
+  \code{"variables"}, \code{"preprocess"},
+  \code{"calculate"} and \code{"printout"}. If not set,
+  their default values are used. See
+  \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}} for
   details.}
 
-  \item{snippets}{An object of class \code{XiMpLe.node} to
-  be pasted as the \code{<snippets>} section. See
-  \code{\link[rkwarddev:rk.XML.snippets]{rk.XML.snippets}}
+  \item{pluginmap}{A named list of options to be forwarded
+  to
+  \code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}},
+  to generate the pluginmap file. Not all options are
+  supported because some don't make sense in this context.
+  Valid options are: \code{"hierarchy"} and
+  \code{"require"}. If not set, their default values are
+  used. See
+  \code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}}
   for details.}
 
-  \item{provides}{Character vector with possible entries of
-  \code{"logic"}, \code{"dialog"} or \code{"wizard"},
-  defining what sections the document should provide even
-  if \code{dialog}, \code{wizard} and \code{logic} are
-  \code{NULL}. These sections must be edited manually and
-  some parts are therefore commented out.}
+  \item{rkh}{A named list of options to be forwarded to
+  \code{\link[rkwarddev:rk.rkh.doc]{rk.rkh.doc}}, to
+  generate the help file. Not all options are supported
+  because some don't make sense in this context. Valid
+  options are: \code{"summary"}, \code{"usage"},
+  \code{"sections"}, \code{"settings"}, \code{"related"}
+  and \code{"technical"}. If not set, their default values
+  are used. See
+  \code{\link[rkwarddev:rk.rkh.doc]{rk.rkh.doc}} for
+  details.}
 
-  \item{dial.require}{A character vector with names of R
-  packages that the dialog requires.}
-
   \item{overwrite}{Logical, whether existing files should
   be replaced. Defaults to \code{FALSE}.}
 
@@ -66,79 +102,6 @@
   prepared for lazy loading or not. Should be left
   \code{TRUE}, unless you have very good reasons not to.}
 
-  \item{menu}{A character string with instructions where to
-  place the plugin in the menu hierarchy, Valid values are
-  \code{"file"}, \code{"edit"}, \code{"view"},
-  \code{"workspace"}, \code{"run"}, \code{"data"},
-  \code{"analysis"}, \code{"plots"},
-  \code{"distributions"}, \code{"windows"},
-  \code{"settings"} and \code{"help"}. Anything else will
-  place it in a "test" menu.}
-
-  \item{results.header}{A character string to headline the
-  printed results.}
-
-  \item{JS.prep}{A character string with JavaScript code to
-  be included in the \code{preprocess()} function of the
-  .js file. This string will be pasted as-is, see
-  \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}}.}
-
-  \item{JS.calc}{Either a character string with JavaScript
-  code to be included in the \code{calculate()} function of
-  the .js file. This string will be pasted as-is, see
-  \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}}.}
-
-  \item{JS.prnt}{A character string with JavaScript code to
-  be included in the \code{printout()} function of the .js
-  file. This string will be pasted as-is, see
-  \code{\link[rkwarddev:rk.JS.doc]{rk.JS.doc}}.}
-
-  \item{var.scan}{Logical, if \code{TRUE}
-  \code{\link{rk.JS.scan}} will be called automatically to
-  to define the needed variables which will be added to the
-  code in the \code{calculate()} function.}
-
-  \item{saveobj.scan}{Logical, if \code{TRUE}
-  \code{\link{rk.JS.saveobj}} will be called automatically
-  to generate code to save R results which will be appended
-  to the code in the \code{printout()} function.}
-
-  \item{summary}{An object of class \code{XiMpLe.node} to
-  be pasted as the \code{<summary>} section of the help
-  file. See
-  \code{\link[rkwarddev:rk.rkh.summary]{rk.rkh.summary}}
-  for details.}
-
-  \item{usage}{An object of class \code{XiMpLe.node} to be
-  pasted as the \code{<usage>} section of the help file.
-  See \code{\link[rkwarddev:rk.rkh.usage]{rk.rkh.usage}}
-  for details.}
-
-  \item{sections}{A (list of) objects of class
-  \code{XiMpLe.node} to be pasted as \code{<section>}
-  sections of the help file. See
-  \code{\link[rkwarddev:rk.rkh.section]{rk.rkh.section}}
-  for details.}
-
-  \item{settings}{Either an object of class
-  \code{XiMpLe.node} to be pasted as the \code{<settings>}
-  section of the help file (see
-  \code{\link[rkwarddev:rk.rkh.settings]{rk.rkh.settings}}
-  for details), or the special value "scan", in which case
-  \code{\link{rk.rkh.scan}} will be called automatically to
-  prepare empty \code{<setting>} nodes according to the
-  plugin structure.}
-
-  \item{related}{An object of class \code{XiMpLe.node} to
-  be pasted as the \code{<related>} section. See
-  \code{\link[rkwarddev:rk.rkh.related]{rk.rkh.related}}
-  for details.}
-
-  \item{technical}{An object of class \code{XiMpLe.node} to
-  be pasted as the \code{<technical>} section. See
-  \code{\link[rkwarddev:rk.rkh.technical]{rk.rkh.technical}}
-  for details.}
-
   \item{create}{A character vector with one or more of
   these possible entries: \describe{
   \item{\code{"pmap"}}{Create the \code{.pluginmap} file.}
@@ -166,13 +129,16 @@
   \code{create}, RKWard will automatically call the created
   plugin after it was loaded (i.e., this implies and also
   sets \code{load=TRUE}).}
+
+  \item{indent.by}{A character string defining the
+  indentation string to use.}
 }
 \value{
   Character string with the path to the plugin root
   directory.
 }
 \description{
-  Create skeleton for RKWard plugins
+  Generate skeletons for RKWard plugins
 }
 \examples{
 \dontrun{
@@ -230,7 +196,7 @@
 "Second Tab"), children=list(test.checkboxes, test.vars)))
 
 rk.plugin.skeleton("Square the Circle", about=about.info,
-dialog=test.tabbook, overwrite=TRUE)
+xml=list(dialog=test.tabbook), overwrite=TRUE)
 }
 }
 \seealso{

Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd	2011-10-07 08:43:50 UTC (rev 3898)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd	2011-10-07 15:11:32 UTC (rev 3899)
@@ -8,8 +8,8 @@
 }
 \details{
   \tabular{ll}{ Package: \tab rkwarddev\cr Type: \tab
-  Package\cr Version: \tab 0.02-5\cr Date: \tab
-  2011-10-06\cr Depends: \tab R (>= 2.9.0),XiMpLe,rkward
+  Package\cr Version: \tab 0.03-0\cr Date: \tab
+  2011-10-07\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 }

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