Skip to content

Commit

Permalink
Implement sourceeditor autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBarnabe committed Feb 4, 2014
1 parent bde2ce9 commit 6159874
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions content/edit.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
var require = null;
var autocompleter = null;
try {
require = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools.require;
autocompleter = require("devtools/sourceeditor/autocomplete");
} catch (ex) {
// file not available...
}
Expand Down Expand Up @@ -162,6 +164,10 @@ function init2() {
wrapLinesE.checked = wrapLines;
wrapLinesE.style.display = "";
}
if (sourceEditorType == "sourceeditor" && autocompleter != null) {
sourceEditor.extend(autocompleter);
sourceEditor.setupAutoCompletion(null);
}

initStyle();

Expand Down
1 change: 1 addition & 0 deletions content/edit.xul
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://stylish/skin/edit.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>

<!DOCTYPE dialog [
Expand Down

0 comments on commit 6159874

Please # to comment.