[rkward] packages/rkwarddev: updated generator script
m.eik michalke
meik.michalke at uni-duesseldorf.de
Sun Nov 22 20:03:51 UTC 2015
Git commit 1ee2cdafb2bdf1decb29eaaadd2e104b06b0281e by m.eik michalke.
Committed on 22/11/2015 at 20:03.
Pushed by meikm into branch 'master'.
updated generator script
- renamed objects and set element IDs to get code that's easier to compare
M +167 -138 packages/rkwarddev/demo/skeleton_dialog.R
M +51 -55 packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
M +325 -327 packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
M +139 -141 packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh
M +164 -166 packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
http://commits.kde.org/rkward/1ee2cdafb2bdf1decb29eaaadd2e104b06b0281e
diff --git a/packages/rkwarddev/demo/skeleton_dialog.R b/packages/rkwarddev/demo/skeleton_dialog.R
index 6316f8a..d1bc5e7 100644
--- a/packages/rkwarddev/demo/skeleton_dialog.R
+++ b/packages/rkwarddev/demo/skeleton_dialog.R
@@ -1,12 +1,19 @@
## create dialog to build a plugin skeleton
require(rkwarddev)
-rkwarddev.required("0.06-5")
+rkwarddev.required("0.07-4")
local({
# define where the plugin should write its files
output.dir <- tempdir()
# overwrite an existing plugin in output.dir?
overwrite <- TRUE
+rk.set.indent(by=" ")
+rk.set.empty.e(TRUE)
+update.translations <- TRUE
+# the script generates a folder called "RKWardPluginSkeleton", set the
+# following to FALSE if you want to translate plugin files in the
+# rkwarddev package sources instead
+standalonePlugin <- TRUE
about.info <- rk.XML.about(
name="RKWard Plugin Skeleton",
@@ -16,123 +23,128 @@ about.info <- rk.XML.about(
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.kde.org")
+ version="0.07-4", url="http://rkward.kde.org")
)
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(
+aboutPlugin <- rk.XML.frame(
rk.XML.row(
- pl.name <- rk.XML.input("Plugin name", required=TRUE, size="small",
+ pluginName <- rk.XML.input("Plugin name", required=TRUE, size="small", id.name="pluginName",
help="Give the name for your new plugin here."),
- pl.license <- rk.XML.input("License", initial="GPL (>= 3)", required=TRUE,
+ pluginLicense <- rk.XML.input("License", initial="GPL (>= 3)", required=TRUE, id.name="pluginLicense",
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,
+ rk.XML.row(pluginDescription <- rk.XML.input("Short description", required=TRUE, id.name="pluginDescription",
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,
+ pluginVersion <- rk.XML.input("Version number", initial="0.01-0", required=TRUE, id.name="pluginVersion",
help="Version information for your plugin."),
- pl.date <- rk.XML.input("Release date (empty for today)",
+ pluginDate <- rk.XML.input("Release date (empty for today)", id.name="pluginDate",
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",
+ pluginHomepage <- rk.XML.input("Homepage", id.name="pluginHomepage",
help="A URL where one can find more information on the plugin, download updates etc."),
- pl.category<- rk.XML.input("Category",
+ pluginCategory <- rk.XML.input("Category", id.name="pluginCategory",
help="A category for your plugin. This infromation is currently ignored by RKWard.")),
- label="About the plugin")
-# about.contact <- rk.XML.frame(
+ label="About the plugin",
+ id.name="aboutPlugin"
+)
+# aboutContact <- rk.XML.frame(
# rk.XML.row(
# rk.XML.col(
-# aut.given <- rk.XML.input("Given name", required=TRUE,
+# authorGivenName <- rk.XML.input("Given name", required=TRUE,
# help="First name of the package author."),
-# aut.family <- rk.XML.input("Family name", required=TRUE,
+# authorFamiliyName <- rk.XML.input("Family name", required=TRUE,
# help="Family name of the package author."),
-# aut.email <- rk.XML.input("E-mail", required=TRUE,
+# authorMail <- 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,
+# authorAut <- 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,
+# authorCre <- rk.XML.cbox("Maintainer", chk=TRUE,
# help="Check this if you maintain the plugin package."),
# rk.XML.stretch(), label="Author roles"))),
# label="Plugin author")
-about.contact <- rk.XML.frame(
+aboutContact <- rk.XML.frame(
rk.XML.row(
- oset.authors <- rk.XML.optionset(
+ optionsetAuthors <- rk.XML.optionset(
content=rk.XML.frame(rk.XML.stretch(before=list(
rk.XML.row(
- frm.about.contact <- rk.XML.frame(
+ aboutContactFrame <- rk.XML.frame(
rk.XML.row(
rk.XML.col(
- aut.given <- rk.XML.input("Given name", required=TRUE,
+ authorGivenName <- rk.XML.input("Given name", required=TRUE, id.name="authorGivenName",
help="First name of the package author."),
- aut.family <- rk.XML.input("Family name", required=TRUE,
+ authorFamiliyName <- rk.XML.input("Family name", required=TRUE, id.name="authorFamiliyName",
help="Family name of the package author."),
- aut.email <- rk.XML.input("E-mail", required=FALSE,
+ authorMail <- rk.XML.input("E-mail", required=FALSE, id.name="authorMail",
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,
+ authorAut <- rk.XML.cbox("Author", chk=TRUE, id.name="authorAut",
help="Check this if this person is the author of the plugin code."),
- aut.maint <- rk.XML.cbox("Maintainer", chk=TRUE,
+ authorCre <- rk.XML.cbox("Maintainer", chk=TRUE, id.name="authorCre",
help="Check this if this person maintains the plugin package."),
- aut.cntr <- rk.XML.cbox("Contributor", chk=FALSE,
+ authorCtb <- rk.XML.cbox("Contributor", chk=FALSE, id.name="authorCtb",
help="Check this if this person is a contributor to the plugin code (e.g., translations)."),
rk.XML.stretch(), label="Roles"))),
- label="Package author"
+ label="Package author",
+ id.name="aboutContactFrame"
)
)
)), label="Package authors"),
optioncolumn=list(
- optioncol.aut.given <- rk.XML.optioncolumn(connect=aut.given, modifier="text"),
- optioncol.aut.family <- rk.XML.optioncolumn(connect=aut.family, modifier="text"),
- optioncol.aut.email <- rk.XML.optioncolumn(connect=aut.email, modifier="text"),
- optioncol.aut.auth <- rk.XML.optioncolumn(connect=aut.auth, modifier="state"),
- optioncol.aut.maint <- rk.XML.optioncolumn(connect=aut.maint, modifier="state"),
- optioncol.aut.cntr <- rk.XML.optioncolumn(connect=aut.cntr, modifier="state")
+ optcolAuthorGivenName <- rk.XML.optioncolumn(connect=authorGivenName, modifier="text", id.name="optcolAuthorGivenName"),
+ optcolAuthorFamiliyName <- rk.XML.optioncolumn(connect=authorFamiliyName, modifier="text", id.name="optcolAuthorFamiliyName"),
+ optcolAuthorMail <- rk.XML.optioncolumn(connect=authorMail, modifier="text", id.name="optcolAuthorMail"),
+ optcolAuthorAut <- rk.XML.optioncolumn(connect=authorAut, modifier="state", id.name="optcolAuthorAut"),
+ optcolAuthorCre <- rk.XML.optioncolumn(connect=authorCre, modifier="state", id.name="optcolAuthorCre"),
+ optcolAuthorCtb <- rk.XML.optioncolumn(connect=authorCtb, modifier="state", id.name="optcolAuthorCtb")
),
logic=rk.XML.logic(
- rk.XML.connect(governor=aut.maint, client=aut.email, set="required")
- )
+ rk.XML.connect(governor=authorCre, client=authorMail, set="required")
+ ),
+ id.name="optionsetAuthors"
)
),
- label="Plugin author"
+ label="Plugin author",
+ id.name="aboutContact"
)
-tab1.about <- rk.XML.col(about.plugin, about.contact)
+tab1.about <- rk.XML.col(aboutPlugin, aboutContact)
# 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,
+createOptionsFrame <- rk.XML.frame(
+ rk.XML.row(outDir <- rk.XML.browser("Directory to save to (empty for $TEMPDIR)", type="dir", required=FALSE, id.name="outDir",
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,
+ overwrite <- rk.XML.cbox("Overwrite existing files", chk=FALSE, id.name="overwrite",
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,
+ addWizard <- rk.XML.cbox("Add wizard section", chk=FALSE, id.name="addWizard",
help="If this is checked, a wizard section will be included in the skeleton."),
- pl.tests <- rk.XML.cbox("Include plugin tests", chk=TRUE,
+ addTests <- rk.XML.cbox("Include plugin tests", chk=TRUE, id.name="addTests",
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,
+ editPlugin <- rk.XML.cbox("Open files for editing", chk=TRUE, id.name="editPlugin",
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,
+ addToConfig <- rk.XML.cbox("Add plugin to RKWard configuration", chk=TRUE, id.name="addToConfig",
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,
+ showPlugin <- rk.XML.cbox("Show the plugin", chk=FALSE, id.name="showPlugin",
help="If this is checked, the generated plugin will be shown (opened) for you to see what it looks like."),
- pl.guessgetter <- rk.XML.cbox("Guess getter functions (RKWard >= 0.6.0)", chk=FALSE,
+ guessGetters <- rk.XML.cbox("Guess getter functions (RKWard >= 0.6.0)", chk=FALSE, id.name="guessGetters",
help="If this is checked, rkwarddev tries to select the optimal getter functions to get data from the dialog into the R code. The plugin then requires RKWard >= 0.6.0."),
rk.XML.stretch())
),
rk.XML.frame(
- rk.XML.row(pl.hier <- rk.XML.dropdown("Place in top menu",
+ rk.XML.row(menuHier <- rk.XML.dropdown("Place in top menu",
options=list(
"Test (created if needed)"=c(val="test", chk=TRUE),
"File"=c(val="file"),
@@ -148,53 +160,59 @@ crt.opts <- rk.XML.frame(
"Settings"=c(val="settings"),
"Help"=c(val="help")
),
+ id.name="menuHier",
help="Specify where the plugin should appear in RKWard's top menus."
),
- pl.hier.name <- rk.XML.input("Name in menu (plugin name if empty)",
+ menuName <- rk.XML.input("Name in menu (plugin name if empty)", id.name="menuName",
help="You can set the exact entry name of your main component in the menu here. If left empty, the plugin name will be used as default.")
)
- )
+ ),
+ id.name="createOptionsFrame"
)
-dep.opts <- rk.XML.frame(
+dependencyFrame <- rk.XML.frame(
rk.XML.row(
- dep.frame.RKWard <- rk.XML.frame(
- dep.rkmin <- rk.XML.input("RKWard min", size="small",
+ RKFrame <- rk.XML.frame(
+ RKMin <- rk.XML.input("RKWard min", size="small", id.name="RKMin",
help="The minimum version number of RKWard required to run this plugin."),
- dep.rkmax <- rk.XML.input("RKWard max", size="small",
+ RKMax <- rk.XML.input("RKWard max", size="small", id.name="RKMax",
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",
+ rk.XML.stretch(), label="Depends on RKWard version", id.name="RKFrame"),
+ RFrame <- rk.XML.frame(
+ RMin <- rk.XML.input("R min", size="small", id.name="RMin",
help="The minimum version number of R required to run this plugin."),
- dep.rmax <- rk.XML.input("R max", size="small",
+ RMax <- rk.XML.input("R max", size="small", id.name="RMax",
help="The maximum version number of R required to run this plugin."),
- rk.XML.stretch(), label="Depends on R version")),
+ rk.XML.stretch(), label="Depends on R version", id.name="RFrame")),
rk.XML.row(
- dep.optionset.packages <- rk.XML.optionset(
+ dependencyOptionset <- rk.XML.optionset(
content=rk.XML.frame(rk.XML.stretch(before=list(
rk.XML.row(
- dep.pckg.name <- rk.XML.input("Package",
+ pckgName <- rk.XML.input("Package", id.name="pckgName",
help="The names of R packages required to run this plugin."),
- dep.pckg.min <- rk.XML.input("min",
+ pckgMin <- rk.XML.input("min", id.name="pckgMin",
help="The minimum version number of R packages required to run this plugin."),
- dep.pckg.max <- rk.XML.input("max",
+ pckgMax <- rk.XML.input("max", id.name="pckgMax",
help="The maximum version number of R packages required to run this plugin."),
- dep.pckg.repo <- rk.XML.input("Repository",
+ pckgRepo <- rk.XML.input("Repository", id.name="pckgRepo",
help="The repository to download R packages from required to run this plugin.")
)
)), 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")
- )
+ optcolPckgName <- rk.XML.optioncolumn(connect=pckgName, modifier="text", id.name="optcolPckgName"),
+ optcolPckgMin <- rk.XML.optioncolumn(connect=pckgMin, modifier="text", id.name="optcolPckgMin"),
+ optcolPckgMax <- rk.XML.optioncolumn(connect=pckgMax, modifier="text", id.name="optcolPckgMax"),
+ optcolPckgRepo <- rk.XML.optioncolumn(connect=pckgRepo, modifier="text", id.name="optcolPckgRepo")
+ ),
+ id.name="dependencyOptionset"
)
),
- label="Define dependencies", checkable=TRUE, chk=FALSE
+ label="Define dependencies",
+ checkable=TRUE,
+ chk=FALSE,
+ id.name="dependencyFrame"
)
-tab2.create <- rk.XML.col(crt.opts, dep.opts)
+tab2.create <- rk.XML.col(createOptionsFrame, dependencyFrame)
# # 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?)")
@@ -213,18 +231,20 @@ tab2.create <- rk.XML.col(crt.opts, dep.opts)
# rk.XML.stretch())
# ))
# tab3.children <- rk.XML.col(rk.XML.row(children.text), rk.XML.row(children.var))
-help.text.summary <- rk.XML.input("Summary", size="large",
+helpSummary <- rk.XML.input("Summary", size="large", id.name="helpSummary",
help="Give a short summary of the plugin for the help page. If empty, the short description is taken as the default.")
-help.text.usage <- rk.XML.input("Usage", size="large",
+helpUsage <- rk.XML.input("Usage", size="large", id.name="helpUsage",
help="A general note on how to use the plugin.")
-help.text <- rk.XML.frame(
- rk.XML.row(help.text.summary),
- rk.XML.row(help.text.usage),
+helpText <- rk.XML.frame(
+ rk.XML.row(helpSummary),
+ rk.XML.row(helpUsage),
label="Write help files",
checkable=TRUE,
- chk=FALSE)
+ chk=FALSE,
+ id.name="helpText"
+)
-tab3.help <- rk.XML.col(help.text)
+tab3.help <- rk.XML.col(helpText)
## glue all of the above together in one tabbook
# sklt.tabbook <- rk.XML.dialog(rk.XML.tabbook("Plugin Skeleton",
@@ -239,89 +259,89 @@ sklt.tabbook <- rk.XML.dialog(rk.XML.tabbook("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=dependencyFrame, get="checked", client=RKFrame, set="enabled"),
+ rk.XML.connect(governor=dependencyFrame, get="checked", client=RFrame, set="enabled")#,
+# rk.XML.connect(governor=dependencyFrame, client=dep.frame.packages, set="enabled")
)
## JS code generation
# 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,"\"")),
+ ite(pluginDescription, qp("desc=\"",pluginDescription,"\"")),
+ ite(pluginVersion, qp("version=\"",pluginVersion,"\"")),
+ ite(pluginDate, qp("date=\"",pluginDate,"\"")),
+ ite(pluginHomepage, qp("url=\"",pluginHomepage,"\"")),
+ ite(pluginLicense, qp("license=\"",pluginLicense,"\"")),
+ ite(pluginCategory, qp("category=\"",pluginCategory,"\"")),
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.frm.dependencyFrame <- rk.JS.vars(dependencyFrame, 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,"\"")),
+ ite(id(js.frm.dependencyFrame, " && ", RKMin), qp("rkward.min=\"",RKMin,"\"")),
+ ite(id(js.frm.dependencyFrame, " && ", RKMax), qp("rkward.max=\"",RKMax,"\"")),
+ ite(id(js.frm.dependencyFrame, " && ", RMin), qp("R.min=\"",RMin,"\"")),
+ ite(id(js.frm.dependencyFrame, " && ", RMax), qp("R.max=\"",RMax,"\"")),
funct="list", option="dependencies", collapse=",\\n\\t")
js.opt.skel.pluginmap <- rk.JS.options("optPluginmap",
- ite(pl.hier.name,
- qp("name=\"", pl.hier.name, "\""),
- qp("name=\"", pl.name, "\"")
+ ite(menuName,
+ qp("name=\"", menuName, "\""),
+ qp("name=\"", pluginName, "\"")
),
- ite(pl.hier, qp("hierarchy=\"", pl.hier, "\"")),
+ ite(menuHier, qp("hierarchy=\"", menuHier, "\"")),
funct="list", option="pluginmap", collapse="", opt.sep="")
js.opt.skeleton <- rk.JS.options("optSkeleton",
- ite(pl.wiz, qp("\n\tprovides=c(\"logic\", \"dialog\", \"wizard\")"), qp("\n\t#provides=c(\"logic\", \"dialog\")")),
+ ite(addWizard, qp("\n\tprovides=c(\"logic\", \"dialog\", \"wizard\")"), qp("\n\t#provides=c(\"logic\", \"dialog\")")),
ite(js.opt.skel.pluginmap,
qp("\n\t", js.opt.skel.pluginmap),
qp("\n\t#pluginmap=list(name=\"\", hierarchy=\"\", require=\"\")")
),
-# ite(id(js.frm.dep.opts, " && (", js.opt.about.dep, " || ", dep.optioncol.pckg.name, ")"),
+# ite(id(js.frm.dependencyFrame, " && (", js.opt.about.dep, " || ", optcolPckgName, ")"),
# qp("\n\tdependencies=plugin.dependencies"),
# qp("\n\t#dependencies=plugin.dependencies")
# ),
- ite(pl.tests, qp("\n\ttests=TRUE"), qp("\n\ttests=FALSE")),
- ite(pl.edit, qp("\n\tedit=TRUE"), qp("\n\tedit=FALSE")),
- ite(pl.add, qp("\n\tload=TRUE"), qp("\n\tload=FALSE")),
- ite(pl.show, qp("\n\tshow=TRUE"), qp("\n\tshow=FALSE")),
+ ite(addTests, qp("\n\ttests=TRUE"), qp("\n\ttests=FALSE")),
+ ite(editPlugin, qp("\n\tedit=TRUE"), qp("\n\tedit=FALSE")),
+ ite(addToConfig, qp("\n\tload=TRUE"), qp("\n\tload=FALSE")),
+ ite(showPlugin, qp("\n\tshow=TRUE"), qp("\n\tshow=FALSE")),
collapse="")
JS.prepare <- rk.paste.JS(
- rk.JS.vars(pl.dir, pl.overw, pl.guessgetter),
- echo("rkwarddev.required(\"0.06-5\")"),
+ rk.JS.vars(outDir, overwrite, guessGetters),
+ echo("rkwarddev.required(\"0.07-4\")"),
echo("\n\n# define where the plugin should write its files\noutput.dir <- "),
- ite(pl.dir, echo("\"", pl.dir, "\""), echo("tempdir()")),
+ ite(outDir, echo("\"", outDir, "\""), echo("tempdir()")),
echo("\n# overwrite an existing plugin in output.dir?\noverwrite <- "),
- ite(pl.overw, echo("TRUE"), echo("FALSE")),
+ ite(overwrite, echo("TRUE"), echo("FALSE")),
echo("\n# if you set guess.getters to TRUE, the resulting code will need RKWard >= 0.6.0\nguess.getter <- "),
- ite(pl.guessgetter, echo("TRUE"), echo("FALSE")),
+ ite(guessGetters, echo("TRUE"), echo("FALSE")),
echo("\n\n"),
level=2)
-js.frm.help.text <- rk.JS.vars(help.text, modifiers="checked")
+js.frm.helpText <- rk.JS.vars(helpText, modifiers="checked")
JS.calculate <- rk.paste.JS(
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("aboutPlugin <- rk.XML.about("),
+ ite(pluginName, echo("\n\tname=\"", pluginName, "\"")),
# author section
- rk.JS.optionset(oset.authors, vars=TRUE, guess.getter=TRUE),
- ite(id(optioncol.aut.given, " != \"\""),
+ rk.JS.optionset(optionsetAuthors, vars=TRUE, guess.getter=TRUE),
+ ite(id(optcolAuthorGivenName, " != \"\""),
rk.paste.JS(
echo("\tauthor=c(\n\t\t\t"),
- rk.JS.optionset(oset.authors,
- js.oset.authors.role <- rk.JS.options("optAuthorRole",
- ite(id(optioncol.aut.auth, " == 1"), qp("\"aut\"")),
- ite(id(optioncol.aut.maint, " == 1"), qp("\"cre\"")),
- ite(id(optioncol.aut.cntr, " == 1"), qp("\"ctb\"")),
+ rk.JS.optionset(optionsetAuthors,
+ js.optionsetAuthors.role <- rk.JS.options("optAuthorRole",
+ ite(id(optcolAuthorAut, " == 1"), qp("\"aut\"")),
+ ite(id(optcolAuthorCre, " == 1"), qp("\"cre\"")),
+ ite(id(optcolAuthorCtb, " == 1"), qp("\"ctb\"")),
funct="c", option="role", collapse=""),
echo("person("),
- echo("given=\"", optioncol.aut.given, "\""),
- ite(optioncol.aut.family, echo(", family=\"", optioncol.aut.family, "\"")),
- ite(optioncol.aut.email, echo(", email=\"", optioncol.aut.email, "\"")),
- ite(js.oset.authors.role, echo(js.oset.authors.role)),
+ echo("given=\"", optcolAuthorGivenName, "\""),
+ ite(optcolAuthorFamiliyName, echo(", family=\"", optcolAuthorFamiliyName, "\"")),
+ ite(optcolAuthorMail, echo(", email=\"", optcolAuthorMail, "\"")),
+ ite(js.optionsetAuthors.role, echo(js.optionsetAuthors.role)),
echo(")"),
collapse=",\\n\\t\\t\\t"
),
@@ -330,20 +350,20 @@ JS.calculate <- rk.paste.JS(
),
echo(js.opt.about.about),
echo("\n)\n\n"),
- ite(id(js.frm.dep.opts, " && (", js.opt.about.dep, " || ", dep.optioncol.pckg.name, ")"),
+ ite(id(js.frm.dependencyFrame, " && (", js.opt.about.dep, " || ", optcolPckgName, ")"),
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 , "!= \"\""),
+ ite(id(js.opt.about.dep, " && ", optcolPckgName), echo(",")),
+ ite(id(optcolPckgName , "!= \"\""),
rk.paste.JS(
echo("\n\tpackage=list(\n\t\t"),
- rk.JS.optionset(dep.optionset.packages,
+ rk.JS.optionset(dependencyOptionset,
echo("c("),
- echo("name=\"", dep.optioncol.pckg.name, "\""),
- ite(dep.optioncol.pckg.min, echo(", min=\"", dep.optioncol.pckg.min, "\"")),
- ite(dep.optioncol.pckg.max, echo(", max=\"", dep.optioncol.pckg.max, "\"")),
- ite(dep.optioncol.pckg.repo, echo(", repository=\"", dep.optioncol.pckg.repo, "\"")),
+ echo("name=\"", optcolPckgName, "\""),
+ ite(optcolPckgMin, echo(", min=\"", optcolPckgMin, "\"")),
+ ite(optcolPckgMax, echo(", max=\"", optcolPckgMax, "\"")),
+ ite(optcolPckgRepo, echo(", repository=\"", optcolPckgRepo, "\"")),
echo(")"),
collapse=",\\n\\t\\t"
),
@@ -353,25 +373,25 @@ JS.calculate <- rk.paste.JS(
echo("\n)\n\n"),
level=3)),
echo("# name of the main component, relevant for help page content\nrk.set.comp(\""),
- ite(pl.hier.name,
- echo(pl.hier.name, "\")\n\n"),
- echo(pl.name, "\")\n\n")
+ ite(menuName,
+ echo(menuName, "\")\n\n"),
+ echo(pluginName, "\")\n\n")
),
echo("############\n## your plugin dialog and JavaScript should be put here\n############\n\n"),
- ite(js.frm.help.text,
+ ite(js.frm.helpText,
rk.paste.JS(
echo("############\n## help page\nplugin.summary <- rk.rkh.summary(\n\t"),
- ite(help.text.summary, echo("\"", help.text.summary, "\"\n)"), echo("\"", pl.desc, "\"\n)")),
- echo("\nplugin.usage <- rk.rkh.usage(\n\t\"", help.text.usage, "\"\n)\n\n"),
+ ite(helpSummary, echo("\"", helpSummary, "\"\n)"), echo("\"", pluginDescription, "\"\n)")),
+ echo("\nplugin.usage <- rk.rkh.usage(\n\t\"", helpUsage, "\"\n)\n\n"),
level=3)),
echo("#############\n",
"## the main call\n",
"## if you run the following function call, files will be written to output.dir!\n",
"#############\n",
"# this is where things get serious, that is, here all of the above is put together into one plugin\n",
- "plugin.dir <- rk.plugin.skeleton(\n\tabout=about.plugin,"),
+ "plugin.dir <- rk.plugin.skeleton(\n\tabout=aboutPlugin,"),
ite(
- id(js.frm.dep.opts, " && ", js.opt.about.dep),
+ id(js.frm.dependencyFrame, " && ", js.opt.about.dep),
echo("\n\tdependencies=plugin.dependencies,"),
echo("\n\t#dependencies=plugin.dependencies,")
),
@@ -382,7 +402,7 @@ JS.calculate <- rk.paste.JS(
"\n\tjs=list(\n\t\t#results.header=FALSE,\n\t\t#load.silencer=,\n\t\t#require=,\n\t\t#variables=,",
"\n\t\t#globals=,\n\t\t#preprocess=,\n\t\t#calculate=,\n\t\t#printout=,\n\t\t#doPrintout=\n\t),"
),
- ite(js.frm.help.text,
+ ite(js.frm.helpText,
echo(
"\n\trkh=list(\n\t\tsummary=plugin.summary,\n\t\tusage=plugin.usage#,",
"\n\t\t#sections=,\n\t\t#settings=,\n\t\t#related=,\n\t\t#technical=\n\t),",
@@ -438,5 +458,14 @@ rk.plugin.skeleton(
show=TRUE,
# load=TRUE,
# edit=TRUE,
- hints=FALSE)
+ hints=FALSE,
+ gen.info="$SRC/demo/skeleton_dialog.R")
+
+ if(isTRUE(update.translations)){
+ if(isTRUE(standalonePlugin)){
+ rk.updatePluginMessages(file.path(output.dir,"RKWardPluginSkeleton","inst","rkward","RKWardPluginSkeleton.pluginmap"))
+ } else {
+ rk.updatePluginMessages(file.path(output.dir,"rkwarddev","inst","rkward","rkwarddev.pluginmap"))
+ }
+ } else {}
})
diff --git a/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap b/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
index 4e31cff..0aef4d7 100644
--- a/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
+++ b/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
@@ -1,59 +1,55 @@
<!DOCTYPE rkpluginmap >
<document
- base_prefix=""
- namespace="CreateRKWardpluginskeleton"
- id="CreateRKWardpluginskeleton_rkward"
- po_id="CreateRKWardpluginskeleton_rkward"
- priority="medium"
+ base_prefix=""
+ namespace="CreateRKWardpluginskeleton"
+ id="CreateRKWardpluginskeleton_rkward"
+ po_id="CreateRKWardpluginskeleton_rkward"
+ priority="medium"
>
- <!--
- this code was generated using the rkwarddev package.
- perhaps don't make changes here, but in the rkwarddev script instead!
- -->
- <dependencies rkward_min_version="0.6.0">
- </dependencies>
- <about
- name="RKWard Plugin Skeleton"
- shortinfo="GUI interface to create RKWard plugin skeletons"
- longinfo="GUI interface to create RKWard plugin skeletons"
- version="0.06-5"
- releasedate="2015-10-08"
- url="http://rkward.kde.org"
- license="GPL (>= 3)"
- >
- <author
- given="Meik"
- family="Michalke"
- email="meik.michalke at hhu.de"
- role="aut, cre"
- />
- </about>
- <require
- map="rkward::menu"
- />
- <require
- map="rkward::embedded"
- />
- <components>
- <component
- id="cmp_CrtRKWrdplgnskltnCrtRKWrd"
- label="Create RKWard plugin skeleton"
- type="standard"
- file="plugins/CreateRKWardpluginskeleton.xml"
- >
- </component>
- </components>
- <hierarchy>
- <menu
- id="file"
- label="File"
- >
- <menu
- id="export"
- label="export"
- >
- <entry component="cmp_CrtRKWrdplgnskltnCrtRKWrd" />
- </menu>
- </menu>
- </hierarchy>
+ <dependencies rkward_min_version="0.6.0">
+ </dependencies>
+ <about
+ name="RKWard Plugin Skeleton"
+ shortinfo="GUI interface to create RKWard plugin skeletons"
+ longinfo="GUI interface to create RKWard plugin skeletons"
+ version="0.07-4"
+ releasedate="2015-11-22"
+ url="http://rkward.kde.org"
+ license="GPL (>= 3)"
+ >
+ <author
+ given="Meik"
+ family="Michalke"
+ email="meik.michalke at hhu.de"
+ role="aut, cre"
+ />
+ </about>
+ <require
+ map="rkward::menu"
+ />
+ <require
+ map="rkward::embedded"
+ />
+ <components>
+ <component
+ id="cmp_CrtRKWrdplgnskltnCrtRKWrd"
+ label="Create RKWard plugin skeleton"
+ type="standard"
+ file="plugins/CreateRKWardpluginskeleton.xml"
+ >
+ </component>
+ </components>
+ <hierarchy>
+ <menu
+ id="file"
+ label="File"
+ >
+ <menu
+ id="export"
+ label="export"
+ >
+ <entry component="cmp_CrtRKWrdplgnskltnCrtRKWrd" />
+ </menu>
+ </menu>
+ </hierarchy>
</document>
diff --git a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
index 73f4461..2e89ece 100644
--- a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
+++ b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
@@ -1,347 +1,345 @@
-// this code was generated using the rkwarddev package.
-//perhaps don't make changes here, but in the rkwarddev script instead!
+
function preprocess(){
- // add requirements etc. here
- echo("require(rkwarddev)\n");
+ // add requirements etc. here
+ echo("require(rkwarddev)\n");
- var brwDTEMPDIR = getValue("brw_DTEMPDIR");
- var chcOvrwrtxs = getValue("chc_Ovrwrtxs");
- var chcGsRKW060 = getValue("chc_GsRKW060");
- echo("rkwarddev.required(\"0.06-5\")");
- echo("\n\n# define where the plugin should write its files\noutput.dir <- ");
- if(brwDTEMPDIR) {
- echo("\"" + brwDTEMPDIR + "\"");
- } else {
- echo("tempdir()");
- }
- echo("\n# overwrite an existing plugin in output.dir?\noverwrite <- ");
- if(chcOvrwrtxs) {
- echo("TRUE");
- } else {
- echo("FALSE");
- }
- echo("\n# if you set guess.getters to TRUE, the resulting code will need RKWard >= 0.6.0\nguess.getter <- ");
- if(chcGsRKW060) {
- echo("TRUE");
- } else {
- echo("FALSE");
- }
- echo("\n\n");
+ var outDir = getValue("outDir");
+ var overwrite = getValue("overwrite");
+ var guessGetters = getValue("guessGetters");
+ echo("rkwarddev.required(\"0.07-4\")");
+ echo("\n\n# define where the plugin should write its files\noutput.dir <- ");
+ if(outDir) {
+ echo("\"" + outDir + "\"");
+ } else {
+ echo("tempdir()");
+ }
+ echo("\n# overwrite an existing plugin in output.dir?\noverwrite <- ");
+ if(overwrite) {
+ echo("TRUE");
+ } else {
+ echo("FALSE");
+ }
+ echo("\n# if you set guess.getters to TRUE, the resulting code will need RKWard >= 0.6.0\nguess.getter <- ");
+ if(guessGetters) {
+ echo("TRUE");
+ } else {
+ echo("FALSE");
+ }
+ echo("\n\n");
}
function calculate(){
- // read in variables from dialog
-
- 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 ocolOclInpGvnnmtx = getList("ost_fPPPPGGFFE.ocl_inpGvnnmtx");
- var ocolOclInpFmlynmt = getList("ost_fPPPPGGFFE.ocl_inpFmlynmt");
- var ocolOclInpEmaltxt = getList("ost_fPPPPGGFFE.ocl_inpEmaltxt");
- var ocolOclChcAthrstt = getList("ost_fPPPPGGFFE.ocl_chcAthrstt");
- var ocolOclChcMntnrst = getList("ost_fPPPPGGFFE.ocl_chcMntnrst");
- var ocolOclChcCntrbtr = getList("ost_fPPPPGGFFE.ocl_chcCntrbtr");
- var brwDTEMPDIR = getString("brw_DTEMPDIR");
- var drpPlcntpmn = getString("drp_Plcntpmn");
- var inpNmnmnplg = getString("inp_Nmnmnplg");
- var inpRKWardmn = getString("inp_RKWardmn");
- var inpRKWardmx = getString("inp_RKWardmx");
- var inpRmin = getString("inp_Rmin");
- var inpRmax = getString("inp_Rmax");
- var inpPackage = getString("inp_Package");
- var inpMin = getString("inp_min");
- var inpMax = getString("inp_max");
- var inpRepostry = getString("inp_Repostry");
- var ocolOclInpPckgtxt = getList("ost_fDRDRPPRRP.ocl_inpPckgtxt");
- var ocolOclInpmintext = getList("ost_fDRDRPPRRP.ocl_inpmintext");
- var ocolOclInpmaxtext = getList("ost_fDRDRPPRRP.ocl_inpmaxtext");
- var ocolOclInpRpstryt = getList("ost_fDRDRPPRRP.ocl_inpRpstryt");
- var inpSummary = getString("inp_Summary");
- var inpUsage = getString("inp_Usage");
- var chcAuthor = getBoolean("chc_Author.state");
- var chcMaintanr = getBoolean("chc_Maintanr.state");
- var chcContrbtr = getBoolean("chc_Contrbtr.state");
- var chcOvrwrtxs = getBoolean("chc_Ovrwrtxs.state");
- var chcAddwzrds = getBoolean("chc_Addwzrds.state");
- var chcIncldplg = getBoolean("chc_Incldplg.state");
- var chcOpnflsfr = getBoolean("chc_Opnflsfr.state");
- var chcAddplRKW = getBoolean("chc_AddplRKW.state");
- var chcShwthplg = getBoolean("chc_Shwthplg.state");
- var chcGsRKW060 = getBoolean("chc_GsRKW060.state");
- var frmDfndpndnChecked = getBoolean("frm_Dfndpndn.checked");
- var frmWrthlpflChecked = getBoolean("frm_Wrthlpfl.checked");
+ // read in variables from dialog
+ var pluginName = getString("pluginName");
+ var pluginLicense = getString("pluginLicense");
+ var pluginDescription = getString("pluginDescription");
+ var pluginVersion = getString("pluginVersion");
+ var pluginDate = getString("pluginDate");
+ var pluginHomepage = getString("pluginHomepage");
+ var pluginCategory = getString("pluginCategory");
+ var authorGivenName = getString("authorGivenName");
+ var authorFamiliyName = getString("authorFamiliyName");
+ var authorMail = getString("authorMail");
+ var ocolOptcolAuthorGivenName = getList("optionsetAuthors.optcolAuthorGivenName");
+ var ocolOptcolAuthorFamiliyName = getList("optionsetAuthors.optcolAuthorFamiliyName");
+ var ocolOptcolAuthorMail = getList("optionsetAuthors.optcolAuthorMail");
+ var ocolOptcolAuthorAut = getList("optionsetAuthors.optcolAuthorAut");
+ var ocolOptcolAuthorCre = getList("optionsetAuthors.optcolAuthorCre");
+ var ocolOptcolAuthorCtb = getList("optionsetAuthors.optcolAuthorCtb");
+ var outDir = getString("outDir");
+ var menuHier = getString("menuHier");
+ var menuName = getString("menuName");
+ var RKMin = getString("RKMin");
+ var RKMax = getString("RKMax");
+ var RMin = getString("RMin");
+ var RMax = getString("RMax");
+ var pckgName = getString("pckgName");
+ var pckgMin = getString("pckgMin");
+ var pckgMax = getString("pckgMax");
+ var pckgRepo = getString("pckgRepo");
+ var ocolOptcolPckgName = getList("dependencyOptionset.optcolPckgName");
+ var ocolOptcolPckgMin = getList("dependencyOptionset.optcolPckgMin");
+ var ocolOptcolPckgMax = getList("dependencyOptionset.optcolPckgMax");
+ var ocolOptcolPckgRepo = getList("dependencyOptionset.optcolPckgRepo");
+ var helpSummary = getString("helpSummary");
+ var helpUsage = getString("helpUsage");
+ var authorAut = getBoolean("authorAut.state");
+ var authorCre = getBoolean("authorCre.state");
+ var authorCtb = getBoolean("authorCtb.state");
+ var overwrite = getBoolean("overwrite.state");
+ var addWizard = getBoolean("addWizard.state");
+ var addTests = getBoolean("addTests.state");
+ var editPlugin = getBoolean("editPlugin.state");
+ var addToConfig = getBoolean("addToConfig.state");
+ var showPlugin = getBoolean("showPlugin.state");
+ var guessGetters = getBoolean("guessGetters.state");
+ var dependencyFrameChecked = getBoolean("dependencyFrame.checked");
+ var helpTextChecked = getBoolean("helpText.checked");
- // the R code to be evaluated
- // define the array arrOptAbout for values of R option "about"
- var arrOptAbout = new Array();
- if(inpShrtdscr) {
- arrOptAbout.push("desc=\"" + inpShrtdscr + "\"");
- } else {
- arrOptAbout.push();
- }
- if(inpVrsnnmbr) {
- arrOptAbout.push("version=\"" + inpVrsnnmbr + "\"");
- } else {
- arrOptAbout.push();
- }
- if(inpRlsdtmpt) {
- arrOptAbout.push("date=\"" + inpRlsdtmpt + "\"");
- } else {
- arrOptAbout.push();
- }
- if(inpHomepage) {
- arrOptAbout.push("url=\"" + inpHomepage + "\"");
- } else {
- arrOptAbout.push();
- }
- if(inpLicense) {
- arrOptAbout.push("license=\"" + inpLicense + "\"");
- } else {
- arrOptAbout.push();
- }
- if(inpCategory) {
- arrOptAbout.push("category=\"" + inpCategory + "\"");
- } else {
- arrOptAbout.push();
- }
- // clean array arrOptAbout from empty strings
- arrOptAbout = arrOptAbout.filter(String);
- // set the actual variable optAbout with all values for R option "about"
- if(arrOptAbout.length > 0) {
- var optAbout = ", about=list(" + arrOptAbout.join(", ") + ")";
- } else {
- var optAbout = "";
- }
+ // the R code to be evaluated
+ // define the array arrOptAbout for values of R option "about"
+ var arrOptAbout = new Array();
+ if(pluginDescription) {
+ arrOptAbout.push("desc=\"" + pluginDescription + "\"");
+ } else {
+ arrOptAbout.push();
+ }
+ if(pluginVersion) {
+ arrOptAbout.push("version=\"" + pluginVersion + "\"");
+ } else {
+ arrOptAbout.push();
+ }
+ if(pluginDate) {
+ arrOptAbout.push("date=\"" + pluginDate + "\"");
+ } else {
+ arrOptAbout.push();
+ }
+ if(pluginHomepage) {
+ arrOptAbout.push("url=\"" + pluginHomepage + "\"");
+ } else {
+ arrOptAbout.push();
+ }
+ if(pluginLicense) {
+ arrOptAbout.push("license=\"" + pluginLicense + "\"");
+ } else {
+ arrOptAbout.push();
+ }
+ if(pluginCategory) {
+ arrOptAbout.push("category=\"" + pluginCategory + "\"");
+ } else {
+ arrOptAbout.push();
+ }
+ // clean array arrOptAbout from empty strings
+ arrOptAbout = arrOptAbout.filter(String);
+ // set the actual variable optAbout with all values for R option "about"
+ if(arrOptAbout.length > 0) {
+ var optAbout = ", about=list(" + arrOptAbout.join(", ") + ")";
+ } else {
+ var optAbout = "";
+ }
- // define the array arrOptDependencies for values of R option "dependencies"
- var arrOptDependencies = new Array();
- if(frmDfndpndnChecked && inpRKWardmn) {
- arrOptDependencies.push("rkward.min=\"" + inpRKWardmn + "\"");
- } else {
- arrOptDependencies.push();
- }
- if(frmDfndpndnChecked && inpRKWardmx) {
- arrOptDependencies.push("rkward.max=\"" + inpRKWardmx + "\"");
- } else {
- arrOptDependencies.push();
- }
- if(frmDfndpndnChecked && inpRmin) {
- arrOptDependencies.push("R.min=\"" + inpRmin + "\"");
- } else {
- arrOptDependencies.push();
- }
- if(frmDfndpndnChecked && inpRmax) {
- arrOptDependencies.push("R.max=\"" + inpRmax + "\"");
- } else {
- arrOptDependencies.push();
- }
- // clean array arrOptDependencies from empty strings
- arrOptDependencies = arrOptDependencies.filter(String);
- // set the actual variable optDependencies with all values for R option "dependencies"
- if(arrOptDependencies.length > 0) {
- var optDependencies = ", dependencies=list(" + arrOptDependencies.join(", ") + ")";
- } else {
- var optDependencies = "";
- }
+ // define the array arrOptDependencies for values of R option "dependencies"
+ var arrOptDependencies = new Array();
+ if(dependencyFrameChecked && RKMin) {
+ arrOptDependencies.push("rkward.min=\"" + RKMin + "\"");
+ } else {
+ arrOptDependencies.push();
+ }
+ if(dependencyFrameChecked && RKMax) {
+ arrOptDependencies.push("rkward.max=\"" + RKMax + "\"");
+ } else {
+ arrOptDependencies.push();
+ }
+ if(dependencyFrameChecked && RMin) {
+ arrOptDependencies.push("R.min=\"" + RMin + "\"");
+ } else {
+ arrOptDependencies.push();
+ }
+ if(dependencyFrameChecked && RMax) {
+ arrOptDependencies.push("R.max=\"" + RMax + "\"");
+ } else {
+ arrOptDependencies.push();
+ }
+ // clean array arrOptDependencies from empty strings
+ arrOptDependencies = arrOptDependencies.filter(String);
+ // set the actual variable optDependencies with all values for R option "dependencies"
+ if(arrOptDependencies.length > 0) {
+ var optDependencies = ", dependencies=list(" + arrOptDependencies.join(", ") + ")";
+ } else {
+ var optDependencies = "";
+ }
- // define the array arrOptPluginmap for values of R option "pluginmap"
- var arrOptPluginmap = new Array();
- if(inpNmnmnplg) {
- arrOptPluginmap.push("name=\"" + inpNmnmnplg + "\"");
- } else {
- arrOptPluginmap.push("name=\"" + inpPluginnm + "\"");
- }
- if(drpPlcntpmn) {
- arrOptPluginmap.push("hierarchy=\"" + drpPlcntpmn + "\"");
- } else {
- arrOptPluginmap.push();
- }
- // clean array arrOptPluginmap from empty strings
- arrOptPluginmap = arrOptPluginmap.filter(String);
- // set the actual variable optPluginmap with all values for R option "pluginmap"
- if(arrOptPluginmap.length > 0) {
- var optPluginmap = "pluginmap=list(" + arrOptPluginmap.join(", ") + ")";
- } else {
- var optPluginmap = "";
- }
+ // define the array arrOptPluginmap for values of R option "pluginmap"
+ var arrOptPluginmap = new Array();
+ if(menuName) {
+ arrOptPluginmap.push("name=\"" + menuName + "\"");
+ } else {
+ arrOptPluginmap.push("name=\"" + pluginName + "\"");
+ }
+ if(menuHier) {
+ arrOptPluginmap.push("hierarchy=\"" + menuHier + "\"");
+ } else {
+ arrOptPluginmap.push();
+ }
+ // clean array arrOptPluginmap from empty strings
+ arrOptPluginmap = arrOptPluginmap.filter(String);
+ // set the actual variable optPluginmap with all values for R option "pluginmap"
+ if(arrOptPluginmap.length > 0) {
+ var optPluginmap = "pluginmap=list(" + arrOptPluginmap.join(", ") + ")";
+ } else {
+ var optPluginmap = "";
+ }
- // define the array arrOptSkeleton for values of R option ""
- var arrOptSkeleton = new Array();
- if(chcAddwzrds) {
- arrOptSkeleton.push("\n\tprovides=c(\"logic\", \"dialog\", \"wizard\")");
- } else {
- arrOptSkeleton.push("\n\t#provides=c(\"logic\", \"dialog\")");
- }
- if(optPluginmap) {
- arrOptSkeleton.push("\n\t" + optPluginmap);
- } else {
- arrOptSkeleton.push("\n\t#pluginmap=list(name=\"\", hierarchy=\"\", require=\"\")");
- }
- if(chcIncldplg) {
- arrOptSkeleton.push("\n\ttests=TRUE");
- } else {
- arrOptSkeleton.push("\n\ttests=FALSE");
- }
- if(chcOpnflsfr) {
- arrOptSkeleton.push("\n\tedit=TRUE");
- } else {
- arrOptSkeleton.push("\n\tedit=FALSE");
- }
- if(chcAddplRKW) {
- arrOptSkeleton.push("\n\tload=TRUE");
- } else {
- arrOptSkeleton.push("\n\tload=FALSE");
- }
- if(chcShwthplg) {
- arrOptSkeleton.push("\n\tshow=TRUE");
- } else {
- arrOptSkeleton.push("\n\tshow=FALSE");
- }
- // clean array arrOptSkeleton from empty strings
- arrOptSkeleton = arrOptSkeleton.filter(String);
- // set the actual variable optSkeleton with all values for R option ""
- if(arrOptSkeleton.length > 0) {
- var optSkeleton = ", " + arrOptSkeleton.join(", ") + "";
- } else {
- var optSkeleton = "";
- }
+ // define the array arrOptSkeleton for values of R option ""
+ var arrOptSkeleton = new Array();
+ if(addWizard) {
+ arrOptSkeleton.push("\n\tprovides=c(\"logic\", \"dialog\", \"wizard\")");
+ } else {
+ arrOptSkeleton.push("\n\t#provides=c(\"logic\", \"dialog\")");
+ }
+ if(optPluginmap) {
+ arrOptSkeleton.push("\n\t" + optPluginmap);
+ } else {
+ arrOptSkeleton.push("\n\t#pluginmap=list(name=\"\", hierarchy=\"\", require=\"\")");
+ }
+ if(addTests) {
+ arrOptSkeleton.push("\n\ttests=TRUE");
+ } else {
+ arrOptSkeleton.push("\n\ttests=FALSE");
+ }
+ if(editPlugin) {
+ arrOptSkeleton.push("\n\tedit=TRUE");
+ } else {
+ arrOptSkeleton.push("\n\tedit=FALSE");
+ }
+ if(addToConfig) {
+ arrOptSkeleton.push("\n\tload=TRUE");
+ } else {
+ arrOptSkeleton.push("\n\tload=FALSE");
+ }
+ if(showPlugin) {
+ arrOptSkeleton.push("\n\tshow=TRUE");
+ } else {
+ arrOptSkeleton.push("\n\tshow=FALSE");
+ }
+ // clean array arrOptSkeleton from empty strings
+ arrOptSkeleton = arrOptSkeleton.filter(String);
+ // set the actual variable optSkeleton with all values for R option ""
+ if(arrOptSkeleton.length > 0) {
+ var optSkeleton = ", " + arrOptSkeleton.join(", ") + "";
+ } else {
+ var optSkeleton = "";
+ }
- echo("about.plugin <- rk.XML.about(");
- if(inpPluginnm) {
- echo("\n\tname=\"" + inpPluginnm + "\"");
- }
- var ocolOclInpGvnnmtx = getList("ost_fPPPPGGFFE.ocl_inpGvnnmtx");
- var ocolOclInpFmlynmt = getList("ost_fPPPPGGFFE.ocl_inpFmlynmt");
- var ocolOclInpEmaltxt = getList("ost_fPPPPGGFFE.ocl_inpEmaltxt");
- var ocolOclChcAthrstt = getList("ost_fPPPPGGFFE.ocl_chcAthrstt");
- var ocolOclChcMntnrst = getList("ost_fPPPPGGFFE.ocl_chcMntnrst");
- var ocolOclChcCntrbtr = getList("ost_fPPPPGGFFE.ocl_chcCntrbtr");
- if(ocolOclInpGvnnmtx != "") {
- echo("\tauthor=c(\n\t\t\t");
- for (var i = 0; i < ocolOclInpGvnnmtx.length; ++i){
- // define the array arrOptAuthorRole for values of R option "role"
- var arrOptAuthorRole = new Array();
- if(ocolOclChcAthrstt[i] == 1) {
- arrOptAuthorRole.push("\"aut\"");
- } else {
- arrOptAuthorRole.push();
- }
- if(ocolOclChcMntnrst[i] == 1) {
- arrOptAuthorRole.push("\"cre\"");
- } else {
- arrOptAuthorRole.push();
- }
- if(ocolOclChcCntrbtr[i] == 1) {
- arrOptAuthorRole.push("\"ctb\"");
- } else {
- arrOptAuthorRole.push();
- }
- // clean array arrOptAuthorRole from empty strings
- arrOptAuthorRole = arrOptAuthorRole.filter(String);
- // set the actual variable optAuthorRole with all values for R option "role"
- if(arrOptAuthorRole.length > 0) {
- var optAuthorRole = ", role=c(" + arrOptAuthorRole.join(", ") + ")";
- } else {
- var optAuthorRole = "";
- }
+ echo("aboutPlugin <- rk.XML.about(");
+ if(pluginName) {
+ echo("\n\tname=\"" + pluginName + "\"");
+ } else {}
+ var ocolOptcolAuthorGivenName = getList("optionsetAuthors.optcolAuthorGivenName");
+ var ocolOptcolAuthorFamiliyName = getList("optionsetAuthors.optcolAuthorFamiliyName");
+ var ocolOptcolAuthorMail = getList("optionsetAuthors.optcolAuthorMail");
+ var ocolOptcolAuthorAut = getList("optionsetAuthors.optcolAuthorAut");
+ var ocolOptcolAuthorCre = getList("optionsetAuthors.optcolAuthorCre");
+ var ocolOptcolAuthorCtb = getList("optionsetAuthors.optcolAuthorCtb");
+ if(ocolOptcolAuthorGivenName != "") {
+ echo("\tauthor=c(\n\t\t\t");
+ for (var i = 0; i < ocolOptcolAuthorGivenName.length; ++i){
+ // define the array arrOptAuthorRole for values of R option "role"
+ var arrOptAuthorRole = new Array();
+ if(ocolOptcolAuthorAut[i] == 1) {
+ arrOptAuthorRole.push("\"aut\"");
+ } else {
+ arrOptAuthorRole.push();
+ }
+ if(ocolOptcolAuthorCre[i] == 1) {
+ arrOptAuthorRole.push("\"cre\"");
+ } else {
+ arrOptAuthorRole.push();
+ }
+ if(ocolOptcolAuthorCtb[i] == 1) {
+ arrOptAuthorRole.push("\"ctb\"");
+ } else {
+ arrOptAuthorRole.push();
+ }
+ // clean array arrOptAuthorRole from empty strings
+ arrOptAuthorRole = arrOptAuthorRole.filter(String);
+ // set the actual variable optAuthorRole with all values for R option "role"
+ if(arrOptAuthorRole.length > 0) {
+ var optAuthorRole = ", role=c(" + arrOptAuthorRole.join(", ") + ")";
+ } else {
+ var optAuthorRole = "";
+ }
- echo("person(");
- echo("given=\"" + ocolOclInpGvnnmtx[i] + "\"");
- if(ocolOclInpFmlynmt[i]) {
- echo(", family=\"" + ocolOclInpFmlynmt[i] + "\"");
- }
- if(ocolOclInpEmaltxt[i]) {
- echo(", email=\"" + ocolOclInpEmaltxt[i] + "\"");
- }
- if(optAuthorRole) {
- echo(optAuthorRole);
- }
- echo(")");
- if(i + 1 < ocolOclInpGvnnmtx.length) {
- echo(",\n\t\t\t");
- }
- }
- echo("\n\t\t),\n");
- }
- echo(optAbout);
- echo("\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\t");
- for (var i = 0; i < ocolOclInpPckgtxt.length; ++i){
- echo("c(");
- echo("name=\"" + ocolOclInpPckgtxt[i] + "\"");
- if(ocolOclInpmintext[i]) {
- echo(", min=\"" + ocolOclInpmintext[i] + "\"");
- }
- if(ocolOclInpmaxtext[i]) {
- echo(", max=\"" + ocolOclInpmaxtext[i] + "\"");
- }
- if(ocolOclInpRpstryt[i]) {
- echo(", repository=\"" + ocolOclInpRpstryt[i] + "\"");
- }
- echo(")");
- if(i + 1 < ocolOclInpPckgtxt.length) {
- echo(",\n\t\t");
- }
- }
- echo("\n\t)");
- }
- echo("\n)\n\n");
- }
- echo("# name of the main component, relevant for help page content\nrk.set.comp(\"");
- if(inpNmnmnplg) {
- echo(inpNmnmnplg + "\")\n\n");
- } else {
- echo(inpPluginnm + "\")\n\n");
- }
- echo("############\n## your plugin dialog and JavaScript should be put here\n############\n\n");
- if(frmWrthlpflChecked) {
- echo("############\n## help page\nplugin.summary <- rk.rkh.summary(\n\t");
- if(inpSummary) {
- echo("\"" + inpSummary + "\"\n)");
- } else {
- echo("\"" + inpShrtdscr + "\"\n)");
- }
- echo("\nplugin.usage <- rk.rkh.usage(\n\t\"" + inpUsage + "\"\n)\n\n");
- }
- echo("#############\n" + "## the main call\n" + "## if you run the following function call, files will be written to output.dir!\n" + "#############\n" + "# this is where things get serious, that is, here all of the above is put together into one plugin\n" + "plugin.dir <- rk.plugin.skeleton(\n\tabout=about.plugin,");
- if(frmDfndpndnChecked && optDependencies) {
- echo("\n\tdependencies=plugin.dependencies,");
- } else {
- echo("\n\t#dependencies=plugin.dependencies,");
- }
- echo("\n\tpath=output.dir," + "\n\tguess.getter=guess.getter," + "\n\tscan=c(\"var\", \"saveobj\", \"settings\")," + "\n\txml=list(\n\t\t#dialog=,\n\t\t#wizard=,\n\t\t#logic=,\n\t\t#snippets=\n\t)," + "\n\tjs=list(\n\t\t#results.header=FALSE,\n\t\t#load.silencer=,\n\t\t#require=,\n\t\t#variables=," + "\n\t\t#globals=,\n\t\t#preprocess=,\n\t\t#calculate=,\n\t\t#printout=,\n\t\t#doPrintout=\n\t),");
- if(frmWrthlpflChecked) {
- echo("\n\trkh=list(\n\t\tsummary=plugin.summary,\n\t\tusage=plugin.usage#," + "\n\t\t#sections=,\n\t\t#settings=,\n\t\t#related=,\n\t\t#technical=\n\t)," + "\n\tcreate=c(\"pmap\", \"xml\", \"js\", \"desc\", \"rkh\"),");
- } else {
- echo("\n\trkh=list(" + "\n\t\t#summary=,\n\t\t#usage=," + "\n\t\t#sections=,\n\t\t#settings=,\n\t\t#related=,\n\t\t#technical=\n\t)," + "\n\tcreate=c(\"pmap\", \"xml\", \"js\", \"desc\"),");
- }
- echo("\n\toverwrite=overwrite,");
- echo("\n\t#components=list(),");
- echo(optSkeleton);
- echo("\n)\n\n");
+ echo("person(");
+ echo("given=\"" + ocolOptcolAuthorGivenName[i] + "\"");
+ if(ocolOptcolAuthorFamiliyName[i]) {
+ echo(", family=\"" + ocolOptcolAuthorFamiliyName[i] + "\"");
+ } else {}
+ if(ocolOptcolAuthorMail[i]) {
+ echo(", email=\"" + ocolOptcolAuthorMail[i] + "\"");
+ } else {}
+ if(optAuthorRole) {
+ echo(optAuthorRole);
+ } else {}
+ echo(")");
+ if(i + 1 < ocolOptcolAuthorGivenName.length) {
+ echo(",\n\t\t\t");
+ }
+ }
+ echo("\n\t\t),\n");
+ } else {}
+ echo(optAbout);
+ echo("\n)\n\n");
+ if(dependencyFrameChecked && (optDependencies || ocolOptcolPckgName)) {
+ echo("plugin.dependencies <- rk.XML.dependencies(");
+ if(optDependencies) {
+ echo(optDependencies);
+ } else {}
+ if(optDependencies && ocolOptcolPckgName) {
+ echo(",");
+ } else {}
+ if(ocolOptcolPckgName!= "") {
+ echo("\n\tpackage=list(\n\t\t");
+ for (var i = 0; i < ocolOptcolPckgName.length; ++i){
+ echo("c(");
+ echo("name=\"" + ocolOptcolPckgName[i] + "\"");
+ if(ocolOptcolPckgMin[i]) {
+ echo(", min=\"" + ocolOptcolPckgMin[i] + "\"");
+ } else {}
+ if(ocolOptcolPckgMax[i]) {
+ echo(", max=\"" + ocolOptcolPckgMax[i] + "\"");
+ } else {}
+ if(ocolOptcolPckgRepo[i]) {
+ echo(", repository=\"" + ocolOptcolPckgRepo[i] + "\"");
+ } else {}
+ echo(")");
+ if(i + 1 < ocolOptcolPckgName.length) {
+ echo(",\n\t\t");
+ }
+ }
+ echo("\n\t)");
+ } else {}
+ echo("\n)\n\n");
+ } else {}
+ echo("# name of the main component, relevant for help page content\nrk.set.comp(\"");
+ if(menuName) {
+ echo(menuName + "\")\n\n");
+ } else {
+ echo(pluginName + "\")\n\n");
+ }
+ echo("############\n## your plugin dialog and JavaScript should be put here\n############\n\n");
+ if(helpTextChecked) {
+ echo("############\n## help page\nplugin.summary <- rk.rkh.summary(\n\t");
+ if(helpSummary) {
+ echo("\"" + helpSummary + "\"\n)");
+ } else {
+ echo("\"" + pluginDescription + "\"\n)");
+ }
+ echo("\nplugin.usage <- rk.rkh.usage(\n\t\"" + helpUsage + "\"\n)\n\n");
+ } else {}
+ echo("#############\n" + "## the main call\n" + "## if you run the following function call, files will be written to output.dir!\n" + "#############\n" + "# this is where things get serious, that is, here all of the above is put together into one plugin\n" + "plugin.dir <- rk.plugin.skeleton(\n\tabout=aboutPlugin,");
+ if(dependencyFrameChecked && optDependencies) {
+ echo("\n\tdependencies=plugin.dependencies,");
+ } else {
+ echo("\n\t#dependencies=plugin.dependencies,");
+ }
+ echo("\n\tpath=output.dir," + "\n\tguess.getter=guess.getter," + "\n\tscan=c(\"var\", \"saveobj\", \"settings\")," + "\n\txml=list(\n\t\t#dialog=,\n\t\t#wizard=,\n\t\t#logic=,\n\t\t#snippets=\n\t)," + "\n\tjs=list(\n\t\t#results.header=FALSE,\n\t\t#load.silencer=,\n\t\t#require=,\n\t\t#variables=," + "\n\t\t#globals=,\n\t\t#preprocess=,\n\t\t#calculate=,\n\t\t#printout=,\n\t\t#doPrintout=\n\t),");
+ if(helpTextChecked) {
+ echo("\n\trkh=list(\n\t\tsummary=plugin.summary,\n\t\tusage=plugin.usage#," + "\n\t\t#sections=,\n\t\t#settings=,\n\t\t#related=,\n\t\t#technical=\n\t)," + "\n\tcreate=c(\"pmap\", \"xml\", \"js\", \"desc\", \"rkh\"),");
+ } else {
+ echo("\n\trkh=list(" + "\n\t\t#summary=,\n\t\t#usage=," + "\n\t\t#sections=,\n\t\t#settings=,\n\t\t#related=,\n\t\t#technical=\n\t)," + "\n\tcreate=c(\"pmap\", \"xml\", \"js\", \"desc\"),");
+ }
+ echo("\n\toverwrite=overwrite,");
+ echo("\n\t#components=list(),");
+ echo(optSkeleton);
+ echo("\n)\n\n");
}
function printout(){
- // printout the results
+ // printout the results
diff --git a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh
index 6196c93..bdf8156 100644
--- a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh
+++ b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.rkh
@@ -1,144 +1,142 @@
<!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" />
- <caption id="frm_Pckgthrs" />
- <caption id="frm_Packgthr" />
- <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_Roles" />
- <setting id="chc_Author">
- Check this if this person is the author of the plugin code.
- </setting>
- <setting id="chc_Maintanr">
- Check this if this person maintains the plugin package.
- </setting>
- <setting id="chc_Contrbtr">
- Check this if this person is a contributor to the plugin code (e.g., translations).
- </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="chc_GsRKW060">
- If this is checked, rkwarddev tries to select the optimal getter functions to get data from the dialog into the R code. The plugin then requires RKWard >= 0.6.0.
- </setting>
- <caption id="frm_rPPTFEVWRD" />
- <setting id="drp_Plcntpmn">
- Specify where the plugin should appear in RKWard's top menus.
- </setting>
- <setting id="inp_Nmnmnplg">
- You can set the exact entry name of your main component in the menu here. If left empty, the plugin name will be used as default.
- </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="inp_min">
- The minimum version number of R packages required to run this plugin.
- </setting>
- <setting id="inp_max">
- The maximum version number of R packages required to run this plugin.
- </setting>
- <setting id="inp_Repostry">
- The repository to download R packages from required to run this plugin.
- </setting>
- <caption id="tab_Helppage" />
- <caption id="frm_Wrthlpfl" />
- <setting id="inp_Summary">
- Give a short summary of the plugin for the help page. If empty, the short description is taken as the default.
- </setting>
- <setting id="inp_Usage">
- A general note on how to use the plugin.
- </setting>
- </settings>
- <!-- <related>
- <ul>
- <li>
- <link href="rkward://rhelp/..." />
- </li>
- </ul>
- </related> -->
- <technical>
- </technical>
+ <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="aboutPlugin" />
+ <setting id="pluginName">
+ Give the name for your new plugin here.
+ </setting>
+ <setting id="pluginLicense">
+ Define the license for your plugin. A short form should be sufficient.
+ </setting>
+ <setting id="pluginDescription">
+ Describe your plugin in a few sentences: What does it do?
+ </setting>
+ <setting id="pluginVersion">
+ Version information for your plugin.
+ </setting>
+ <setting id="pluginDate">
+ The release date of your plugin. If you leave this empty, the current date will be used automatically.
+ </setting>
+ <setting id="pluginHomepage">
+ A URL where one can find more information on the plugin, download updates etc.
+ </setting>
+ <setting id="pluginCategory">
+ A category for your plugin. This infromation is currently ignored by RKWard.
+ </setting>
+ <caption id="aboutContact" />
+ <caption id="frm_Pckgthrs" />
+ <caption id="aboutContactFrame" />
+ <setting id="authorGivenName">
+ First name of the package author.
+ </setting>
+ <setting id="authorFamiliyName">
+ Family name of the package author.
+ </setting>
+ <setting id="authorMail">
+ The authors e-mail address, important for bug reports and receiving a myriad of thank yous...
+ </setting>
+ <caption id="frm_Roles" />
+ <setting id="authorAut">
+ Check this if this person is the author of the plugin code.
+ </setting>
+ <setting id="authorCre">
+ Check this if this person maintains the plugin package.
+ </setting>
+ <setting id="authorCtb">
+ Check this if this person is a contributor to the plugin code (e.g., translations).
+ </setting>
+ <caption id="tab_Cretptns" />
+ <caption id="createOptionsFrame" />
+ <setting id="outDir">
+ Set the directory where all plugin files and its directory structure should be generated. The default is a temporary directory.
+ </setting>
+ <setting id="overwrite">
+ If this is checked, existing files in the specified target directory will probably be replaced by new ones.
+ </setting>
+ <setting id="addWizard">
+ If this is checked, a wizard section will be included in the skeleton.
+ </setting>
+ <setting id="addTests">
+ If this is checked, plugin tests will be included in the skeleton.
+ </setting>
+ <setting id="editPlugin">
+ If this is checked, all generated files will be opened for editing instantly.
+ </setting>
+ <setting id="addToConfig">
+ 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="showPlugin">
+ If this is checked, the generated plugin will be shown (opened) for you to see what it looks like.
+ </setting>
+ <setting id="guessGetters">
+ If this is checked, rkwarddev tries to select the optimal getter functions to get data from the dialog into the R code. The plugin then requires RKWard >= 0.6.0.
+ </setting>
+ <caption id="frm_rHPTFEVWRD" />
+ <setting id="menuHier">
+ Specify where the plugin should appear in RKWard's top menus.
+ </setting>
+ <setting id="menuName">
+ You can set the exact entry name of your main component in the menu here. If left empty, the plugin name will be used as default.
+ </setting>
+ <caption id="dependencyFrame" />
+ <caption id="RKFrame" />
+ <setting id="RKMin">
+ The minimum version number of RKWard required to run this plugin.
+ </setting>
+ <setting id="RKMax">
+ The maximum version number of RKWard required to run this plugin.
+ </setting>
+ <caption id="RFrame" />
+ <setting id="RMin">
+ The minimum version number of R required to run this plugin.
+ </setting>
+ <setting id="RMax">
+ The maximum version number of R required to run this plugin.
+ </setting>
+ <caption id="frm_DpndsnRp" />
+ <setting id="pckgName">
+ The names of R packages required to run this plugin.
+ </setting>
+ <setting id="pckgMin">
+ The minimum version number of R packages required to run this plugin.
+ </setting>
+ <setting id="pckgMax">
+ The maximum version number of R packages required to run this plugin.
+ </setting>
+ <setting id="pckgRepo">
+ The repository to download R packages from required to run this plugin.
+ </setting>
+ <caption id="tab_Helppage" />
+ <caption id="helpText" />
+ <setting id="helpSummary">
+ Give a short summary of the plugin for the help page. If empty, the short description is taken as the default.
+ </setting>
+ <setting id="helpUsage">
+ A general note on how to use the plugin.
+ </setting>
+ </settings>
+ <!-- <related>
+ <ul>
+ <li>
+ <link href="rkward://rhelp/..." />
+ </li>
+ </ul>
+ </related> -->
+ <technical>
+ </technical>
</document>
diff --git a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
index 9e92214..a978877 100644
--- a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
+++ b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
@@ -1,169 +1,167 @@
<!DOCTYPE rkplugin >
<document>
- <!-- this code was generated using the rkwarddev package.
- perhaps don't make changes here, but in the rkwarddev script instead! -->
- <code file="CreateRKWardpluginskeleton.js" />
- <help file="CreateRKWardpluginskeleton.rkh" />
- <!-- <dependencies>
- </dependencies> -->
- <logic>
- <connect governor="frm_Dfndpndn.checked" client="frm_DpndsRKW.enabled" />
- <connect governor="frm_Dfndpndn.checked" client="frm_DpndsnRv.enabled" />
- </logic>
- <dialog label="RKWard Plugin Skeleton">
- <tabbook id="tbbk_PlgnSklt" label="Plugin Skeleton">
- <tab label="About the plugin" id="tab_Abtthplg">
- <column id="clm_fAAPPLLGPL">
- <frame label="About the plugin" id="frm_Abtthplg">
- <row id="row_inPPLLGPL3">
- <input label="Plugin name" id="inp_Pluginnm" size="small" required="true" />
- <input label="License" id="inp_License" initial="GPL (>= 3)" required="true" />
- </row>
- <row id="row_inptlblShS">
- <input label="Short description" id="inp_Shrtdscr" required="true" />
- </row>
- <row id="row_inVV0010RR">
- <input label="Version number" id="inp_Vrsnnmbr" initial="0.01-0" required="true" />
- <input label="Release date (empty for today)" id="inp_Rlsdtmpt" />
- </row>
- <row id="row_inptlbHHCC">
- <input label="Homepage" id="inp_Homepage" />
- <input label="Category" id="inp_Category" />
- </row>
- </frame>
- <frame label="Plugin author" id="frm_Plugnthr">
- <row id="row_oPPPPGGFFE">
- <optionset id="ost_fPPPPGGFFE">
- <logic>
- <connect governor="chc_Maintanr.state" client="inp_Email.required" />
- </logic>
- <content>
- <optiondisplay />
- <frame label="Package authors" id="frm_Pckgthrs">
- <row id="row_fPPGGFFEEG">
- <frame label="Package author" id="frm_Packgthr">
- <row id="row_cGGFFEEGGF">
- <column id="clm_inptGGFFEE">
- <input label="Given name" id="inp_Givennam" required="true" />
- <input label="Family name" id="inp_Familynm" required="true" />
- <input label="E-mail" id="inp_Email" />
- <stretch />
- </column>
- <column id="clm_frRRAAMMCC">
- <frame label="Roles" id="frm_Roles">
- <checkbox id="chc_Author" label="Author" value="true" checked="true" />
- <checkbox id="chc_Maintanr" label="Maintainer" value="true" checked="true" />
- <checkbox id="chc_Contrbtr" label="Contributor" value="true" />
- <stretch />
- </frame>
- </column>
- </row>
- </frame>
- </row>
- <stretch />
- </frame>
- </content>
- <optioncolumn id="ocl_inpGvnnmtx" connect="inp_Givennam.text" label="Given name" />
- <optioncolumn id="ocl_inpFmlynmt" connect="inp_Familynm.text" label="Family name" />
- <optioncolumn id="ocl_inpEmaltxt" connect="inp_Email.text" label="E-mail" />
- <optioncolumn id="ocl_chcAthrstt" connect="chc_Author.state" label="Author" />
- <optioncolumn id="ocl_chcMntnrst" connect="chc_Maintanr.state" label="Maintainer" />
- <optioncolumn id="ocl_chcCntrbtr" connect="chc_Contrbtr.state" label="Contributor" />
- </optionset>
- </row>
- </frame>
- </column>
- </tab>
- <tab label="Create options" id="tab_Cretptns">
- <column id="clm_fDTEMPDIRD">
- <frame id="frm_rDTEMPDIRD">
- <row id="row_bDTEMPDIRD">
- <browser label="Directory to save to (empty for $TEMPDIR)" type="dir" id="brw_DTEMPDIR" required="false" />
- </row>
- <row id="row_cOOAAIIOOA">
- <column id="clm_chckOOAAII">
- <checkbox id="chc_Ovrwrtxs" label="Overwrite existing files" value="true" />
- <checkbox id="chc_Addwzrds" label="Add wizard section" value="true" />
- <checkbox id="chc_Incldplg" label="Include plugin tests" value="true" checked="true" />
- <stretch />
- </column>
- <column id="clm_cOOARKWARK">
- <checkbox id="chc_Opnflsfr" label="Open files for editing" value="true" checked="true" />
- <checkbox id="chc_AddplRKW" label="Add plugin to RKWard configuration" value="true" checked="true" />
- <checkbox id="chc_Shwthplg" label="Show the plugin" value="true" />
- <checkbox id="chc_GsRKW060" label="Guess getter functions (RKWard >= 0.6.0)" value="true" />
- <stretch />
- </column>
- </row>
- <frame id="frm_rPPTFEVWRD">
- <row id="row_dPPTFEVWRD">
- <dropdown id="drp_Plcntpmn" label="Place in top menu">
- <option label="Test (created if needed)" value="test" checked="true" />
- <option label="File" value="file" />
- <option label="Edit" value="edit" />
- <option label="View" value="view" />
- <option label="Workspace" value="workspace" />
- <option label="Run" value="run" />
- <option label="Data" value="data" />
- <option label="Analysis" value="analysis" />
- <option label="Plots" value="plots" />
- <option label="Distributions" value="distributions" />
- <option label="Windows" value="windows" />
- <option label="Settings" value="settings" />
- <option label="Help" value="help" />
- </dropdown>
- <input label="Name in menu (plugin name if empty)" id="inp_Nmnmnplg" />
- </row>
- </frame>
- </frame>
- <frame label="Define dependencies" checkable="true" checked="false" id="frm_Dfndpndn">
- <row id="row_fDRKWDRKWR">
- <frame label="Depends on RKWard version" id="frm_DpndsRKW">
- <input label="RKWard min" id="inp_RKWardmn" size="small" />
- <input label="RKWard max" id="inp_RKWardmx" size="small" />
- <stretch />
- </frame>
- <frame label="Depends on R version" id="frm_DpndsnRv">
- <input label="R min" id="inp_Rmin" size="small" />
- <input label="R max" id="inp_Rmax" size="small" />
- <stretch />
- </frame>
- </row>
- <row id="row_oDRDRPPRRP">
- <optionset id="ost_fDRDRPPRRP">
- <content>
- <optiondisplay />
- <frame label="Depends on R packages" id="frm_DpndsnRp">
- <row id="row_inptlbPPRR">
- <input label="Package" id="inp_Package" />
- <input label="min" id="inp_min" />
- <input label="max" id="inp_max" />
- <input label="Repository" id="inp_Repostry" />
- </row>
- <stretch />
- </frame>
- </content>
- <optioncolumn id="ocl_inpPckgtxt" connect="inp_Package.text" label="Package" />
- <optioncolumn id="ocl_inpmintext" connect="inp_min.text" label="min" />
- <optioncolumn id="ocl_inpmaxtext" connect="inp_max.text" label="max" />
- <optioncolumn id="ocl_inpRpstryt" connect="inp_Repostry.text" label="Repository" />
- </optionset>
- </row>
- </frame>
- </column>
- </tab>
- <tab label="Help page" id="tab_Helppage">
- <column id="clm_fWWSSSSUUU">
- <frame label="Write help files" checkable="true" checked="false" id="frm_Wrthlpfl">
- <row id="row_inptlblSmS">
- <input label="Summary" id="inp_Summary" size="large" />
- </row>
- <row id="row_inptlblUsU">
- <input label="Usage" id="inp_Usage" size="large" />
- </row>
- </frame>
- </column>
- </tab>
- </tabbook>
- </dialog>
+ <code file="CreateRKWardpluginskeleton.js" />
+ <help file="CreateRKWardpluginskeleton.rkh" />
+ <!-- <dependencies>
+ </dependencies> -->
+ <logic>
+ <connect governor="dependencyFrame.checked" client="RKFrame.enabled" />
+ <connect governor="dependencyFrame.checked" client="RFrame.enabled" />
+ </logic>
+ <dialog label="RKWard Plugin Skeleton">
+ <tabbook id="tbbk_PlgnSklt" label="Plugin Skeleton">
+ <tab label="About the plugin" id="tab_Abtthplg">
+ <column id="clm_fAPPNLLGPL">
+ <frame label="About the plugin" id="aboutPlugin">
+ <row id="row_inPNLLGPL3">
+ <input label="Plugin name" id="pluginName" size="small" required="true" />
+ <input label="License" id="pluginLicense" initial="GPL (>= 3)" required="true" />
+ </row>
+ <row id="row_inptlblShD">
+ <input label="Short description" id="pluginDescription" required="true" />
+ </row>
+ <row id="row_inVV0010RD">
+ <input label="Version number" id="pluginVersion" initial="0.01-0" required="true" />
+ <input label="Release date (empty for today)" id="pluginDate" />
+ </row>
+ <row id="row_inptlbHHCC">
+ <input label="Homepage" id="pluginHomepage" />
+ <input label="Category" id="pluginCategory" />
+ </row>
+ </frame>
+ <frame label="Plugin author" id="aboutContact">
+ <row id="row_oACMPPPCFG">
+ <optionset id="optionsetAuthors">
+ <logic>
+ <connect governor="authorCre.state" client="authorMail.required" />
+ </logic>
+ <content>
+ <optiondisplay />
+ <frame label="Package authors" id="frm_Pckgthrs">
+ <row id="row_fPCFGGNFFN">
+ <frame label="Package author" id="aboutContactFrame">
+ <row id="row_cGGNFFNEMG">
+ <column id="clm_inGGNFFNEM">
+ <input label="Given name" id="authorGivenName" required="true" />
+ <input label="Family name" id="authorFamiliyName" required="true" />
+ <input label="E-mail" id="authorMail" />
+ <stretch />
+ </column>
+ <column id="clm_frRRAACMCC">
+ <frame label="Roles" id="frm_Roles">
+ <checkbox id="authorAut" label="Author" value="true" checked="true" />
+ <checkbox id="authorCre" label="Maintainer" value="true" checked="true" />
+ <checkbox id="authorCtb" label="Contributor" value="true" />
+ <stretch />
+ </frame>
+ </column>
+ </row>
+ </frame>
+ </row>
+ <stretch />
+ </frame>
+ </content>
+ <optioncolumn id="optcolAuthorGivenName" connect="authorGivenName.text" label="Given name" />
+ <optioncolumn id="optcolAuthorFamiliyName" connect="authorFamiliyName.text" label="Family name" />
+ <optioncolumn id="optcolAuthorMail" connect="authorMail.text" label="E-mail" />
+ <optioncolumn id="optcolAuthorAut" connect="authorAut.state" label="Author" />
+ <optioncolumn id="optcolAuthorCre" connect="authorCre.state" label="Maintainer" />
+ <optioncolumn id="optcolAuthorCtb" connect="authorCtb.state" label="Contributor" />
+ </optionset>
+ </row>
+ </frame>
+ </column>
+ </tab>
+ <tab label="Create options" id="tab_Cretptns">
+ <column id="clm_fOFDTEMPDI">
+ <frame id="createOptionsFrame">
+ <row id="row_bDTEMPDIRD">
+ <browser label="Directory to save to (empty for $TEMPDIR)" type="dir" id="outDir" required="false" />
+ </row>
+ <row id="row_cOWATIOWAT">
+ <column id="clm_chckbOWATI">
+ <checkbox id="overwrite" label="Overwrite existing files" value="true" />
+ <checkbox id="addWizard" label="Add wizard section" value="true" />
+ <checkbox id="addTests" label="Include plugin tests" value="true" checked="true" />
+ <stretch />
+ </column>
+ <column id="clm_cPOTCARKWP">
+ <checkbox id="editPlugin" label="Open files for editing" value="true" checked="true" />
+ <checkbox id="addToConfig" label="Add plugin to RKWard configuration" value="true" checked="true" />
+ <checkbox id="showPlugin" label="Show the plugin" value="true" />
+ <checkbox id="guessGetters" label="Guess getter functions (RKWard >= 0.6.0)" value="true" />
+ <stretch />
+ </column>
+ </row>
+ <frame id="frm_rHPTFEVWRD">
+ <row id="row_dHPTFEVWRD">
+ <dropdown id="menuHier" label="Place in top menu">
+ <option label="Test (created if needed)" value="test" checked="true" />
+ <option label="File" value="file" />
+ <option label="Edit" value="edit" />
+ <option label="View" value="view" />
+ <option label="Workspace" value="workspace" />
+ <option label="Run" value="run" />
+ <option label="Data" value="data" />
+ <option label="Analysis" value="analysis" />
+ <option label="Plots" value="plots" />
+ <option label="Distributions" value="distributions" />
+ <option label="Windows" value="windows" />
+ <option label="Settings" value="settings" />
+ <option label="Help" value="help" />
+ </dropdown>
+ <input label="Name in menu (plugin name if empty)" id="menuName" />
+ </row>
+ </frame>
+ </frame>
+ <frame label="Define dependencies" checkable="true" checked="false" id="dependencyFrame">
+ <row id="row_fDRKWRKFRK">
+ <frame label="Depends on RKWard version" id="RKFrame">
+ <input label="RKWard min" id="RKMin" size="small" />
+ <input label="RKWard max" id="RKMax" size="small" />
+ <stretch />
+ </frame>
+ <frame label="Depends on R version" id="RFrame">
+ <input label="R min" id="RMin" size="small" />
+ <input label="R max" id="RMax" size="small" />
+ <stretch />
+ </frame>
+ </row>
+ <row id="row_oODRDRPNMM">
+ <optionset id="dependencyOptionset">
+ <content>
+ <optiondisplay />
+ <frame label="Depends on R packages" id="frm_DpndsnRp">
+ <row id="row_inptPNMMRR">
+ <input label="Package" id="pckgName" />
+ <input label="min" id="pckgMin" />
+ <input label="max" id="pckgMax" />
+ <input label="Repository" id="pckgRepo" />
+ </row>
+ <stretch />
+ </frame>
+ </content>
+ <optioncolumn id="optcolPckgName" connect="pckgName.text" label="Package" />
+ <optioncolumn id="optcolPckgMin" connect="pckgMin.text" label="min" />
+ <optioncolumn id="optcolPckgMax" connect="pckgMax.text" label="max" />
+ <optioncolumn id="optcolPckgRepo" connect="pckgRepo.text" label="Repository" />
+ </optionset>
+ </row>
+ </frame>
+ </column>
+ </tab>
+ <tab label="Help page" id="tab_Helppage">
+ <column id="clm_fWTSSSSUUU">
+ <frame label="Write help files" checkable="true" checked="false" id="helpText">
+ <row id="row_inptlblSmS">
+ <input label="Summary" id="helpSummary" size="large" />
+ </row>
+ <row id="row_inptlblUsU">
+ <input label="Usage" id="helpUsage" size="large" />
+ </row>
+ </frame>
+ </column>
+ </tab>
+ </tabbook>
+ </dialog>
</document>
More information about the rkward-tracker
mailing list