[rkward] packages/rkwarddev: fixed RKWard GUI dialog
m.eik michalke
meik.michalke at uni-duesseldorf.de
Thu Oct 8 19:59:00 UTC 2015
Git commit 93917b7af2f9f75e3eb8938f853ef64773374ffd by m.eik michalke.
Committed on 08/10/2015 at 19:20.
Pushed by meikm into branch 'master'.
fixed RKWard GUI dialog
- person() was wrongly quoted
- dependecies were added twice
- some comma issues
M +19 -15 packages/rkwarddev/demo/skeleton_dialog.R
M +7 -1 packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
M +15 -18 packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
M +2 -0 packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
http://commits.kde.org/rkward/93917b7af2f9f75e3eb8938f853ef64773374ffd
diff --git a/packages/rkwarddev/demo/skeleton_dialog.R b/packages/rkwarddev/demo/skeleton_dialog.R
index 9977b0a..6316f8a 100644
--- a/packages/rkwarddev/demo/skeleton_dialog.R
+++ b/packages/rkwarddev/demo/skeleton_dialog.R
@@ -269,17 +269,17 @@ js.opt.skel.pluginmap <- rk.JS.options("optPluginmap",
qp("name=\"", pl.name, "\"")
),
ite(pl.hier, qp("hierarchy=\"", pl.hier, "\"")),
- funct="list", option="pluginmap", collapse="")
+ 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(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, ")"),
- qp("\n\tdependencies=plugin.dependencies"),
- qp("\n\t#dependencies=plugin.dependencies")
- ),
+# ite(id(js.frm.dep.opts, " && (", js.opt.about.dep, " || ", dep.optioncol.pckg.name, ")"),
+# 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")),
@@ -310,22 +310,22 @@ JS.calculate <- rk.paste.JS(
rk.JS.optionset(oset.authors, vars=TRUE, guess.getter=TRUE),
ite(id(optioncol.aut.given, " != \"\""),
rk.paste.JS(
- echo("\tauthor=\"c(\n\t\t\t"),
+ 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\\\"")),
+ ite(id(optioncol.aut.auth, " == 1"), qp("\"aut\"")),
+ ite(id(optioncol.aut.maint, " == 1"), qp("\"cre\"")),
+ ite(id(optioncol.aut.cntr, " == 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=\"", 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(")"),
collapse=",\\n\\t\\t\\t"
),
- echo("\n\t\t)\",\n")
+ echo("\n\t\t),\n")
)
),
echo(js.opt.about.about),
@@ -370,7 +370,11 @@ JS.calculate <- rk.paste.JS(
"#############\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,"),
- ite(id(js.frm.dep.opts, " && ", js.opt.about.dep), echo("\n\tdependencies=plugin.dependencies,")),
+ ite(
+ id(js.frm.dep.opts, " && ", js.opt.about.dep),
+ echo("\n\tdependencies=plugin.dependencies,"),
+ echo("\n\t#dependencies=plugin.dependencies,")
+ ),
echo("\n\tpath=output.dir,",
"\n\tguess.getter=guess.getter,",
"\n\tscan=c(\"var\", \"saveobj\", \"settings\"),",
diff --git a/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap b/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
index 91c66f9..4e31cff 100644
--- a/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
+++ b/packages/rkwarddev/inst/rkward/RKWardPluginSkeleton.pluginmap
@@ -17,7 +17,7 @@
shortinfo="GUI interface to create RKWard plugin skeletons"
longinfo="GUI interface to create RKWard plugin skeletons"
version="0.06-5"
- releasedate="2015-01-30"
+ releasedate="2015-10-08"
url="http://rkward.kde.org"
license="GPL (>= 3)"
>
@@ -28,6 +28,12 @@
role="aut, cre"
/>
</about>
+ <require
+ map="rkward::menu"
+ />
+ <require
+ map="rkward::embedded"
+ />
<components>
<component
id="cmp_CrtRKWrdplgnskltnCrtRKWrd"
diff --git a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
index 194522d..73f4461 100644
--- a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
+++ b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.js
@@ -118,7 +118,7 @@ function calculate(){
arrOptAbout = arrOptAbout.filter(String);
// set the actual variable optAbout with all values for R option "about"
if(arrOptAbout.length > 0) {
- var optAbout = ",\n\tabout=list(" + arrOptAbout.join(", ") + ")";
+ var optAbout = ", about=list(" + arrOptAbout.join(", ") + ")";
} else {
var optAbout = "";
}
@@ -149,7 +149,7 @@ function calculate(){
arrOptDependencies = arrOptDependencies.filter(String);
// set the actual variable optDependencies with all values for R option "dependencies"
if(arrOptDependencies.length > 0) {
- var optDependencies = ",\n\tdependencies=list(" + arrOptDependencies.join(", ") + ")";
+ var optDependencies = ", dependencies=list(" + arrOptDependencies.join(", ") + ")";
} else {
var optDependencies = "";
}
@@ -187,11 +187,6 @@ function calculate(){
} else {
arrOptSkeleton.push("\n\t#pluginmap=list(name=\"\", hierarchy=\"\", require=\"\")");
}
- if(frmDfndpndnChecked && (optDependencies || ocolOclInpPckgtxt)) {
- arrOptSkeleton.push("\n\tdependencies=plugin.dependencies");
- } else {
- arrOptSkeleton.push("\n\t#dependencies=plugin.dependencies");
- }
if(chcIncldplg) {
arrOptSkeleton.push("\n\ttests=TRUE");
} else {
@@ -216,7 +211,7 @@ function calculate(){
arrOptSkeleton = arrOptSkeleton.filter(String);
// set the actual variable optSkeleton with all values for R option ""
if(arrOptSkeleton.length > 0) {
- var optSkeleton = "" + arrOptSkeleton.join(", ") + "";
+ var optSkeleton = ", " + arrOptSkeleton.join(", ") + "";
} else {
var optSkeleton = "";
}
@@ -232,22 +227,22 @@ function calculate(){
var ocolOclChcMntnrst = getList("ost_fPPPPGGFFE.ocl_chcMntnrst");
var ocolOclChcCntrbtr = getList("ost_fPPPPGGFFE.ocl_chcCntrbtr");
if(ocolOclInpGvnnmtx != "") {
- echo("\tauthor=\"c(\n\t\t\t");
+ 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\\\"");
+ arrOptAuthorRole.push("\"aut\"");
} else {
arrOptAuthorRole.push();
}
if(ocolOclChcMntnrst[i] == 1) {
- arrOptAuthorRole.push("\\\"cre\\\"");
+ arrOptAuthorRole.push("\"cre\"");
} else {
arrOptAuthorRole.push();
}
if(ocolOclChcCntrbtr[i] == 1) {
- arrOptAuthorRole.push("\\\"ctb\\\"");
+ arrOptAuthorRole.push("\"ctb\"");
} else {
arrOptAuthorRole.push();
}
@@ -255,28 +250,28 @@ function calculate(){
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(", ") + ")";
+ var optAuthorRole = ", role=c(" + arrOptAuthorRole.join(", ") + ")";
} else {
var optAuthorRole = "";
}
echo("person(");
- echo("given=\\\"" + ocolOclInpGvnnmtx[i] + "\\\"");
+ echo("given=\"" + ocolOclInpGvnnmtx[i] + "\"");
if(ocolOclInpFmlynmt[i]) {
- echo(", family=\\\"" + ocolOclInpFmlynmt[i] + "\\\"");
+ echo(", family=\"" + ocolOclInpFmlynmt[i] + "\"");
}
if(ocolOclInpEmaltxt[i]) {
- echo(", email=\\\"" + ocolOclInpEmaltxt[i] + "\\\"");
+ echo(", email=\"" + ocolOclInpEmaltxt[i] + "\"");
}
if(optAuthorRole) {
- echo(", " + optAuthorRole);
+ echo(optAuthorRole);
}
echo(")");
if(i + 1 < ocolOclInpGvnnmtx.length) {
echo(",\n\t\t\t");
}
}
- echo("\n\t\t)\",\n");
+ echo("\n\t\t),\n");
}
echo(optAbout);
echo("\n)\n\n");
@@ -330,6 +325,8 @@ function calculate(){
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) {
diff --git a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
index b1cfc71..9e92214 100644
--- a/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
+++ b/packages/rkwarddev/inst/rkward/plugins/CreateRKWardpluginskeleton.xml
@@ -4,6 +4,8 @@
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" />
More information about the rkward-tracker
mailing list