zedtux / ror-refactor

Atom package including a set of refactoring tools for Ruby On Rails.
6 stars 0 forks source link

Uncaught TypeError: grammar.tokenizeLine is not a function #2

Open zedtux opened 5 years ago

zedtux commented 5 years ago

Having a piece of code like that :

    def action_cable_is_speaking_in?(message)
      message =~ /#{ActiveRecordMigrationUi.ac_channel_class_name}( is)? transmitting/
    end

Selecting the ActiveRecordMigrationUi.ac_channel_class_name part and doing CTRL + ALT + CMD + R raises this error.

Atom: 1.37.0 x64 Electron: 2.0.18 OS: Mac OS X 10.14.5 Thrown From: ror-refactor package 0.3.1

Stack Trace

Uncaught TypeError: grammar.tokenizeLine is not a function

At /Users/guillaumehain/.atom/packages/ror-refactor/lib/tools/extract-code.js:103

TypeError: grammar.tokenizeLine is not a function
    at ExtractCode.extractMethodOrLine (/packages/ror-refactor/lib/tools/extract-code.js:103:30)
    at ExtractCode.refactor (/packages/ror-refactor/lib/tools/extract-code.js:49:14)
    at HTMLElement.rorRefactorExtractCode (/packages/ror-refactor/lib/ror-refactor.js:18:59)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:349922)
    at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1214917)
    at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1211051)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:285128)

Commands

     -1:07.0 autocomplete-plus:confirm (input.hidden-input)
     -1:06.7.0 editor:newline (input.hidden-input)
  2x -1:06.3.0 autocomplete-plus:cancel (input.hidden-input)
     -1:05.6.0 core:move-up (input.hidden-input)
     -1:05.3.0 editor:newline-below (input.hidden-input)
     -1:05.2.0 core:paste (input.hidden-input)
     -1:04.9.0 core:save (input.hidden-input)
     -1:01.4.0 settings-view:open (input.hidden-input)
     -0:56.2.0 core:confirm (input.hidden-input)
     -0:36.3.0 core:close (div.package-detail)
 15x -0:35.1.0 core:undo (input.hidden-input)
     -0:29.7.0 intentions:highlight (input.hidden-input)
     -0:27 settings-view:open (input.hidden-input)
  2x -0:24 core:backspace (input.hidden-input)
     -0:16.3.0 core:close (div.package-detail)
     -0:14.7.0 ror-refactor:extract-code (input.hidden-input)

Non-Core Packages

atom-beautify 0.33.4 
blame 1.1.0 
busy-signal 2.0.1 
highlight-selected 0.16.0 
intentions 1.1.5 
language-docker 1.1.8 
linter 2.3.0 
linter-eslint 8.5.5 
linter-ui-default 1.7.1 
ror-refactor 0.3.1 
ruby-test 1.0.2 
toggle-quotes 1.1.4