[rkward-cvs] SF.net SVN: rkward:[3938] trunk/rkward/packages/rkwarddev
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Thu Oct 13 18:58:48 UTC 2011
Revision: 3938
http://rkward.svn.sourceforge.net/rkward/?rev=3938&view=rev
Author: m-eik
Date: 2011-10-13 18:58:48 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
rkwarddev: some more ID fixes; skeleton menu entry not under file -> export; that is, rk.plugin.skeleton() can now create more complex menu structures
Modified Paths:
--------------
trunk/rkward/packages/rkwarddev/ChangeLog
trunk/rkward/packages/rkwarddev/DESCRIPTION
trunk/rkward/packages/rkwarddev/R/rk.XML.entry.R
trunk/rkward/packages/rkwarddev/R/rk.XML.input.R
trunk/rkward/packages/rkwarddev/R/rk.XML.menu.R
trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R
trunk/rkward/packages/rkwarddev/R/rk.XML.saveobj.R
trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R
trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
trunk/rkward/packages/rkwarddev/man/rk.XML.entry.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.menu.Rd
trunk/rkward/packages/rkwarddev/man/rk.XML.pluginmap.Rd
trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd
trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
Removed Paths:
-------------
trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.tex
Modified: trunk/rkward/packages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/packages/rkwarddev/ChangeLog 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/ChangeLog 2011-10-13 18:58:48 UTC (rev 3938)
@@ -1,7 +1,9 @@
ChangeLog for package rkwarddev
-## 0.03-6 (2011-10-12)
+## 0.03-6 (2011-10-13)
- lifted rkward package dependecies to 0.5.7 (needed for rk.load.pluginmaps())
+ - rk.XML.menu() and rk.plugin.skeleton() can now recursively generate deeper menu structures if you provide it with a list
+ - fixed bug in autogeneration of IDs in rk.XML.input() and rk.XML.saveobj()
## 0.03-5 (2011-10-11)
- rk.XML.tabbook() can now autogenerate IDs without a label
Modified: trunk/rkward/packages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/packages/rkwarddev/DESCRIPTION 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/DESCRIPTION 2011-10-13 18:58:48 UTC (rev 3938)
@@ -15,7 +15,7 @@
Authors at R: c(person(given="Meik", family="Michalke",
email="meik.michalke at hhu.de", role=c("aut", "cre")))
Version: 0.03-6
-Date: 2011-10-12
+Date: 2011-10-13
Collate:
'echo.R'
'id.R'
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.entry.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.entry.R 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.entry.R 2011-10-13 18:58:48 UTC (rev 3938)
@@ -2,7 +2,7 @@
#'
#' This function will create a entry node for menu sections in .pluginmap files.
#'
-#' @param component An ID.
+#' @param component A "component" object of class \code{XiMpLe.node}, or an ID.
#' @param index Integer number to influence the level of menu placement.
#' @return An object of class \code{XiMpLe.node}.
#' @export
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.input.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.input.R 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.input.R 2011-10-13 18:58:48 UTC (rev 3938)
@@ -18,7 +18,7 @@
attr.list <- list(label=label)
if(identical(id.name, "auto")){
- attr.list[["id"]] <- list(id=auto.ids(label, prefix=ID.prefix("input")))
+ attr.list[["id"]] <- auto.ids(label, prefix=ID.prefix("input"))
} else if(!is.null(id.name)){
attr.list[["id"]] <- id.name
} else {}
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.menu.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.menu.R 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.menu.R 2011-10-13 18:58:48 UTC (rev 3938)
@@ -4,11 +4,15 @@
#' Use same \code{id} values to place entries in the same menu.
#'
#' @param label Character string, a label for the menu.
-#' @param ... Objects of class \code{XiMpLe.node}, must be either
-#' "menu" or "entry".
-#' @param index Integer number to influence the level of menu placement.
-#' @param id.name Character string, a unique ID for this plugin element.
-#' If \code{"auto"}, an ID will be generated automatically from the label.
+#' @param ... Eithet objects of class \code{XiMpLe.node}, must be either
+#' "menu" or "entry", or a list of character strings representing the menu path,
+#' with the last element being the \code{component} value for \code{\link[rkwarddev:rk.XML.entry]{rk.XML.entry}}.
+#' @param index Integer number to influence the level of menu placement. If \code{...} is a list,
+#' \code{index} can also be a vector of the same length + 1, so indices will be set in the same order to the
+#' menu levels, the last value is for the entry.
+#' @param id.name Character, a unique ID for this plugin element.
+#' If \code{"auto"}, an ID will be generated automatically from the label. Otherwise, if \code{...} is a list,
+#' \code{id.name} must have the same length and will be set in the same order to the menu levels.
#' Used to place the menu in the global menu hierarchy.
#' @return An object of class \code{XiMpLe.node}.
#' @export
@@ -23,10 +27,62 @@
#' test.entry <- rk.XML.entry(test.component)
#' test.menu <- rk.XML.menu("Analysis", test.entry, id.name="analysis")
#' cat(pasteXMLNode(test.menu))
+#' # manual definition of a menu path by a list:
+#' test.menu <- rk.XML.menu("Analysis", list("Level 1", "Level 2", test.component))
rk.XML.menu <- function(label, ..., index=-1, id.name="auto"){
nodes <- list(...)
+ num.nodes <- length(nodes)
+ # if nodes is a list, create menu structure of it
+ if(is.list(nodes[[1]])){
+ menu.levels <- nodes[[1]]
+ num.levels <- length(menu.levels)
+
+ # work your way down, but for safety resons (and sanity...), don't go deeper than 10 levels
+ if(num.levels > 10){
+ stop(simpleError("Automatic menu recursion won't go deeper than 10 levels, sorry!"))
+ } else if(num.levels > 1){
+ # check ID names
+ if(!identical(id.name, "auto")){
+ if(length(id.name) == num.levels){
+ new.id.name <- id.name[2:num.levels]
+ id.name <- id.name[1]
+ } else {
+ stop(simpleError("If 'id.name' is not \"auto\" it must have the same length as the menu levels!"))
+ }
+ } else {
+ new.id.name <- id.name
+ }
+ # check indexing
+ num.index <- length(index)
+ if(num.index > 1){
+ cat(num.index)
+ if(num.index == num.levels + 1){
+ new.index <- index[2:(num.levels + 1)]
+ index <- index[1]
+ } else {
+ stop(simpleError("If 'index' is not a single value it must have the length of the menu levels + 1 for the entry!"))
+ }
+ } else {
+ new.index <- -1
+ }
+ new.label <- menu.levels[[1]]
+ new.list <- menu.levels[2:num.levels]
+ # we still go deeper, so call ourselves recursively
+ nodes <- rk.XML.menu(label=new.label, new.list, index=new.index, id.name=new.id.name)
+ } else {
+ if(length(index) == 2){
+ entry.index <- index[2]
+ index <- index[1]
+ } else {
+ entry.index <- -1
+ }
+ nodes <- rk.XML.entry(component=menu.levels[[1]], index=entry.index)
+ # this is the last entry, i.e. *the* entry so we can stop here
+ }
+ } else {}
+
# check the node names and allow only valid ones
sapply(child.list(nodes), function(this.node){
stopifnot(inherits(this.node, "XiMpLe.node"))
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.pluginmap.R 2011-10-13 18:58:48 UTC (rev 3938)
@@ -8,10 +8,10 @@
#' one plugin component file name, relative path from the pluginmap file and ending with ".xml".
#' @param hierarchy Either an object of class \code{XiMpLe.node} to be pasted as the \code{<hierarchy>} section (see
#' \code{\link[rkwarddev:rk.XML.hierarchy]{rk.XML.hierarchy}} for details). Or a character vector with instructions
-#' where to place the plugin in the menu hierarchy, one string for each included component. Valid values are
+#' where to place the plugin in the menu hierarchy, one list or string for each included component. Valid single 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.
+#' \code{"analysis"}, \code{"plots"}, \code{"distributions"}, \code{"windows"}, \code{"settings"} and \code{"help"},
+#' anything else will place it in a "test" menu. If \code{hierarchy} is a list, each entry represents the label of a menu level.
#' @param require Either a (list of) objects of class \code{XiMpLe.node} to be pasted as a \code{<require>} section (see
#' \code{\link[rkwarddev:rk.XML.require]{rk.XML.require}} for details). Or a character vector with at least
#' one .pluginmap filename to be included in this one.
@@ -117,7 +117,11 @@
components.XML <- rk.XML.components(
as.list(sapply(components, function(this.comp){
# remove any directory names and .EXT endings
- xml.basename <- gsub("(.*/)?([[:alnum:]_]*).+(.*)?", "\\2", this.comp, perl=TRUE)
+ if(length(components) > 1) {
+ xml.basename <- gsub("(.*/)?([[:alnum:]_]*).+(.*)?", "\\2", this.comp, perl=TRUE)
+ } else {
+ xml.basename <- name.orig
+ }
rk.XML.component(
label=xml.basename,
file=this.comp,
@@ -139,6 +143,11 @@
} else {}
all.children[[length(all.children)+1]] <- hierarchy
} else {
+ # correct for cases with one component and a list
+ if(length(component.IDs) == 1 & is.list(hierarchy)){
+ if(!is.list(hierarchy[[1]]))
+ hierarchy <- list(hierarchy)
+ } else {}
# check if the numbers fit
if(length(hierarchy) != length(component.IDs)){
stop(simpleError("Length of 'hierarchy' and number of components must be the same!"))
@@ -150,23 +159,46 @@
hier.comp.XML <- sapply(1:length(hierarchy), function(this.dial){
this.comp <- component.IDs[this.dial]
- this.hier <- hierarchy[this.dial]
+ if(is.list(hierarchy)){
+ this.hier <- hierarchy[[this.dial]]
+ } else {
+ this.hier <- hierarchy[this.dial]
+ }
- entry.XML <- rk.XML.menu(
- label=name.orig,
- rk.XML.entry(component=this.comp),
- id.name=auto.ids(paste(name, this.comp, sep=""), prefix=ID.prefix("menu"), chars=12))
+ # hierachy can either be a list with menu paths, or predefined
+ if(is.list(this.hier)){
+ new.hierarchy <- this.hier[2:length(this.hier)]
+ new.hierarchy[[length(new.hierarchy) + 1]] <- this.comp
+ if(this.hier[[1]] %in% names(main.menu)){
+ id.names <- sapply(this.hier, function(hier.id){
+ return(clean.name(hier.id))
+ })
+ hier.XML <- rk.XML.menu(
+ label=unlist(main.menu[this.hier[[1]]]),
+ new.hierarchy,
+ id.name=id.names)
+ } else {
+ hier.XML <- rk.XML.menu(
+ label=this.hier[[1]],
+ new.hierarchy)
+ }
+ } else {
+ entry.XML <- rk.XML.menu(
+ label=name.orig,
+ rk.XML.entry(component=this.comp),
+ id.name=auto.ids(paste(name, this.comp, sep=""), prefix=ID.prefix("menu"), chars=12))
- if(this.hier %in% names(main.menu)){
- hier.XML <- rk.XML.menu(
- label=main.menu[this.hier],
- entry.XML,
- id.name=this.hier)
- } else {
- hier.XML <- rk.XML.menu(
- label="Test",
- entry.XML,
- id.name="test")
+ if(this.hier %in% names(main.menu)){
+ hier.XML <- rk.XML.menu(
+ label=main.menu[this.hier],
+ entry.XML,
+ id.name=this.hier)
+ } else {
+ hier.XML <- rk.XML.menu(
+ label="Test",
+ entry.XML,
+ id.name="test")
+ }
}
return(hier.XML)
})
Modified: trunk/rkward/packages/rkwarddev/R/rk.XML.saveobj.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.XML.saveobj.R 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/R/rk.XML.saveobj.R 2011-10-13 18:58:48 UTC (rev 3938)
@@ -38,7 +38,7 @@
if(identical(id.name, "auto")){
- attr.list[["id"]] <- list(id=auto.ids(label, prefix=ID.prefix("saveobject")))
+ attr.list[["id"]] <- auto.ids(label, prefix=ID.prefix("saveobject"))
} else if(!is.null(id.name)){
attr.list[["id"]] <- id.name
} else {}
Modified: trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/R/rk.plugin.skeleton.R 2011-10-13 18:58:48 UTC (rev 3938)
@@ -28,7 +28,7 @@
#' 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"}.
+#' \code{"name"}, \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:
@@ -301,15 +301,22 @@
pluginmap[[this.opt]] <- eval(formals(rk.XML.pluginmap)[[this.opt]])
} else {}
}
+ if(!"name" %in% got.pm.options){
+ pluginmap[["name"]] <- name.orig
+ } else {}
XML.pluginmap <- rk.XML.pluginmap(
- name=name.orig,
+ name=pluginmap[["name"]],
about=about,
components=paste("plugins/", name, ".xml", sep=""),
hierarchy=pluginmap[["hierarchy"]],
require=pluginmap[["require"]],
hints=TRUE)
cat(pasteXMLTree(XML.pluginmap, shine=2, indent.by=indent.by), file=plugin.pluginmap)
- } else {}
+ # needed for "show"
+ pm.id.name <- pluginmap[["name"]]
+ } else {
+ pm.id.name <- name
+ }
if(isTRUE(edit)){
rk.edit.files(plugin.pluginmap, title=plugin.fname.pluginmap, prompt=FALSE)
} else {}
@@ -317,7 +324,7 @@
rk.load.pluginmaps(plugin.pluginmap)
if(isTRUE(show)){
# call the plugin; reconstructed the ID generation from rk.XML.pluginmap()
- plugin.ID <- auto.ids(paste(name, name, sep=""), prefix=ID.prefix("component"), chars=25)
+ plugin.ID <- auto.ids(paste(pm.id.name, pm.id.name, sep=""), prefix=ID.prefix("component"), chars=25)
rk.call.plugin(paste("rkward::", plugin.ID, sep=""))
} else {}
} else {}
Modified: trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R
===================================================================
--- trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/R/rkwarddev-package.R 2011-10-13 18:58:48 UTC (rev 3938)
@@ -4,7 +4,7 @@
#' Package: \tab rkwarddev\cr
#' Type: \tab Package\cr
#' Version: \tab 0.03-6\cr
-#' Date: \tab 2011-10-12\cr
+#' Date: \tab 2011-10-13\cr
#' Depends: \tab R (>= 2.9.0),XiMpLe,rkward (>= 0.5.7)\cr
#' Enhances: \tab rkward\cr
#' Encoding: \tab UTF-8\cr
Modified: trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R
===================================================================
--- trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/demo/skeleton_dialog.R 2011-10-13 18:58:48 UTC (rev 3938)
@@ -8,7 +8,7 @@
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",
- version="0.03-3", url="http://rkward.sf.net"),
+ version="0.03-6", url="http://rkward.sf.net"),
dependencies=list(rkward.min="0.5.7")
)
@@ -200,7 +200,7 @@
js=list(
require="rkwarddev",
calculate=JS.calculate),
-# pluginmap=list(hierarchy="file"),
+# pluginmap=list(name="Create RKWard plugin skeleton", hierarchy=list(list("file", "export"))),
# overwrite=TRUE,
create=c("pmap","xml","js","desc"),
tests=FALSE,
Modified: trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.pdf
===================================================================
(Binary files differ)
Deleted: trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.tex
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.tex 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/inst/doc/rkwarddev_vignette.tex 2011-10-13 18:58:48 UTC (rev 3938)
@@ -1,97 +0,0 @@
-\documentclass[a4paper,10pt]{scrartcl}
-\usepackage[utf8x]{inputenc}
-\usepackage{apacite}
-
-%opening
-\title{RKWard plugin development with the \texttt{rkwarddev} package}
-%\VignetteIndexEntry{RKWard plugin development with the rkwarddev package}
-\author{m.eik michalke}
-
-\usepackage{Sweave}
-\begin{document}
-
-\maketitle
-
-\begin{abstract}
-Writing plugins for \texttt{RKWard} means writing at least two XML files (a GUI description and a plugin map),
-one JavaScript file (to create the \texttt{R} code), maybe a help file (again in XML), and for plugins who
-should be distributed, a DESCRIPTION file. Furtermore, all of these files need to be in a certain directory
-structure.
-
-The \texttt{rkwarddev} package aims to simplify this, by enabling you to fulfill all the listed tasks in just
-one \texttt{R} script.
-\end{abstract}
-
-\section{About the package}
-You might ask why you should write R scripts to generate plugins, if you could just directly write the XML
-and JavaScript files. First of all, you don't have to use this package at all, it's totally fine to code your
-plugins however you like. The main reason why I wrote this package is that I like to really concentrate on
-what I'm doing, so this is my attempt to avoid the need to switch between three different languages all the
-time. I wanted to be able to constantly ''think in \texttt{R}`` while working on a plugin. As a side effect, a
-lot of useful automation was implemented, and using this package will definitely save you quite some amount of
-typing.
-
-\section{Before we start}
-It is important to undertsand that while \texttt{rkwarddev} can help you to make designing new plugins
-much easier, you still need to know how the generated XML and JavaScript files work and interact. That is, if
-you didn't yet read the \textit{Introduction to Writing Plugins for
-RKWard},\footnote{\url{http://rkward.sourceforge.net/documents/devel/plugins/index.html}} please do so before
-you start working with this package. Once you're sure you understand how plugins in \texttt{RKWard} actually
-work, just come back here.
-
-\section{Ingredients}
-If you look at the contents of the package, you might feel a little lost because of the number of functions.
-So let's first see that there's actually some order in the chaos.
-
-Most functions start with the prefix \texttt{rk.} to indicate that they somehow belong to \texttt{RKWard}
-(we'll get to the exceptions later). After that, many names have another abbreviation by which they can
-roughly be classified into their specific ''area`` of plugin development:
-
-\begin{itemize}
- \item \texttt{rk.XML.*()}: XML code for GUI description (and plugin maps)
- \item \texttt{rk.JS.*()}: JavaScript code
- \item \texttt{rk.rkh.*()}: XML code for help pages
-\end{itemize}
-
-In short, you should find a \texttt{rk.XML.*()} equivalent to every XML tag explained in the
-\textit{Introduction to Writing Plugins for
-RKWard},\footnote{\url{http://rkward.sourceforge.net/documents/devel/plugins/index.html}}
-e.\,g. \texttt{rk.XML.dropdown()} to generate a \texttt{<dropdown>} menu node. There are a few functions for
-JavaScript generation which fall out of this scheme. That is because firstly they should be intuitively to use
-just like their JavaScript equivalent (like \texttt{echo()}), and secondly they are likely to be used very often
-in a script, so short names seemed to be a blessing here (like \texttt{id()} or \texttt{qp()}).
-
-Adding to that, there are some special functions, which will all be explained later, but here's the list,
-roughly ordered by the development stage they're used for:
-
-\begin{itemize}
- \item \texttt{rk.paste.JS()}: Paste JavaScript code from \texttt{R} objects
- \item \texttt{rk.XML.plugin()}: Combine XML objects into one plugin GUI object
- \item \texttt{rk.JS.scan()}: Scan a GUI XML file (or \texttt{R} object) and generate JavaScript code
- (define all relevant variables)
- \item \texttt{rk.JS.saveobj()}: Scan a GUI XML file (or \texttt{R} object) and generate JavaScript code
- (save result objects)
- \item \texttt{rk.JS.doc()}: Combine JavaScript parts into one plugin JavaScript file object
- \item \texttt{rk.rkh.scan()}: Scan a GUI XML file (or \texttt{R} object) and generate a help page skeleton
- \item \texttt{rk.rkh.doc()}: Combine XML objects into one help page object
- \item \texttt{rk.testsuite.doc()}: Paste a testsuite skeleton
- \item \texttt{rk.XML.pluginmap()}: Combine XML objects into one plugin map object
- \item \texttt{rk.plugin.skeleton()}: Generate actual plugin files from the plugin GUI, JavaScript, help page,
- testsuite and plugin map objects (i.\,e., put all of the above together)
- \item \texttt{rk.build.plugin()}: Compress the generated files into an installable \texttt{R} package for
- distribution
-\end{itemize}
-
-
-% \begin{Schunk}
-% \begin{Sinput}
-% \end{Sinput}
-% \begin{Soutput}
-% \end{Soutput}
-% \end{Schunk}
-
-% \bibliographystyle{apacite}
-% \addcontentsline{toc}{chapter}{\bibname}
-% \bibliography{rkwarddev_lit}
-
-\end{document}
Modified: trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
===================================================================
--- trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap 2011-10-13 18:58:48 UTC (rev 3938)
@@ -1,15 +1,15 @@
<!DOCTYPE rkpluginmap >
<document
namespace="rkward"
- id="RKWardPluginSkeleton_rkward"
+ id="CreateRKWardpluginskeleton_rkward"
>
<about
name="Plugin Skeleton"
shortinfo="GUI interface to create RKWard plugin skeletons"
- version="0.03-3"
- releasedate="2011-10-09"
+ version="0.03-6"
+ releasedate="2011-10-13"
url="http://rkward.sf.net"
- license="GPL (>= 3)"
+ license="GPL (>= 3)"
>
<author
given="Meik"
@@ -43,8 +43,8 @@
-->
<components>
<component
- id="cmp_RKWrdPlgnSkltnRKWrdPlgnSk"
- label="RKWardPluginSkeleton"
+ id="cmp_CrtRKWrdplgnskltnCrtRKWrd"
+ label="Create RKWard plugin skeleton"
type="standard"
file="plugins/RKWardPluginSkeleton.xml"
/>
@@ -52,20 +52,22 @@
<hierarchy>
<menu
id="file"
- label="File"
+ label.file="File"
>
<menu
- id="men_RKWPSRKWPSRK"
- label="RKWard Plugin Skeleton"
+ id="export"
+ label="export"
>
- <entry component="cmp_RKWrdPlgnSkltnRKWrdPlgnSk" />
+ <entry component="cmp_CrtRKWrdplgnskltnCrtRKWrd" />
</menu>
</menu>
</hierarchy>
<!--
- <context id="x11"></context>
+ <context id="x11">
+ </context>
-->
<!--
- <context id="import"></context>
+ <context id="import">
+ </context>
-->
</document>
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.entry.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.entry.Rd 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.entry.Rd 2011-10-13 18:58:48 UTC (rev 3938)
@@ -5,7 +5,8 @@
rk.XML.entry(component, index = -1)
}
\arguments{
- \item{component}{An ID.}
+ \item{component}{A "component" object of class
+ \code{XiMpLe.node}, or an ID.}
\item{index}{Integer number to influence the level of
menu placement.}
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.menu.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.menu.Rd 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.menu.Rd 2011-10-13 18:58:48 UTC (rev 3938)
@@ -7,16 +7,24 @@
\arguments{
\item{label}{Character string, a label for the menu.}
- \item{...}{Objects of class \code{XiMpLe.node}, must be
- either "menu" or "entry".}
+ \item{...}{Eithet objects of class \code{XiMpLe.node},
+ must be either "menu" or "entry", or a list of character
+ strings representing the menu path, with the last element
+ being the \code{component} value for
+ \code{\link[rkwarddev:rk.XML.entry]{rk.XML.entry}}.}
\item{index}{Integer number to influence the level of
- menu placement.}
+ menu placement. If \code{...} is a list, \code{index} can
+ also be a vector of the same length + 1, so indices will
+ be set in the same order to the menu levels, the last
+ value is for the entry.}
- \item{id.name}{Character string, a unique ID for this
- plugin element. If \code{"auto"}, an ID will be generated
- automatically from the label. Used to place the menu in
- the global menu hierarchy.}
+ \item{id.name}{Character, a unique ID for this plugin
+ element. If \code{"auto"}, an ID will be generated
+ automatically from the label. Otherwise, if \code{...} is
+ a list, \code{id.name} must have the same length and will
+ be set in the same order to the menu levels. Used to
+ place the menu in the global menu hierarchy.}
}
\value{
An object of class \code{XiMpLe.node}.
@@ -31,6 +39,8 @@
test.entry <- rk.XML.entry(test.component)
test.menu <- rk.XML.menu("Analysis", test.entry, id.name="analysis")
cat(pasteXMLNode(test.menu))
+# manual definition of a menu path by a list:
+test.menu <- rk.XML.menu("Analysis", list("Level 1", "Level 2", test.component))
}
\seealso{
\code{\link[rkwarddev:rk.XML.hierarchy]{rk.XML.hierarchy}},
Modified: trunk/rkward/packages/rkwarddev/man/rk.XML.pluginmap.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.XML.pluginmap.Rd 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/man/rk.XML.pluginmap.Rd 2011-10-13 18:58:48 UTC (rev 3938)
@@ -27,14 +27,15 @@
section (see
\code{\link[rkwarddev:rk.XML.hierarchy]{rk.XML.hierarchy}}
for details). Or a character vector with instructions
- where to place the plugin in the menu hierarchy, one
- string for each included component. Valid values are
- \code{"file"}, \code{"edit"}, \code{"view"},
+ where to place the plugin in the menu hierarchy, one list
+ or string for each included component. Valid single
+ 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.}
+ \code{"settings"} and \code{"help"}, anything else will
+ place it in a "test" menu. If \code{hierarchy} is a list,
+ each entry represents the label of a menu level.}
\item{require}{Either a (list of) objects of class
\code{XiMpLe.node} to be pasted as a \code{<require>}
Modified: trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/man/rk.plugin.skeleton.Rd 2011-10-13 18:58:48 UTC (rev 3938)
@@ -75,7 +75,7 @@
\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
+ Valid options are: \code{"name"}, \code{"hierarchy"} and
\code{"require"}. If not set, their default values are
used. See
\code{\link[rkwarddev:rk.XML.pluginmap]{rk.XML.pluginmap}}
Modified: trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd
===================================================================
--- trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2011-10-12 13:03:18 UTC (rev 3937)
+++ trunk/rkward/packages/rkwarddev/man/rkwarddev-package.Rd 2011-10-13 18:58:48 UTC (rev 3938)
@@ -9,7 +9,7 @@
\details{
\tabular{ll}{ Package: \tab rkwarddev\cr Type: \tab
Package\cr Version: \tab 0.03-6\cr Date: \tab
- 2011-10-12\cr Depends: \tab R (>= 2.9.0),XiMpLe,rkward
+ 2011-10-13\cr Depends: \tab R (>= 2.9.0),XiMpLe,rkward
(>= 0.5.7)\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