[Sciviews-commits] r499 - komodo/SciViews-K/.komodotools

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 18 08:06:58 CET 2012


Author: phgrosjean
Date: 2012-12-18 08:06:58 +0100 (Tue, 18 Dec 2012)
New Revision: 499

Added:
   komodo/SciViews-K/.komodotools/Build.komodotool
   komodo/SciViews-K/.komodotools/Build_and_Install.komodotool
   komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool
Log:
SciViews-K project migration to Komodo 7 (part VI)

Added: komodo/SciViews-K/.komodotools/Build.komodotool
===================================================================
--- komodo/SciViews-K/.komodotools/Build.komodotool	                        (rev 0)
+++ komodo/SciViews-K/.komodotools/Build.komodotool	2012-12-18 07:06:58 UTC (rev 499)
@@ -0,0 +1,36 @@
+{
+  "keyboard_shortcut": "", 
+  "name": "Build", 
+  "language": "JavaScript", 
+  "trigger_enabled": false, 
+  "value": [
+    "/**", 
+    " * Script to build an xpi, running koext build in the current project root.", 
+    " */", 
+    "", 
+    "var project = ko.macros.current.project;", 
+    "var projectDir = ko.interpolate.interpolateString('%p');", 
+    "var callback = function() {", 
+    "  ko.statusBar.AddMessage('Build complete', 'projects', 5000, true);", 
+    "  ko.projects.manager.saveProject(project);", 
+    "};", 
+    "var osPath = Components.classes[\"@activestate.com/koOsPath;1\"].", 
+    "                getService(Components.interfaces.koIOsPath);", 
+    "var preprocessedChromePath = osPath.join(projectDir, \"chrome.p.manifest\");", 
+    "if (osPath.exists(preprocessedChromePath)) {", 
+    "  ko.koextgen.extensionLib.command('build -i chrome.manifest -i chrome.p.manifest ' +", 
+    "                                   '-d \"' + projectDir + '\"',", 
+    "                                   callback);", 
+    "} else {", 
+    "  ko.koextgen.extensionLib.command('build -i chrome.manifest ' +", 
+    "                                   '-d \"' + projectDir + '\"',", 
+    "                                   callback);", 
+    "}"
+  ], 
+  "trigger": "", 
+  "rank": 100, 
+  "version": "1.0.7", 
+  "async": 1, 
+  "type": "macro", 
+  "icon": "chrome://fugue/skin/icons/building--plus.png"
+}
\ No newline at end of file

Added: komodo/SciViews-K/.komodotools/Build_and_Install.komodotool
===================================================================
--- komodo/SciViews-K/.komodotools/Build_and_Install.komodotool	                        (rev 0)
+++ komodo/SciViews-K/.komodotools/Build_and_Install.komodotool	2012-12-18 07:06:58 UTC (rev 499)
@@ -0,0 +1,54 @@
+{
+  "keyboard_shortcut": "", 
+  "name": "Build and Install", 
+  "language": "JavaScript", 
+  "trigger_enabled": false, 
+  "value": [
+    "/**", 
+    " * Script to build an xpi, running koext build in the current project root and", 
+    " * then install it into the currently running Komodo.", 
+    " */", 
+    "", 
+    "var project = ko.macros.current.project;", 
+    "var projectDir = ko.interpolate.interpolateString('%p');", 
+    "var callback = function() {", 
+    "  ko.statusBar.AddMessage('Build complete', 'projects', 5000, true);", 
+    "  ko.projects.manager.saveProject(project);", 
+    "  var os = Components.classes[\"@activestate.com/koOs;1\"].", 
+    "                  getService(Components.interfaces.koIOs);", 
+    "  var entries = os.listdir(projectDir, {});", 
+    "  var xpi_entries = entries.filter(function(name) { return /.xpi$/.test(name); } );", 
+    "  if (xpi_entries.length == 0) {", 
+    "    ko.dialogs.alert(\"No xpi file found in project dir: \" + projectDir);", 
+    "  } else if (xpi_entries.length == 1) {", 
+    "    ko.open.URI(os.path.join(projectDir, xpi_entries[0]));", 
+    "  } else {", 
+    "    var result = ko.dialogs.selectFromList(\"Extension Installation\",", 
+    "                              \"Pick the xpi to install: \",", 
+    "                              xpi_entries,", 
+    "                              \"one\");", 
+    "    if (result) {", 
+    "      ko.open.URI(os.path.join(projectDir, result));", 
+    "    }", 
+    "  }", 
+    "};", 
+    "var osPath = Components.classes[\"@activestate.com/koOsPath;1\"].", 
+    "                getService(Components.interfaces.koIOsPath);", 
+    "var preprocessedChromePath = osPath.join(projectDir, \"chrome.p.manifest\");", 
+    "if (osPath.exists(preprocessedChromePath)) {", 
+    "  ko.koextgen.extensionLib.command('build -i chrome.manifest -i chrome.p.manifest ' +", 
+    "                                   '-d \"' + projectDir + '\"',", 
+    "                                   callback);", 
+    "} else {", 
+    "  ko.koextgen.extensionLib.command('build -i chrome.manifest ' +", 
+    "                                   '-d \"' + projectDir + '\"',", 
+    "                                   callback);", 
+    "}"
+  ], 
+  "trigger": "", 
+  "rank": 100, 
+  "version": "1.0.7", 
+  "async": 1, 
+  "type": "macro", 
+  "icon": "chrome://fugue/skin/icons/building--arrow.png"
+}
\ No newline at end of file

Added: komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool
===================================================================
--- komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool	                        (rev 0)
+++ komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool	2012-12-18 07:06:58 UTC (rev 499)
@@ -0,0 +1,15 @@
+{
+  "keyboard_shortcut": "", 
+  "name": "Docs - Extensions", 
+  "language": "JavaScript", 
+  "trigger_enabled": false, 
+  "value": [
+    "ko.help.open('komodo_extensions');"
+  ], 
+  "trigger": "", 
+  "rank": 100, 
+  "version": "1.0.7", 
+  "async": 1, 
+  "type": "macro", 
+  "icon": "chrome://fugue/skin/icons/information-white.png"
+}
\ No newline at end of file



More information about the Sciviews-commits mailing list