Skip to content
Browse files

resizable panels, better logpoints, offer require modulenames when po…

…ssible
  • Loading branch information...
1 parent 7feaab6 commit 3c0a437920e835077ece362075e50f56da6518dc @nightwing nightwing committed
Showing with 46 additions and 27 deletions.
  1. +17 −8 chrome/content/aceEditor.js
  2. +8 −6 chrome/content/autocompleter.js
  3. +20 −12 chrome/content/firebugOverlay.xul
  4. +1 −1 install.rdf
View
25 chrome/content/aceEditor.js
@@ -334,14 +334,14 @@ Firebug.Ace = {
savePopupShowing: function(popup) {
FBL.eraseNode(popup)
- FBL.createMenuItem(popup, {label: 'save As', nol10n: true, option: 'saveAs' });
- FBL.createMenuItem(popup, {label: 'save a Copy As', nol10n: true, option: "saveACopyAs" });
+ FBL.createMenuItem(popup, {label: $ACESTR('save As'), nol10n: true, option: 'saveAs' });
+ FBL.createMenuItem(popup, {label: $ACESTR('save a Copy As'), nol10n: true, option: "saveACopyAs" });
},
loadPopupShowing: function(popup) {
FBL.eraseNode(popup)
- FBL.createMenuItem(popup, {label: 'aceAutoSave', nol10n: true, option: 1});
- FBL.createMenuItem(popup, {label: 'help', nol10n: true, option: 2});
+ FBL.createMenuItem(popup, {label: $ACESTR('lastAutoSave'), nol10n: true, option: 1});
+ FBL.createMenuItem(popup, {label: $ACESTR('help'), nol10n: true, option: 2});
},
getUserFile: function(name, dir){
@@ -521,18 +521,27 @@ Firebug.largeCommandLineEditor = {
return;
} else if (cell.coffeeText) {
text = cell.coffeeText
- } else
+ } else {
text = cell.body.map(function(x, i) {
- if (bp[i + cell.bodyStart]) {
+ var index = i + cell.bodyStart
+ if (bp[index]) {
// strip comments and ;
x = x.replace(/\/\/.*$/, '')
.replace(/;\s*$/, '')
.replace(/^\s*var\s+/g, '')
- if(x)
- x = 'console.log(' + x + ')'
+ if(x)
+ try {
+ Function('console.log(' + x + ')')
+ x = 'console.log(' + x + ')'
+ bp[index] = 'valid'
+ }catch(e){
+ bp[index] = 'invalid'
+ }
}
return x;
}).join('\n');
+ editor.session.setBreakpoints(bp)
+ }
Firebug.CommandLine.commandHistory.appendToHistory(cell.body.join('\n'));
}
text = text.replace(/\.\s*$/, '');
View
14 chrome/content/autocompleter.js
@@ -67,7 +67,7 @@ Firebug.Ace.BaseAutocompleter = {
this.tree = this.panel.getElementsByTagName('tree')[0];
this.number = this.panel.getElementsByTagName('label')[0];
- this.bubble = document.getElementById("autocomplate-info-bubble");
+ this.bubble = document.getElementById("ace-autocomplate-info-bubble");
//set handlers
this.panel.setAttribute('onpopupshown', 'Firebug.Ace.autocompleter.setView(0)');
this.panel.setAttribute('onpopuphidden', 'Firebug.Ace.autocompleter.finish()');
@@ -217,7 +217,7 @@ Firebug.Ace.BaseAutocompleter = {
}
//if (this.hidden)
// return;
- var item = this.bubble.firstChild;
+ var item = this.bubble.querySelector("textbox");
item.value = text;
if (this.bubble.state!='open')
this.bubble.showPopup(null, this.bubblePos.l, this.bubblePos.t, "popup");
@@ -567,12 +567,14 @@ Firebug.Ace.JSAutocompleter = FBL.extend(Firebug.Ace.BaseAutocompleter, {
descr = "ns";
namespaces.forEach(createItem);
} else if (fu == 'require') {
- descr = "module";
- if(require && require.modules)
- require.modules.forEach(createItem);
+ descr = "loaded module";
+ var req = FBL.unwrapObject(this.object).require
+ var modules = req.modules || req.s.contexts._.loaded
+ for (var i in modules)
+ createItem(i);
}
} catch(e) {
- Cu.reportError(e);
+ Components.utils.reportError(e);
}
this.unfilteredArray = ans.concat(this.unfilteredArray);
},
View
32 chrome/content/firebugOverlay.xul
@@ -87,25 +87,33 @@
</hbox>
<popupset id='mainPopupSet'>
- <panel id="aceAutocompletePanel" noautofocus="true" ignorekeys='true'>
+ <panel id="aceAutocompletePanel" noautofocus="true" ignorekeys='true' backdrag='true'>
<hbox>
<toolbarbutton label='' onclick='jsExplore.qi()'/>
<spacer flex='1'/>
<label/>
<toolbarbutton class='tab-close-button' oncommand='this.parentNode.parentNode.hidePopup()'/>
</hbox>
- <hbox flex="1">
- <tree seltype="single" treelines="false" flex="1" tabindex='-1'
- hidecolumnpicker='true' style='-moz-user-focus:none' >
- <treechildren id="domfly"/>
- <treecols>
- <treecol id="name" hideheader="true" primary="true" flex="2" />
- </treecols>
- </tree>
- </hbox>
+ <stack flex='1'>
+ <hbox flex="1">
+ <tree seltype="single" treelines="false" flex="1" tabindex='-1'
+ hidecolumnpicker='true' style='-moz-user-focus:none' >
+ <treechildren id="domfly"/>
+ <treecols>
+ <treecol id="name" hideheader="true" primary="true" flex="2" />
+ </treecols>
+ </tree>
+ </hbox>
+ <resizer element='aceAutocompletePanel' dir="bottomleft" left="0" bottom="0" width="16" height="16"/>
+ <resizer element='aceAutocompletePanel' dir="bottomright" right="0" bottom="0" width="16" height="16"/>
+ </stack>
</panel>
- <panel id='autocomplate-info-bubble' noautofocus="true" ignorekeys='true'>
- <textbox multiline="true" wrap='off' flex="1"/>
+ <panel id='ace-autocomplate-info-bubble' noautofocus="true" ignorekeys='true' backdrag='true'>
+ <stack flex='1'>
+ <textbox multiline="true" wrap='off' flex="1"/>
+ <resizer element='ace-autocomplate-info-bubble' dir="bottomleft" left="0" bottom="0" width="16" height="16"/>
+ <resizer element='ace-autocomplate-info-bubble' dir="bottomright" right="0" bottom="0" width="16" height="16"/>
+ </stack>
</panel>
</popupset>
View
2 install.rdf
@@ -29,7 +29,7 @@
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>4.0</em:minVersion>
- <em:maxVersion>9.0a1</em:maxVersion>
+ <em:maxVersion>11.0a1</em:maxVersion>
</Description>
</em:targetApplication>

0 comments on commit 3c0a437

Please sign in to comment.
Something went wrong with that request. Please try again.