diff --git a/content/edit.js b/content/edit.js index 60bbe0f..5e30ce5 100644 --- a/content/edit.js +++ b/content/edit.js @@ -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... } @@ -162,6 +164,10 @@ function init2() { wrapLinesE.checked = wrapLines; wrapLinesE.style.display = ""; } + if (sourceEditorType == "sourceeditor" && autocompleter != null) { + sourceEditor.extend(autocompleter); + sourceEditor.setupAutoCompletion(null); + } initStyle(); diff --git a/content/edit.xul b/content/edit.xul index 6d4d056..261b416 100644 --- a/content/edit.xul +++ b/content/edit.xul @@ -1,6 +1,7 @@ +