Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

comment out Run & Debug panel, added Run Configuration group to Prefe…

…rences
  • Loading branch information...
commit d650cb4452dddf558716a6cc39963198ee7e233a 1 parent 8f0551a
Linh Nguyen authored
View
34 plugins-client/ext.runpanel/runpanel.js
@@ -44,13 +44,13 @@ module.exports = ext.register("ext/runpanel/runpanel", {
var _self = this;
this.markupInsertionPoint = colLeft;
-
+/*
panels.register(this, {
position : 3000,
caption: "Run & Debug",
"class": "rundebug"
});
-
+*/
commands.addCommand({
name: "run",
"hint": "run and debug a node program on the server",
@@ -77,7 +77,7 @@ module.exports = ext.register("ext/runpanel/runpanel", {
this.nodes.push(
this.mnuRunCfg = new apf.menu({
- "id" : "mnuRunCfg",
+ "id" : "mnuRunCfg",/*
"onprop.visible" : function(e){
if (e.value) {
if (!this.populated) {
@@ -92,7 +92,7 @@ module.exports = ext.register("ext/runpanel/runpanel", {
else
_self.mnuRunCfg.firstChild.enable();
}
- }
+ }*/
}),
menus.$insertByIndex(barTools, new apf.splitbutton({
@@ -139,15 +139,18 @@ module.exports = ext.register("ext/runpanel/runpanel", {
});
var c = 0;
+/*
menus.addItemToMenu(this.mnuRunCfg, new apf.item({
caption : "no run history",
disabled : true,
}), c += 100);
menus.addItemToMenu(this.mnuRunCfg, new apf.divider(), c += 100);
+*/
menus.addItemToMenu(this.mnuRunCfg, new apf.item({
caption : "Configure....",
onclick : function(){
- _self.showRunConfigs(false);
+ settings.show()
+ /*_self.showRunConfigs(false);*/
}
}), c += 100);
menus.addItemToMenu(this.mnuRunCfg, new apf.divider(), c += 100);
@@ -165,7 +168,7 @@ module.exports = ext.register("ext/runpanel/runpanel", {
checked : "[{require('ext/settings/settings').model}::auto/configurations/@autohide]"
}), c += 100);
- settings.addSettings("General", markupSettings);
+ settings.addSettings("Run Configuration", markupSettings);
ide.addEventListener("settings.load", function(e){
settings.setDefaults("auto/node-version", [
@@ -180,7 +183,7 @@ module.exports = ext.register("ext/runpanel/runpanel", {
["debug", "false"],
["autohide", "true"]
]);
-
+/*
var runConfigs = e.model.queryNode("auto/configurations");
if (!runConfigs.selectSingleNode("config[@curfile]")) {
var setLast = false;
@@ -201,6 +204,7 @@ module.exports = ext.register("ext/runpanel/runpanel", {
}
_self.model.load(runConfigs);
+*/
});
function setActiveFile(page){
@@ -342,7 +346,7 @@ module.exports = ext.register("ext/runpanel/runpanel", {
.attr("args", "").node();
var node = this.model.appendXml(cfg);
- this.$addMenuItem(node);
+ //this.$addMenuItem(node);
lstRunCfg.select(node);
},
@@ -362,24 +366,24 @@ module.exports = ext.register("ext/runpanel/runpanel", {
run : function(debug) {
var node;
- if (window.winRunPanel && winRunPanel.visible)
+ /*if (window.winRunPanel && winRunPanel.visible)
node = lstRunCfg.selected;
- else {
+ else {*/
node = this.model.queryNode("node()[@last='true']")
|| this.model.queryNode("config[@curfile]");
- }
-
+ //}
+/*
if (node.getAttribute("curfile")
&& this.excludedTypes[node.getAttribute("path").split(".").pop()]) {
this.showRunConfigs(false);
return;
}
-
+*/
this.runConfig(node, this.shouldRunInDebugMode());
ide.dispatchEvent("track_action", {type: debug ? "debug" : "run"});
},
-
+/*
$populateMenu : function() {
var menu = this.mnuRunCfg;
@@ -421,7 +425,7 @@ module.exports = ext.register("ext/runpanel/runpanel", {
}
}), divider);
},
-
+*/
runConfig : function(config, debug) {
//ext.initExtension(this);
var model = settings.model;
View
65 plugins-client/ext.runpanel/settings.xml
@@ -1,24 +1,47 @@
<a:application xmlns:a="http://ajax.org/2005/aml">
- <a:model id="mdlRunnerSelector2">
- <data>
- <element caption="Auto" value="auto" />
- <element caption="Node.js 0.6.x" value="0.6.x" />
- <element caption="Node.js 0.4.x" value="0.4.x" />
- <!--element caption="Python" value="py" /-->
- </data>
- </a:model>
- <a:hbox position="19000" edge="2 5 5 5" align="center" class="underlined">
- <a:label flex="1">Node.js Runtime</a:label>
- <a:dropdown
- model = "mdlRunnerSelector2"
- width = "100"
- height = "21"
- disabled = "{!lstRunCfg.selected}"
- value = "[{require('core/settings').model}::auto/node-version/@version]"
- default = "auto"
- each = "[element]"
- caption = "[@caption]"
- eachvalue = "[@value]" />
- </a:hbox>
+ <a:vbox>
+ <a:hbox edge="0 5 2 7" align="center" class="underlined">
+ <a:label width="100">File Path</a:label>
+ <a:textbox
+ flex="1"
+ value="[{require('ext/settings/settings').model}::auto/configurations/config/@name]"
+ class="fixMargin5"
+ margin="5 0 0" />
+ <!--a:button icon="folder.png" disabled="true" tooltip="Browse ..."></a:button-->
+
+ <!--a:divider span="2" skin="c9-divider-hor" /-->
+ <a:model id="mdlRunnerSelector">
+ <data>
+ <element caption="Default" value="default" />
+ <element caption="Node.js (Auto)" value="node auto" />
+ <element caption="Node.js 0.6.x" value="node 0.6.x" />
+ <element caption="Node.js 0.4.x" value="node 0.4.x" />
+ <element caption="Apache+PHP" value="apache" />
+ <element caption="PHP CLI" value="php" />
+ <element caption="Python" value="python" />
+ <element caption="Ruby" value="ruby" />
+ </data>
+ </a:model>
+ </a:hbox>
+ <a:hbox edge="5 5 7 7" align="center" class="underlined">
+ <a:label width="100">Runtime</a:label>
+ <a:dropdown id="ddRunnerSelector"
+ model = "mdlRunnerSelector"
+ flex = "1"
+ value = "[{require('ext/settings/settings').model}::auto/configurations/config/@value]"
+ default = "default"
+ each = "[element]"
+ caption = "[@caption]"
+ eachvalue = "[@value]" />
+ </a:hbox>
+ <a:hbox edge="0 5 2 7" align="center">
+ <a:label width="100">Cmd Line Args</a:label>
+ <a:textbox id="txtCmdArgs"
+ flex="1"
+ value="[{require('ext/settings/settings').model}::auto/configurations/config/@args]"
+ class="fixMargin5"
+ margin="5 0 0" />
+ </a:hbox>
+ </a:vbox>
</a:application>
Please sign in to comment.
Something went wrong with that request. Please try again.