The line that throws the exception is this.pathEditor = this.pathInput.getModel();. When I inspect this.pathInput, it seems to be a generic HTMLElement with no getModel and no custom constructor. So, I suspect that the atom-text-editor element isn't registered by the time the shortcut is activated.
Adding this to my init.coffee seems to fix the problem, but advanced-open-file should probably require() text-editor-element somehow:
At this.pathInput.getModel is not a function
TypeError: this.pathInput.getModel is not a function
at /packages/advanced-open-file/lib/view.js:34:42)
at /packages/advanced-open-file/lib/controller.js:23:21)
at Object.activate (/packages/advanced-open-file/lib/advanced-open-file.js:12:18)
at Package.module.exports.Package.activateNow (/usr/share/atom-beta/resources/app/src/package.js:253:1)
at /usr/share/atom-beta/resources/app/src/package.js:968:1
at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom-beta/resources/app/node_modules/event-kit/lib/emitter.js:25:1)
at Emitter.module.exports.Emitter.emit (/usr/share/atom-beta/resources/app/node_modules/event-kit/lib/emitter.js:129:1)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom-beta/resources/app/src/command-registry.js:246:1)
at /usr/share/atom-beta/resources/app/src/command-registry.js:3:1
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom-beta/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:610:1)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom-beta/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:401:1)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/usr/share/atom-beta/resources/app/src/window-event-handler.js:100:1)
at HTMLDocument.<anonymous> (/usr/share/atom-beta/resources/app/src/window-event-handler.js:3:1)
The line that throws the exception is
this.pathEditor = this.pathInput.getModel();
. When I inspectthis.pathInput
, it seems to be a generic HTMLElement with no getModel and no custom constructor. So, I suspect that the atom-text-editor element isn't registered by the time the shortcut is activated.Adding this to my init.coffee seems to fix the problem, but advanced-open-file should probably require() text-editor-element somehow:
FYI I'm using Atom 1.17.0-beta0.
Steps to reproduce:
Atom: 1.17.0-beta0 x64 Electron: 1.3.14 OS: Ubuntu 14.04.5 Thrown From: advanced-open-file package 0.16.6
Stack Trace
Failed to activate the advanced-open-file package
Commands
Non-Core Packages