Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

compatibility with firebug 1.10

  • Loading branch information...
commit 8ba1e148143dcbc2799066bced0ed6333c213c86 1 parent 64e2f02
@nightwing nightwing authored
View
2  chrome/content/ace++/startup.js
@@ -289,7 +289,7 @@ exports.launch = function(env, options) {
};
editor.autocompletionKeySet = new HashHandler({
- startAutocompleter: 'Ctrl-Space',
+ startAutocompleter: 'Ctrl-Space|Cmd-Space|Shift-Space',
complete: 'Return',
completeAndReplace: 'Shift-Return',
dotComplete: 'Ctrl-.|Alt-.',
View
45 chrome/content/aceEditor.js
@@ -10,9 +10,11 @@ var Ci = Components.interfaces;
var Str
/***********************************************************/
-var $ACESTR = function(name) {
- return FBL.$STR(name, "strings_acebug");
-};
+var $strBundle = document.getElementById("strings_acebug")
+var $ACESTR = function(name) {return FBL.$STR(name, $strBundle)};
+
+if (Firebug.CommandEditor)
+ Firebug.CommandEditor.initialize=function(){}
Firebug.Ace = {
dispatchName: "Ace",
@@ -78,28 +80,12 @@ Firebug.Ace = {
// firebug hook
hookIntoFirebug: function(chrome, ondetach) {
- var fName = "getCommandLineLarge"
- if (Firebug.CommandLine.getCommandEditor &&
- !chrome.getCommandEditorPatched
- ) {
- dump(12, chrome.getCommandEditorPatched)
- chrome.getCommandEditorPatched = true
-
- // required for 1.8 compatibility
- // see http://code.google.com/p/fbug/source/detail?r=11301
- fName = "getCommandEditor"
-
- let oldEl = chrome.$("fbLargeCommandBox")
- let newEl = chrome.$("fbCommandEditorBox")
- let toolbar = chrome.$("fbCommandToolbar")
- newEl.parentNode.removeChild(newEl)
- oldEl.appendChild(toolbar)
- oldEl.id = "fbCommandEditorBox"
- }
- if (ondetach)
- return
-
- Firebug.CommandLine[fName] = function() {
+ try{if (Firebug.CommandEditor) {
+ Firebug.CommandEditor.editor && Firebug.CommandEditor.shutdown()
+ var node = document.getElementById("fbCommandEditor");
+ node && node.parentNode.removeChild(node)
+ }}catch(e){Cu.reportError(e)}
+ Firebug.CommandLine.getCommandEditor = function() {
return Firebug.largeCommandLineEditor;
};
Firebug.ConsolePanel.prototype.detach = this.detach
@@ -113,7 +99,7 @@ Firebug.Ace = {
}
Firebug.ScriptPanel.prototype.onKeyPress = function(e) {
- if (e.which==32 && (e.ctrlKey || e.altKey || e.metaKey)) {
+ if ((e.which==32||e.which==13) && (e.ctrlKey || e.altKey || e.metaKey)) {
var text = e.view.getSelection().toString()
var context = Firebug.currentContext
var popup = Firebug.CommandLine.Popup
@@ -401,7 +387,12 @@ Firebug.largeCommandLineEditor = {
hook: function(){
Components.utils.import("resource://gre/modules/reflect.jsm")
Firebug.CommandLine.enter = this.onLineEditorEnterOverride
- Str = Firebug.require("firebug/lib/string")
+ Str = Firebug.require("firebug/lib/string")
+ // 1.10 compatibility
+ if (!Firebug.CommandLine.acceptCompletionOrReturnIt)
+ Firebug.CommandLine.acceptCompletionOrReturnIt = function(context){
+ return this.getCommandLine(context).value
+ }
},
onLineEditorEnterOverride: function (context, command) {
var expr = command ? command : this.acceptCompletionOrReturnIt(context);
View
2  chrome/content/firebugOverlay.xul
@@ -51,7 +51,7 @@
</hbox>
<deck id="fbSidePanelDeck" persist="width,height">
- <vbox id="fbLargeCommandBox">
+ <vbox id="fbCommandEditorBox">
<iframe id="fbAceBrowser" type="content" flex="1"
tooltip="fbTooltip" contextmenu="fbContextMenu"
src="chrome://acebug/content/ace++/fbeditor.html"
View
6 chrome/content/resource.js
@@ -1,9 +1,9 @@
/* See license.txt for terms of usage */
FBL.ns(function() { with (FBL) {
-var $ACESTR = function(name) {
- return FBL.$STR(name, "strings_acebug");
-};
+
+var $strBundle = document.getElementById("strings_acebug")
+var $ACESTR = function(name) {return FBL.$STR(name, $strBundle)};
/*Firebug.currentContext.getPanel('net')
//Firebug.getp
View
6 install.rdf
@@ -5,9 +5,9 @@
<Description about="urn:mozilla:install-manifest">
<em:name>Acebug</em:name>
- <em:description>Syntax highlighting for the Firebug command line using Ace. Firebug 1.7X.0a10 or above must be installed in order to use this extension.</em:description>
+ <em:description>Syntax highlighting for the Firebug command line using Ace. Firebug 1.9 or above must be installed in order to use this extension.</em:description>
<em:id>acebug@mozilla.org</em:id>
- <em:version>1.9.2</em:version>
+ <em:version>1.9.3</em:version>
<em:type>2</em:type>
<em:creator>Harutyun Amirjanyan &amp; Michael Ratcliffe</em:creator>
<em:iconURL>chrome://acebug/content/acebug.png</em:iconURL>
@@ -20,7 +20,7 @@
<Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>1.9.0.*</em:minVersion>
- <em:maxVersion>13.0a1</em:maxVersion>
+ <em:maxVersion>14.0a1</em:maxVersion>
</Description>
</em:targetApplication>
Please sign in to comment.
Something went wrong with that request. Please try again.