[rkward-cvs] SF.net SVN: rkward-code:[4896] trunk/rkward/packages/rkwarddev
m-eik at users.sf.net
m-eik at users.sf.net
Sun Oct 12 18:07:15 UTC 2014
Revision: 4896
http://sourceforge.net/p/rkward/code/4896
Author: m-eik
Date: 2014-10-12 18:07:13 +0000 (Sun, 12 Oct 2014)
Log Message:
-----------
rkwarddev: added rkwarddev.required() and fixing issues with comments instead of actual nodes for plugin skeletons
Modified Paths:
--------------
trunk/rkward/packages/rkwarddev/ChangeLog
trunk/rkward/packages/rkwarddev/DESCRIPTION
trunk/rkward/packages/rkwarddev/NAMESPACE
trunk/rkward/packages/rkwarddev/R/rk-internal.R
trunk/rkward/packages/rkwarddev/R/rk.XML.component.R
trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R
trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R
trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
trunk/rkward/packages/rkwarddev/R/rk.rkh.scan.R
trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R
trunk/rkward/packages/rkwarddev/inst/NEWS.Rd
trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
trunk/rkward/packages/rkwarddev/man/rk.XML.optionset.Rd
trunk/rkward/packages/rkwarddev/man/rk.rkh.scan.Rd
Added Paths:
-----------
trunk/rkward/packages/rkwarddev/R/rkwarddev.required.R
trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh
trunk/rkward/packages/rkwarddev/man/rkwarddev.required.Rd
Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/ChangeLog 2014-10-12 18:07:13 UTC (rev 4896)
@@ -1,10 +1,11 @@
ChangeLog for package rkwarddev
-changes in version 0.06-5 (2014-10-11)
+changes in version 0.06-5 (2014-10-12)
fixed:
- the "show" feature in rk.plugin.skeleton() was broken due to changes in the namespace defaults
- scanning plugin XML code for JS and help related content didn't work as expected in rk.plugin.component()
- rk.rkh.scan() now also recognises <optioncolumn> and <matrix> nodes
+ - a logical bug prevented rk.plugin.component() to run with default values for XML
added:
- new functions rk.set.rkh.prompter() and rk.get.rkh.prompter() to make it easier to generate help files
(later...)
@@ -13,6 +14,8 @@
- all functions scanned by rk.rkh.scan() for setting nodes in .rkh files have gained two additional arguments,
"help" and "component", to register the text to be used via rk.set.rkh.prompter()
- new function rk.XMLoption() to allow setting and accessing IDs for single options as well
+changed:
+ - updated the plugin skeleton example script; e.g., it now uses the new .rkh file generating features
changes in version 0.06-4 (2014-09-14)
added:
Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION 2014-10-12 18:07:13 UTC (rev 4896)
@@ -117,6 +117,7 @@
'rk.uniqueIDs.R'
'rkwarddev-desc-internal.R'
'rkwarddev-package.R'
+ 'rkwarddev.required.R'
'show-methods.R'
'tf.R'
'zzz.rk.plot.opts-class.R'
Modified: trunk/rkward/packages/rkwarddev/NAMESPACE
===================================================================
--- trunk/rkward/packages/rkwarddev/NAMESPACE 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/NAMESPACE 2014-10-12 18:07:13 UTC (rev 4896)
@@ -92,6 +92,7 @@
export(rk.set.language)
export(rk.set.rkh.prompter)
export(rk.testsuite.doc)
+export(rkwarddev.required)
export(tf)
exportClasses(rk.JS.arr)
exportClasses(rk.JS.ite)
Modified: trunk/rkward/packages/rkwarddev/R/rk-internal.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk-internal.R 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/R/rk-internal.R 2014-10-12 18:07:13 UTC (rev 4896)
@@ -559,7 +559,12 @@
if(is.XiMpLe.node(node)){
# check if this is *really* a about section, otherwise die of boredom
if(!XMLName(node) %in% c("about", "dependencies")){
- stop(simpleError("Please provide a valid about or dependencies section!"))
+ # are these perhaps commented out? then just quit silently
+ if(XMLName(node) %in% "!--"){
+ return("")
+ } else {
+ stop(simpleError("Please provide a valid about or dependencies section!"))
+ }
} else {}
} else {
stop(simpleError("'about' and/or 'dependencies' must be XiMpLe.nodes, see ?rk.XML.about() and ?rk.XML.dependencies()!"))
@@ -814,12 +819,15 @@
# - see: name of the function to check docs for
# - arg.name: optional argument name of a function where valid.parent() is called from,
# e.g. if an object is given via "cbox" but checked for "checkbox"
-valid.parent <- function(parent, node, warn=FALSE, see=NULL, arg.name=NULL){
+valid.parent <- function(parent, node, warn=FALSE, see=NULL, arg.name=NULL, comment.ok=FALSE){
if(is.XiMpLe.node(node)){
node.name <- XMLName(node)
if(identical(node.name, parent)){
return(TRUE)
} else {
+ if(isTRUE(comment.ok) & identical(node.name, "!--")){
+ return(TRUE)
+ } else {}
if(is.null(arg.name)){
arg.name <- parent
} else {}
@@ -1164,7 +1172,7 @@
if(!is.null(dependencies)){
# check if this is *really* a dependencies section
- valid.parent("dependencies", node=dependencies, see="rk.XML.dependencies")
+ valid.parent("dependencies", node=dependencies, see="rk.XML.dependencies", comment.ok=TRUE)
results[["dependencies"]] <- dependencies
} else if(is.XiMpLe.node(deps.in.about)){
results[["dependencies"]] <- deps.in.about
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.component.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.component.R 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.component.R 2014-10-12 18:07:13 UTC (rev 4896)
@@ -59,7 +59,7 @@
# does this component hava additional dependencies?
if(!is.null(dependencies)){
# check if this is *really* a dependencies section
- valid.parent("dependencies", node=dependencies, see="rk.XML.dependencies")
+ valid.parent("dependencies", node=dependencies, see="rk.XML.dependencies", comment.ok=TRUE)
dependencies <- child.list(dependencies)
} else {
dependencies <- list("")
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.optionset.R 2014-10-12 18:07:13 UTC (rev 4896)
@@ -22,7 +22,7 @@
#' you need is a combination of \code{<optionset id>.<optioncolumn id>.<modifier>}. that is,
#' you must always prefix it with the sets' \code{id}. For JavaScript code generating with
#' \code{rkwarddev}, you can use the ID that functions like \code{\link[rkwarddev:id]{id}} return,
-#' because the JavaScript variable name will only contain a constant prefix ("ocol") an the column ID.
+#' because the JavaScript variable name will only contain a constant prefix ("ocol") and the column ID.
#'
#' @note The \code{<optionset>} node was introduced with RKWard 0.6.1, please set the dependencies
#' of your component/plugin accordingly.
Modified: trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/R/rk.plugin.component.R 2014-10-12 18:07:13 UTC (rev 4896)
@@ -108,7 +108,7 @@
# to besure, remove all non-character symbols from name
name.orig <- name
name <- clean.name(name)
-
+
# check hierarchy
if(is.null(hierarchy)){
hierarchy <- list()
@@ -144,10 +144,10 @@
gen.info=gen.info)
# make sure there's no duplicate IDs
stopifnot(rk.uniqueIDs(XML.plugin, bool=TRUE))
- slot(this.component, "xml") <- XML.plugin
} else {
- slot(this.component, "xml") <- rk.XML.plugin("")
+ XML.plugin <- rk.XML.plugin("")
}
+ slot(this.component, "xml") <- XML.plugin
## create plugin.js
js.try.scan <- function(XML.plugin, scan, js, guess.getter){
@@ -204,8 +204,13 @@
# if settings were defined manually, this overwrites the scan
if(!"settings" %in% got.rkh.options){
if("settings" %in% scan){
- rkh[["settings"]] <- rk.rkh.settings(rk.rkh.scan(XML.plugin, component=name.orig))
+ this.settings <- rk.rkh.scan(XML.plugin, component=name.orig)
} else {
+ this.settings <- NULL
+ }
+ if(!is.null(this.settings)){
+ rkh[["settings"]] <- rk.rkh.settings(this.settings)
+ } else {
rkh[["settings"]] <- eval(formals(rk.rkh.doc)[["settings"]])
}
} else {}
@@ -227,7 +232,10 @@
slot(this.component, "rkh") <- rkh.doc
} else {
if("rkh" %in% create & "settings" %in% scan){
- rkh[["settings"]] <- rk.rkh.settings(rk.rkh.scan(XML.plugin, component=name.orig))
+ this.settings <- rk.rkh.scan(XML.plugin, component=name.orig)
+ if(!is.null(this.settings)){
+ rkh[["settings"]] <- rk.rkh.settings(this.settings)
+ } else {}
} else {}
slot(this.component, "rkh") <- rk.rkh.doc(settings=rkh[["settings"]], hints=hints)
}
Modified: trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R 2014-10-12 18:07:13 UTC (rev 4896)
@@ -184,7 +184,7 @@
# to besure, remove all non-character symbols from name
name.orig <- name
name <- clean.name(name)
-
+
# check for i18n
if(!is.null(lang)){
translate <- TRUE
Modified: trunk/rkward/packages/rkwarddev/R/rk.rkh.scan.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.rkh.scan.R 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/R/rk.rkh.scan.R 2014-10-12 18:07:13 UTC (rev 4896)
@@ -24,7 +24,7 @@
#' @param captions Logical, if \code{TRUE} captions will be generated for all "page", "tab" and "frame" nodes.
#' @param component Character string, name of the scanned component. Only needed if you want to search for
#' help text provided by \code{\link[rkwarddev:rk.set.rkh.prompter]{rk.set.rkh.prompter}}.
-#' @return A character vector or a list of XiMpLe.node objects.
+#' @return A character vector or a list of XiMpLe.node objects. Returns \code{NULL} if no documentable nodes are found.
#' @seealso \href{help:rkwardplugins}{Introduction to Writing Plugins for RKWard}
#' @export
Added: trunk/rkward/packages/rkwarddev/R/rkwarddev.required.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev.required.R (rev 0)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev.required.R 2014-10-12 18:07:13 UTC (rev 4896)
@@ -0,0 +1,34 @@
+# Copyright 2014 Meik Michalke <meik.michalke at hhu.de>
+#
+# This file is part of the R package rkwarddev.
+#
+# rkwarddev is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# rkwarddev is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with rkwarddev. If not, see <http://www.gnu.org/licenses/>.
+
+#' Check for rkwarddev package version requirements
+#'
+#' @param min The minimum version number of rkwarddev that is required to run this script.
+#' @param lib.loc The \code{lib.loc} argument passed over to \code{\link[utils:packageVersion]{packageVersion}}.
+#' @return The function has no return value, but wil stop with an error if the specified version requirement is not met.
+#' @export
+#' @examples
+#' rkwarddev.required(min="0.06-5")
+
+rkwarddev.required <- function(min="0.06-5", lib.loc=NULL){
+
+ if(packageVersion("rkwarddev") < min){
+ stop(simpleError("please upgrade the rkwarddev package, it is too old to run this script."))
+ } else {}
+
+ return(invisible(NULL))
+}
Modified: trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R
===================================================================
--- trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R 2014-10-12 18:07:13 UTC (rev 4896)
@@ -1,229 +1,282 @@
## create dialog to build a plugin skeleton
require(rkwarddev)
+rkwarddev.required("0.06-5")
local({
# define where the plugin should write its files
output.dir <- tempdir()
+# overwrite an existing plugin in output.dir?
+overwrite <- TRUE
about.info <- rk.XML.about(
- name="RKWard Plugin Skeleton",
- author=c(
- person(given="Meik", family="Michalke",
- email="meik.michalke at hhu.de", role=c("aut","cre"))),
- about=list(desc="GUI interface to create RKWard plugin skeletons",
- # the version number should be in line with rkwarddev
- # to reflect when the script code was changed
- version="0.06-2", url="http://rkward.sf.net")
- )
+ name="RKWard Plugin Skeleton",
+ author=c(
+ person(given="Meik", family="Michalke",
+ email="meik.michalke at hhu.de", role=c("aut","cre"))),
+ about=list(desc="GUI interface to create RKWard plugin skeletons",
+ # the version number should be in line with rkwarddev
+ # to reflect when the script code was changed
+ version="0.06-5", url="http://rkward.sf.net")
+ )
dependencies.info <- rk.XML.dependencies(dependencies=list(rkward.min="0.6.0"))
+rk.set.comp("Create RKWard plugin skeleton")
+
# tab1: information on the thing
about.plugin <- rk.XML.frame(
- rk.XML.row(
- pl.name <- rk.XML.input("Plugin name", required=TRUE, size="small"),
- pl.license <- rk.XML.input("License", initial="GPL (>= 3)", required=TRUE)),
- rk.XML.row(pl.desc <- rk.XML.input("Short description", required=TRUE)),
- rk.XML.row(
- pl.version <- rk.XML.input("Version number", initial="0.01-0", required=TRUE),
- pl.date <- rk.XML.input("Release date (empty for today)")),
- rk.XML.row(
- pl.homepage <- rk.XML.input("Homepage"),
- pl.category<- rk.XML.input("Category")), label="About the plugin")
+ rk.XML.row(
+ pl.name <- rk.XML.input("Plugin name", required=TRUE, size="small",
+ help="Give the name for your new plugin here."),
+ pl.license <- rk.XML.input("License", initial="GPL (>= 3)", required=TRUE,
+ help="Define the license for your plugin. A short form should be sufficient.")),
+ rk.XML.row(pl.desc <- rk.XML.input("Short description", required=TRUE,
+ help="Describe your plugin in a few sentences: What does it do?")),
+ rk.XML.row(
+ pl.version <- rk.XML.input("Version number", initial="0.01-0", required=TRUE,
+ help="Version information for your plugin."),
+ pl.date <- rk.XML.input("Release date (empty for today)",
+ help="The release date of your plugin. If you leave this empty, the current date will be used automatically.")),
+ rk.XML.row(
+ pl.homepage <- rk.XML.input("Homepage",
+ help="A URL where one can find more information on the plugin, download updates etc."),
+ pl.category<- rk.XML.input("Category",
+ help="A category for your plugin. This infromation is currently ignored by RKWard.")),
+ label="About the plugin")
about.contact <- rk.XML.frame(
- rk.XML.row(
- rk.XML.col(
- aut.given <- rk.XML.input("Given name", required=TRUE),
- aut.family <- rk.XML.input("Family name", required=TRUE),
- aut.email <- rk.XML.input("E-mail", required=TRUE),
- rk.XML.stretch()),
- rk.XML.col(rk.XML.frame(
- aut.auth <- rk.XML.cbox("Author", chk=TRUE),
- aut.maint <- rk.XML.cbox("Maintainer", chk=TRUE),
- rk.XML.stretch(), label="Author roles"))),
- label="Plugin author")
+ rk.XML.row(
+ rk.XML.col(
+ aut.given <- rk.XML.input("Given name", required=TRUE,
+ help="First name of the package author."),
+ aut.family <- rk.XML.input("Family name", required=TRUE,
+ help="Family name of the package author."),
+ aut.email <- rk.XML.input("E-mail", required=TRUE,
+ help="The authors e-mail address, important for bug reports and receiving a myriad of thank yous..."),
+ rk.XML.stretch()),
+ rk.XML.col(rk.XML.frame(
+ aut.auth <- rk.XML.cbox("Author", chk=TRUE,
+ help="Check this if you are the author of the plugin code."),
+ aut.maint <- rk.XML.cbox("Maintainer", chk=TRUE,
+ help="Check this if you maintain the plugin package."),
+ rk.XML.stretch(), label="Author roles"))),
+ label="Plugin author")
tab1.about <- rk.XML.col(about.plugin, about.contact)
# tab2: create options
crt.opts <- rk.XML.frame(
- rk.XML.row(pl.dir <- rk.XML.browser("Directory to save to (empty for $TEMPDIR)", type="dir", required=FALSE)),
- rk.XML.row(
- rk.XML.col(
- pl.overw <- rk.XML.cbox("Overwrite existing files", chk=FALSE),
- pl.wiz <- rk.XML.cbox("Add wizard section", chk=FALSE),
- pl.tests <- rk.XML.cbox("Include plugin tests", chk=TRUE),
- rk.XML.stretch()),
- rk.XML.col(
- pl.edit <- rk.XML.cbox("Open files for editing", chk=TRUE),
- pl.add <- rk.XML.cbox("Add plugin to RKWard configuration", chk=TRUE),
- pl.show <- rk.XML.cbox("Show the plugin", chk=FALSE),
- rk.XML.stretch())
- ),
- rk.XML.row(pl.hier <- rk.XML.dropdown("Place in top menu",
- options=list(
- "Test (created if needed)"=c(val="test", chk=TRUE),
- "File"=c(val="file"),
- "Edit"=c(val="edit"),
- "View"=c(val="view"),
- "Workspace"=c(val="workspace"),
- "Run"=c(val="run"),
- "Data"=c(val="data"),
- "Analysis"=c(val="analysis"),
- "Plots"=c(val="plots"),
- "Distributions"=c(val="distributions"),
- "Windows"=c(val="windows"),
- "Settings"=c(val="settings"),
- "Help"=c(val="help")
- )
- ))
- )
+ rk.XML.row(pl.dir <- rk.XML.browser("Directory to save to (empty for $TEMPDIR)", type="dir", required=FALSE,
+ help="Set the directory where all plugin files and its directory structure should be generated. The default is a temporary directory.")),
+ rk.XML.row(
+ rk.XML.col(
+ pl.overw <- rk.XML.cbox("Overwrite existing files", chk=FALSE,
+ help="If this is checked, existing files in the specified target directory will probably be replaced by new ones."),
+ pl.wiz <- rk.XML.cbox("Add wizard section", chk=FALSE,
+ help="If this is checked, a wizard section will be included in the skeleton."),
+ pl.tests <- rk.XML.cbox("Include plugin tests", chk=TRUE,
+ help="If this is checked, plugin tests will be included in the skeleton."),
+ rk.XML.stretch()),
+ rk.XML.col(
+ pl.edit <- rk.XML.cbox("Open files for editing", chk=TRUE,
+ help="If this is checked, all generated files will be opened for editing instantly."),
+ pl.add <- rk.XML.cbox("Add plugin to RKWard configuration", chk=TRUE,
+ help="If this is checkend, the generated plugin will automatically be registered in RKWard's configuration.
+ If you store it in a temporary directory and remove it before the next start of RKWard, the entry will removed again as well."),
+ pl.show <- rk.XML.cbox("Show the plugin", chk=FALSE,
+ help="If this is checked, the generated plugin will be shown (opened) for you to see what it looks like."),
+ rk.XML.stretch())
+ ),
+ rk.XML.row(pl.hier <- rk.XML.dropdown("Place in top menu",
+ options=list(
+ "Test (created if needed)"=c(val="test", chk=TRUE),
+ "File"=c(val="file"),
+ "Edit"=c(val="edit"),
+ "View"=c(val="view"),
+ "Workspace"=c(val="workspace"),
+ "Run"=c(val="run"),
+ "Data"=c(val="data"),
+ "Analysis"=c(val="analysis"),
+ "Plots"=c(val="plots"),
+ "Distributions"=c(val="distributions"),
+ "Windows"=c(val="windows"),
+ "Settings"=c(val="settings"),
+ "Help"=c(val="help")
+ ),
+ help="Specify where the plugin should appear in RKWard's top menus."
+ ))
+ )
dep.opts <- rk.XML.frame(
- rk.XML.row(
- dep.frame.RKWard <- rk.XML.frame(
- dep.rkmin <- rk.XML.input("RKWard min", size="small"),
- dep.rkmax <- rk.XML.input("RKWard max", size="small"),
- rk.XML.stretch(), label="Depends on RKWard version"),
- dep.frame.R <- rk.XML.frame(
- dep.rmin <- rk.XML.input("R min", size="small"),
- dep.rmax <- rk.XML.input("R max", size="small"),
- rk.XML.stretch(), label="Depends on R version")),
- rk.XML.row(
- dep.optionset.packages <- rk.XML.optionset(
- content=rk.XML.frame(rk.XML.stretch(before=list(
- dep.pckg.name <- rk.XML.input("Package")#,
-# dep.pckg.min <- rk.XML.input("min"),
-# dep.pckg.max <- rk.XML.input("max"),
-# dep.pckg.repo <- rk.XML.input("Repository")
- )), label="Depends on R packages"),
- optioncolumn=list(
- dep.optioncol.pckg.name <- rk.XML.optioncolumn(connect=dep.pckg.name, modifier="text")#,
-# dep.optioncol.pckg.min <- rk.XML.optioncolumn(connect=dep.pckg.min, modifier="text"),
-# dep.optioncol.pckg.max <- rk.XML.optioncolumn(connect=dep.pckg.max, modifier="text"),
-# dep.optioncol.pckg.repo <- rk.XML.optioncolumn(connect=dep.pckg.repo, modifier="text")
- )
- )
- ), label="Define dependencies", checkable=TRUE, chk=FALSE)
+ rk.XML.row(
+ dep.frame.RKWard <- rk.XML.frame(
+ dep.rkmin <- rk.XML.input("RKWard min", size="small",
+ help="The minimum version number of RKWard required to run this plugin."),
+ dep.rkmax <- rk.XML.input("RKWard max", size="small",
+ help="The maximum version number of RKWard required to run this plugin."),
+ rk.XML.stretch(), label="Depends on RKWard version"),
+ dep.frame.R <- rk.XML.frame(
+ dep.rmin <- rk.XML.input("R min", size="small",
+ help="The minimum version number of R required to run this plugin."),
+ dep.rmax <- rk.XML.input("R max", size="small",
+ help="The maximum version number of R required to run this plugin."),
+ rk.XML.stretch(), label="Depends on R version")),
+ rk.XML.row(
+ dep.optionset.packages <- rk.XML.optionset(
+ content=rk.XML.frame(rk.XML.stretch(before=list(
+ dep.pckg.name <- rk.XML.input("Package",
+ help="The names of R packages required to run this plugin.")#,
+# dep.pckg.min <- rk.XML.input("min"),
+# dep.pckg.max <- rk.XML.input("max"),
+# dep.pckg.repo <- rk.XML.input("Repository")
+ )), label="Depends on R packages"),
+ optioncolumn=list(
+ dep.optioncol.pckg.name <- rk.XML.optioncolumn(connect=dep.pckg.name, modifier="text")#,
+# dep.optioncol.pckg.min <- rk.XML.optioncolumn(connect=dep.pckg.min, modifier="text"),
+# dep.optioncol.pckg.max <- rk.XML.optioncolumn(connect=dep.pckg.max, modifier="text"),
+# dep.optioncol.pckg.repo <- rk.XML.optioncolumn(connect=dep.pckg.repo, modifier="text")
+ )
+ )
+ ), label="Define dependencies", checkable=TRUE, chk=FALSE)
tab2.create <- rk.XML.col(crt.opts, dep.opts)
# tab3: varslot to select the actual content
children.text <- rk.XML.text("If you already created XML content for the plugin, select the main dialog object here (probably a tabbook?)")
children.var <- rk.XML.row(
- children.varselector <- rk.XML.varselector(label="Plugin content"),
- rk.XML.col(
- cont.dial <- rk.XML.varslot("Select an object of class XiMpLe.node", source=children.varselector, classes="XiMpLe.node"),
- rk.XML.frame(
- js.prep <- rk.XML.varslot("preprocess()", source=children.varselector),
- js.calc <- rk.XML.varslot("calculate()", source=children.varselector),
- js.prnt <- rk.XML.varslot("printout()", source=children.varselector),
- rk.XML.stretch())
- ))
+ children.varselector <- rk.XML.varselector(label="Plugin content"),
+ rk.XML.col(
+ cont.dial <- rk.XML.varslot("Select an object of class XiMpLe.node", source=children.varselector, classes="XiMpLe.node",
+ help="If you already created XML content for the plugin, select the main dialog object here."),
+ rk.XML.frame(
+ js.prep <- rk.XML.varslot("preprocess()", source=children.varselector,
+ help="A JavaScript object to be used as the the preprocess() function."),
+ js.calc <- rk.XML.varslot("calculate()", source=children.varselector,
+ help="A JavaScript object to be used as the the calculate() function."),
+ js.prnt <- rk.XML.varslot("printout()", source=children.varselector,
+ help="A JavaScript object to be used as the the printout() function."),
+ rk.XML.stretch())
+ ))
tab3.children <- rk.XML.col(rk.XML.row(children.text), rk.XML.row(children.var))
## glue all of the above together in one tabbook
# sklt.tabbook <- rk.XML.dialog(rk.XML.tabbook("Plugin Skeleton",
-# tab.labels=c("About the plugin", "Create options", "XML content"),
-# children=list(tab1.about, tab2.create, tab3.children)), label="RKWard Plugin Skeleton")
+# tab.labels=c("About the plugin", "Create options", "XML content"),
+# children=list(tab1.about, tab2.create, tab3.children)), label="RKWard Plugin Skeleton")
sklt.tabbook <- rk.XML.dialog(rk.XML.tabbook("Plugin Skeleton",
- tabs=list("About the plugin"=tab1.about, "Create options"=tab2.create)),
- label="RKWard Plugin Skeleton")
+ tabs=list("About the plugin"=tab1.about, "Create options"=tab2.create)),
+ label="RKWard Plugin Skeleton")
## some logic
logic.section <- rk.XML.logic(
- rk.XML.connect(governor=dep.opts, get="checked", client=dep.frame.RKWard, set="enabled"),
- rk.XML.connect(governor=dep.opts, get="checked", client=dep.frame.R, set="enabled")#,
-# rk.XML.connect(governor=dep.opts, client=dep.frame.packages, set="enabled")
- )
+ rk.XML.connect(governor=dep.opts, get="checked", client=dep.frame.RKWard, set="enabled"),
+ rk.XML.connect(governor=dep.opts, get="checked", client=dep.frame.R, set="enabled")#,
+# rk.XML.connect(governor=dep.opts, client=dep.frame.packages, set="enabled")
+ )
## JS code generation
# author section
js.opt.about.author.role <- rk.JS.options("optAuthorRole",
- ite(aut.auth, qp("\"aut\"")),
- ite(aut.maint, qp("\"cre\"")),
- funct="c", option="role", collapse="")
+ ite(aut.auth, qp("\"aut\"")),
+ ite(aut.maint, qp("\"cre\"")),
+ funct="c", option="role", collapse="")
js.opt.about.author <- rk.JS.options("optAuthor",
- ite(aut.given, qp("given=\"",aut.given,"\"")),
- ite(aut.family, qp("family=\"",aut.family,"\"")),
- ite(aut.email, qp("email=\"",aut.email,"\"")),
- ite(js.opt.about.author.role, js.opt.about.author.role),
- funct="person", option="author", collapse=",\\n\\t")
+ ite(aut.given, qp("given=\"",aut.given,"\"")),
+ ite(aut.family, qp("family=\"",aut.family,"\"")),
+ ite(aut.email, qp("email=\"",aut.email,"\"")),
+ ite(js.opt.about.author.role, js.opt.about.author.role),
+ funct="person", option="author", collapse=",\\n\\t")
# about section
js.opt.about.about <- rk.JS.options("optAbout",
- ite(pl.desc, qp("desc=\"",pl.desc,"\"")),
- ite(pl.version, qp("version=\"",pl.version,"\"")),
- ite(pl.date, qp("date=\"",pl.date,"\"")),
- ite(pl.homepage, qp("url=\"",pl.homepage,"\"")),
- ite(pl.license, qp("license=\"",pl.license,"\"")),
- ite(pl.category, qp("category=\"",pl.category,"\"")),
- funct="list", option="about", collapse=",\\n\\t")
+ ite(pl.desc, qp("desc=\"",pl.desc,"\"")),
+ ite(pl.version, qp("version=\"",pl.version,"\"")),
+ ite(pl.date, qp("date=\"",pl.date,"\"")),
+ ite(pl.homepage, qp("url=\"",pl.homepage,"\"")),
+ ite(pl.license, qp("license=\"",pl.license,"\"")),
+ ite(pl.category, qp("category=\"",pl.category,"\"")),
+ funct="list", option="about", collapse=",\\n\\t")
# dependencies section
js.frm.dep.opts <- rk.JS.vars(dep.opts, modifiers="checked") # see to it frame is checked
js.opt.about.dep <- rk.JS.options("optDependencies",
- ite(id(js.frm.dep.opts, " && ", dep.rkmin), qp("rkward.min=\"",dep.rkmin,"\"")),
- ite(id(js.frm.dep.opts, " && ", dep.rkmax), qp("rkward.max=\"",dep.rkmax,"\"")),
- ite(id(js.frm.dep.opts, " && ", dep.rmin), qp("R.min=\"",dep.rmin,"\"")),
- ite(id(js.frm.dep.opts, " && ", dep.rmax), qp("R.max=\"",dep.rmax,"\"")),
- funct="list", option="dependencies", collapse=",\\n\\t")
+ ite(id(js.frm.dep.opts, " && ", dep.rkmin), qp("rkward.min=\"",dep.rkmin,"\"")),
+ ite(id(js.frm.dep.opts, " && ", dep.rkmax), qp("rkward.max=\"",dep.rkmax,"\"")),
+ ite(id(js.frm.dep.opts, " && ", dep.rmin), qp("R.min=\"",dep.rmin,"\"")),
+ ite(id(js.frm.dep.opts, " && ", dep.rmax), qp("R.max=\"",dep.rmax,"\"")),
+ funct="list", option="dependencies", collapse=",\\n\\t")
js.opt.skel.pluginmap <- rk.JS.options("optPluginmap",
- ite(id(pl.hier, "!= \"test\""), qp("hierarchy=\"", pl.hier, "\"")),
- funct="list", option="pluginmap", collapse="")
+ ite(id(pl.hier, "!= \"test\""), qp("hierarchy=\"", pl.hier, "\"")),
+ funct="list", option="pluginmap", collapse="")
js.opt.skeleton <- rk.JS.options("optSkeleton",
- ite(pl.dir, qp("\n\tpath=\"", pl.dir, "\"")),
- ite(pl.wiz, qp("\n\tprovides=c(\"logic\", \"dialog\", \"wizard\")")),
- ite(js.opt.skel.pluginmap, qp("\n\t", js.opt.skel.pluginmap)),
- ite(pl.overw, qp("\n\toverwrite=TRUE")),
- ite(pl.tests, qp("\n\ttests=TRUE")),
- ite(pl.edit, qp("\n\tedit=TRUE")),
- ite(pl.add, qp("\n\tload=TRUE")),
- ite(pl.show, qp("\n\tshow=TRUE")),
- collapse="")
+ ite(pl.dir, qp("\n\tpath=\"", pl.dir, "\"")),
+ ite(pl.wiz, qp("\n\tprovides=c(\"logic\", \"dialog\", \"wizard\")")),
+ ite(js.opt.skel.pluginmap, qp("\n\t", js.opt.skel.pluginmap)),
+ ite(pl.overw, qp("\n\toverwrite=TRUE")),
+ ite(pl.tests, qp("\n\ttests=TRUE")),
+ ite(pl.edit, qp("\n\tedit=TRUE")),
+ ite(pl.add, qp("\n\tload=TRUE")),
+ ite(pl.show, qp("\n\tshow=TRUE")),
+ collapse="")
JS.calculate <- rk.paste.JS(
- js.opt.about.author.role,
- js.opt.about.author,
- js.opt.about.about,
- js.opt.about.dep,
- js.opt.skel.pluginmap,
- js.opt.skeleton,
- echo("about.plugin <- rk.XML.about("),
- ite(pl.name, echo("\n\tname=\"", pl.name, "\"")),
- echo(js.opt.about.author),
- echo(js.opt.about.about),
- echo("\n)\n\n"),
- ite(id(js.frm.dep.opts, " && (", js.opt.about.dep, " || ", dep.optioncol.pckg.name, ")"),
- rk.paste.JS(
- echo("plugin.dependencies <- rk.XML.dependencies("),
- ite(id(js.opt.about.dep), echo(js.opt.about.dep)),
- ite(id(js.opt.about.dep, " && ", dep.optioncol.pckg.name), echo(",")),
- ite(id(dep.optioncol.pckg.name),
- echo("\n\tpackage=list(\n\t\tc(name=\"", join(dep.optioncol.pckg.name, by="\"),\n\t\tc(name=\""), "\")\n\t)")),
- echo("\n)\n\n"),
- level=3)),
- echo("plugin.dir <- rk.plugin.skeleton(\n\tabout=about.plugin,"),
- ite(id(js.frm.dep.opts, " && ", js.opt.about.dep), echo("\n\tdependencies=plugin.dependencies,")),
- echo(js.opt.skeleton),
- echo("\n)\n\n"),
- level=2)
+ js.opt.about.author.role,
+ js.opt.about.author,
+ js.opt.about.about,
+ js.opt.about.dep,
+ js.opt.skel.pluginmap,
+ js.opt.skeleton,
+ echo("about.plugin <- rk.XML.about("),
+ ite(pl.name, echo("\n\tname=\"", pl.name, "\"")),
+ echo(js.opt.about.author),
+ echo(js.opt.about.about),
+ echo("\n)\n\n"),
+ ite(id(js.frm.dep.opts, " && (", js.opt.about.dep, " || ", dep.optioncol.pckg.name, ")"),
+ rk.paste.JS(
+ echo("plugin.dependencies <- rk.XML.dependencies("),
+ ite(id(js.opt.about.dep), echo(js.opt.about.dep)),
+ ite(id(js.opt.about.dep, " && ", dep.optioncol.pckg.name), echo(",")),
+ ite(id(dep.optioncol.pckg.name),
+ echo("\n\tpackage=list(\n\t\tc(name=\"", join(dep.optioncol.pckg.name, by="\"),\n\t\tc(name=\""), "\")\n\t)")),
+ echo("\n)\n\n"),
+ level=3)),
+ echo("plugin.dir <- rk.plugin.skeleton(\n\tabout=about.plugin,"),
+ ite(id(js.frm.dep.opts, " && ", js.opt.about.dep), echo("\n\tdependencies=plugin.dependencies,")),
+ echo(js.opt.skeleton),
+ echo("\n)\n\n"),
+ level=2)
+############
+## help file
+
+rkh.summary <- rk.rkh.summary("Generate a plugin skeleton for RKWard.")
+
+rkh.usage <- rk.rkh.usage("This plugin is both, an example for a plugin written with the rkwarddev package,
+ and a quick way to get a skeleton for new plugins.")
+
+#############
## the main call
+## if you run the following function call, files will be written to output.dir!
+#############
+# this is where it get's serious, that is, here all of the above is put together into one plugin
#plugin.dir <<- rk.plugin.skeleton(
rk.plugin.skeleton(
- about=about.info,
- path=output.dir,
- guess.getter=TRUE,
- xml=list(
- dialog=sklt.tabbook,
- logic=logic.section),
- js=list(
- require="rkwarddev",
- calculate=JS.calculate),
- pluginmap=list(name="Create RKWard plugin skeleton", hierarchy=list("file", "export")),
- overwrite=TRUE,
- create=c("pmap","xml","js","desc"),
- dependencies=dependencies.info,
- tests=FALSE,
- show=TRUE,
- edit=TRUE,
- hints=FALSE)
+ about=about.info,
+ path=output.dir,
+ guess.getter=TRUE,
+ xml=list(
+ dialog=sklt.tabbook,
+ logic=logic.section),
+ js=list(
+ require="rkwarddev",
+ calculate=JS.calculate),
+ rkh=list(
+ summary=rkh.summary,
+ usage=rkh.usage
+ ),
+ pluginmap=list(name="Create RKWard plugin skeleton", hierarchy=list("file", "export")),
+ overwrite=TRUE,
+ create=c("pmap","xml","js","desc", "rkh"),
+ dependencies=dependencies.info,
+ tests=FALSE,
+ show=TRUE,
+# load=TRUE,
+ edit=TRUE,
+ hints=FALSE)
})
Modified: trunk/rkward/packages/rkwarddev/inst/NEWS.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/NEWS.Rd 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/inst/NEWS.Rd 2014-10-12 18:07:13 UTC (rev 4896)
@@ -1,12 +1,13 @@
\name{NEWS}
\title{News for Package 'rkwarddev'}
\encoding{UTF-8}
-\section{Changes in rkwarddev version 0.06-5 (2014-10-11)}{
+\section{Changes in rkwarddev version 0.06-5 (2014-10-12)}{
\subsection{fixed}{
\itemize{
\item the \code{"show"} feature in \code{rk.plugin.skeleton()} was broken due to changes in the namespace defaults
\item scanning plugin XML code for JS and help related content didn't work as expected in \code{rk.plugin.component()}
\item \code{rk.rkh.scan()} now also recognises <optioncolumn> and <matrix> nodes
+ \item a logical bug prevented \code{rk.plugin.component()} to run with default values for XML
}
}
\subsection{added}{
@@ -20,6 +21,11 @@
\item new function \code{rk.XMLoption()} to allow setting and accessing IDs for single options as well
}
}
+ \subsection{changed}{
+ \itemize{
+ \item updated the plugin skeleton example script; e.g., it now uses the new .rkh file generating features
+ }
+ }
}
\section{Changes in rkwarddev version 0.06-4 (2014-09-14)}{
\subsection{added}{
Modified: trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
===================================================================
(Binary files differ)
Modified: trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap 2014-10-12 18:07:13 UTC (rev 4896)
@@ -1,7 +1,7 @@
<!DOCTYPE rkpluginmap >
<document
namespace="CreateRKWardpluginskeleton"
- id="CreateRKWardpluginskeleton_rkward"
+ id="CreateRKWardpluginskeleton__rkward"
priority="medium"
>
<!--
@@ -14,8 +14,8 @@
name="RKWard Plugin Skeleton"
shortinfo="GUI interface to create RKWard plugin skeletons"
longinfo="GUI interface to create RKWard plugin skeletons"
- version="0.06-2"
- releasedate="2013-02-24"
+ version="0.06-5"
+ releasedate="2014-10-12"
url="http://rkward.sf.net"
license="GPL (>= 3)"
>
Modified: trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js 2014-10-12 18:07:13 UTC (rev 4896)
@@ -10,31 +10,32 @@
function calculate(){
// read in variables from dialog
- var inpPluginnm = getValue("inp_Pluginnm");
- var inpLicense = getValue("inp_License");
- var inpShrtdscr = getValue("inp_Shrtdscr");
- var inpVrsnnmbr = getValue("inp_Vrsnnmbr");
- var inpRlsdtmpt = getValue("inp_Rlsdtmpt");
- var inpHomepage = getValue("inp_Homepage");
- var inpCategory = getValue("inp_Category");
- var inpGivennam = getValue("inp_Givennam");
- var inpFamilynm = getValue("inp_Familynm");
- var inpEmail = getValue("inp_Email");
- var chcAuthor = getValue("chc_Author");
- var chcMaintanr = getValue("chc_Maintanr");
- var brwDTEMPDIR = getValue("brw_DTEMPDIR");
- var chcOvrwrtxs = getValue("chc_Ovrwrtxs");
- var chcAddwzrds = getValue("chc_Addwzrds");
- var chcIncldplg = getValue("chc_Incldplg");
- var chcOpnflsfr = getValue("chc_Opnflsfr");
- var chcAddplRKW = getValue("chc_AddplRKW");
- var chcShwthplg = getValue("chc_Shwthplg");
- var drpPlcntpmn = getValue("drp_Plcntpmn");
- var inpRKWardmn = getValue("inp_RKWardmn");
- var inpRKWardmx = getValue("inp_RKWardmx");
- var inpRmin = getValue("inp_Rmin");
- var inpRmax = getValue("inp_Rmax");
- var frmDfndpndnChecked = getValue("frm_Dfndpndn.checked");
+ var ocolOclInpPckgtxt = getList("ost_frmlDRDRPP.ocl_inpPckgtxt");
+ var inpPluginnm = getString("inp_Pluginnm");
+ var inpLicense = getString("inp_License");
+ var inpShrtdscr = getString("inp_Shrtdscr");
+ var inpVrsnnmbr = getString("inp_Vrsnnmbr");
+ var inpRlsdtmpt = getString("inp_Rlsdtmpt");
+ var inpHomepage = getString("inp_Homepage");
+ var inpCategory = getString("inp_Category");
+ var inpGivennam = getString("inp_Givennam");
+ var inpFamilynm = getString("inp_Familynm");
+ var inpEmail = getString("inp_Email");
+ var chcAuthor = getBoolean("chc_Author");
+ var chcMaintanr = getBoolean("chc_Maintanr");
+ var brwDTEMPDIR = getString("brw_DTEMPDIR");
+ var chcOvrwrtxs = getBoolean("chc_Ovrwrtxs");
+ var chcAddwzrds = getBoolean("chc_Addwzrds");
+ var chcIncldplg = getBoolean("chc_Incldplg");
+ var chcOpnflsfr = getBoolean("chc_Opnflsfr");
+ var chcAddplRKW = getBoolean("chc_AddplRKW");
+ var chcShwthplg = getBoolean("chc_Shwthplg");
+ var drpPlcntpmn = getString("drp_Plcntpmn");
+ var inpRKWardmn = getString("inp_RKWardmn");
+ var inpRKWardmx = getString("inp_RKWardmx");
+ var inpRmin = getString("inp_Rmin");
+ var inpRmax = getString("inp_Rmax");
+ var frmDfndpndnChecked = getBoolean("frm_Dfndpndn.checked");
// the R code to be evaluated
// define the array arrOptAuthorRole for values of R option "role"
@@ -185,8 +186,18 @@
echo(optAuthor);
echo(optAbout);
echo("\n)\n\n");
- if(frmDfndpndnChecked && optDependencies) {
- echo("plugin.dependencies <- rk.XML.dependencies(" + optDependencies + "\n)\n\n");
+ if(frmDfndpndnChecked && (optDependencies || ocolOclInpPckgtxt)) {
+ echo("plugin.dependencies <- rk.XML.dependencies(");
+ if(optDependencies) {
+ echo(optDependencies);
+ }
+ if(optDependencies && ocolOclInpPckgtxt) {
+ echo(",");
+ }
+ if(ocolOclInpPckgtxt) {
+ echo("\n\tpackage=list(\n\t\tc(name=\"" + ocolOclInpPckgtxt.join("\"),\n\t\tc(name=\"") + "\")\n\t)");
+ }
+ echo("\n)\n\n");
}
echo("plugin.dir <- rk.plugin.skeleton(\n\tabout=about.plugin,");
if(frmDfndpndnChecked && optDependencies) {
Added: trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh (rev 0)
+++ trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh 2014-10-12 18:07:13 UTC (rev 4896)
@@ -0,0 +1,116 @@
+<!DOCTYPE rkhelp >
+<document>
+ <!-- this code was generated using the rkwarddev package.
+ perhaps don't make changes here, but in the rkwarddev script instead! -->
+ <title>
+ Create RKWard plugin skeleton
+ </title>
+ <summary>
+ Generate a plugin skeleton for RKWard.
+ </summary>
+ <usage>
+ This plugin is both, an example for a plugin written with the rkwarddev package,
+ and a quick way to get a skeleton for new plugins.
+ </usage>
+ <!-- <section id="sct_EDITORDE" title="EDIT OR DELETE ME">
+ EDIT OR DELETE ME
+ </section> -->
+ <settings>
+ <caption id="tab_Abtthplg" />
+ <caption id="frm_Abtthplg" />
+ <setting id="inp_Pluginnm">
+ Give the name for your new plugin here.
+ </setting>
+ <setting id="inp_License">
+ Define the license for your plugin. A short form should be sufficient.
+ </setting>
+ <setting id="inp_Shrtdscr">
+ Describe your plugin in a few sentences: What does it do?
+ </setting>
+ <setting id="inp_Vrsnnmbr">
+ Version information for your plugin.
+ </setting>
+ <setting id="inp_Rlsdtmpt">
+ The release date of your plugin. If you leave this empty, the current date will be used automatically.
+ </setting>
+ <setting id="inp_Homepage">
+ A URL where one can find more information on the plugin, download updates etc.
+ </setting>
+ <setting id="inp_Category">
+ A category for your plugin. This infromation is currently ignored by RKWard.
+ </setting>
+ <caption id="frm_Plugnthr" />
+ <setting id="inp_Givennam">
+ First name of the package author.
+ </setting>
+ <setting id="inp_Familynm">
+ Family name of the package author.
+ </setting>
+ <setting id="inp_Email">
+ The authors e-mail address, important for bug reports and receiving a myriad of thank yous...
+ </setting>
+ <caption id="frm_Authrrls" />
+ <setting id="chc_Author">
+ Check this if you are the author of the plugin code.
+ </setting>
+ <setting id="chc_Maintanr">
+ Check this if you maintain the plugin package.
+ </setting>
+ <caption id="tab_Cretptns" />
+ <caption id="frm_rDTEMPDIRD" />
+ <setting id="brw_DTEMPDIR">
+ Set the directory where all plugin files and its directory structure should be generated. The default is a temporary directory.
+ </setting>
+ <setting id="chc_Ovrwrtxs">
+ If this is checked, existing files in the specified target directory will probably be replaced by new ones.
+ </setting>
+ <setting id="chc_Addwzrds">
+ If this is checked, a wizard section will be included in the skeleton.
+ </setting>
+ <setting id="chc_Incldplg">
+ If this is checked, plugin tests will be included in the skeleton.
+ </setting>
+ <setting id="chc_Opnflsfr">
+ If this is checked, all generated files will be opened for editing instantly.
+ </setting>
+ <setting id="chc_AddplRKW">
+ If this is checkend, the generated plugin will automatically be registered in RKWard's configuration.
+ If you store it in a temporary directory and remove it before the next start of RKWard, the entry will removed again as well.
+ </setting>
+ <setting id="chc_Shwthplg">
+ If this is checked, the generated plugin will be shown (opened) for you to see what it looks like.
+ </setting>
+ <setting id="drp_Plcntpmn">
+ Specify where the plugin should appear in RKWard's top menus.
+ </setting>
+ <caption id="frm_Dfndpndn" />
+ <caption id="frm_DpndsRKW" />
+ <setting id="inp_RKWardmn">
+ The minimum version number of RKWard required to run this plugin.
+ </setting>
+ <setting id="inp_RKWardmx">
+ The maximum version number of RKWard required to run this plugin.
+ </setting>
+ <caption id="frm_DpndsnRv" />
+ <setting id="inp_Rmin">
+ The minimum version number of R required to run this plugin.
+ </setting>
+ <setting id="inp_Rmax">
+ The maximum version number of R required to run this plugin.
+ </setting>
+ <caption id="frm_DpndsnRp" />
+ <setting id="inp_Package">
+ The names of R packages required to run this plugin.
+ </setting>
+ <setting id="ocl_inpPckgtxt" />
+ </settings>
+ <!-- <related>
+ <ul>
+ <li>
+ <link href="rkward://rhelp/..." />
+ </li>
+ </ul>
+ </related> -->
+ <technical>
+ </technical>
+</document>
Modified: trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml 2014-10-12 18:07:13 UTC (rev 4896)
@@ -4,7 +4,6 @@
perhaps don't make changes here, but in the rkwarddev script instead! -->
<code file="CreateRKWardpluginskeleton.js" />
<help file="CreateRKWardpluginskeleton.rkh" />
- <include file="../RKWardPluginSkeleton.pluginmap" />
<logic>
<connect governor="frm_Dfndpndn.checked" client="frm_DpndsRKW.enabled" />
<connect governor="frm_Dfndpndn.checked" client="frm_DpndsnRv.enabled" />
@@ -100,6 +99,18 @@
<stretch />
</frame>
</row>
+ <row id="row_oDRDRPPDRD">
+ <optionset id="ost_frmlDRDRPP">
+ <content>
+ <optiondisplay />
+ <frame label="Depends on R packages" id="frm_DpndsnRp">
+ <input label="Package" id="inp_Package" />
+ <stretch />
+ </frame>
+ </content>
+ <optioncolumn id="ocl_inpPckgtxt" connect="inp_Package.text" label="Package" />
+ </optionset>
+ </row>
</frame>
</column>
</tab>
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.optionset.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.optionset.Rd 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.optionset.Rd 2014-10-12 18:07:13 UTC (rev 4896)
@@ -47,7 +47,7 @@
you must always prefix it with the sets' \code{id}. For JavaScript code generating with
\code{rkwarddev},
you can use the ID that functions like \code{\link[rkwarddev:id]{id}} return,
-because the JavaScript variable name will only contain a constant prefix ("ocol") an the column ID.
+because the JavaScript variable name will only contain a constant prefix ("ocol") and the column ID.
}
\note{
The \code{<optionset>} node was introduced with RKWard 0.6.1, please set the dependencies
Modified: trunk/rkward/packages/rkwarddev/man/rk.rkh.scan.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.rkh.scan.Rd 2014-10-12 13:19:06 UTC (rev 4895)
+++ trunk/rkward/packages/rkwarddev/man/rk.rkh.scan.Rd 2014-10-12 18:07:13 UTC (rev 4896)
@@ -21,7 +21,7 @@
help text provided by \code{\link[rkwarddev:rk.set.rkh.prompter]{rk.set.rkh.prompter}}.}
}
\value{
-A character vector or a list of XiMpLe.node objects.
+A character vector or a list of XiMpLe.node objects. Returns \code{NULL} if no documentable nodes are found.
}
\description{
Create RKWard help nodes from plugin XML
Added: trunk/rkward/packages/rkwarddev/man/rkwarddev.required.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev.required.Rd (rev 0)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev.required.Rd 2014-10-12 18:07:13 UTC (rev 4896)
@@ -0,0 +1,23 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{rkwarddev.required}
+\alias{rkwarddev.required}
+\title{Check for rkwarddev package version requirements}
+\usage{
+rkwarddev.required(min = "0.06-5", lib.loc = NULL)
+}
+\arguments{
+\item{min}{The minimum version number of rkwarddev that is required to run this script.}
+
+\item{lib.loc}{The \code{lib.loc} argument passed over to \code{\link[utils:packageVersion]{packageVersion}}.}
+}
+\value{
+The function has no return value,
+ but wil stop with an error if the specified version requirement is not met.
+}
+\description{
+Check for rkwarddev package version requirements
+}
+\examples{
+rkwarddev.required(min="0.06-5")
+}
+
More information about the rkward-tracker
mailing list