Project: appceleratorstudio
Issue TISTUD-6359: Errors using shortcuts (CMD+/ or CMD+delete) in tiapp.xml
h5. Problem description Using CMD+/ and CMD+delete is not possible when editing tiapp.xml. Reproducible on Appcelerator Studio versions 3.2.1.201402061120 - 3.2.3.201404181520 - 3.3.0.201404221437 h5. Steps to reproduce 1. Open a project and edit tiapp.xml file 2. Press CMD + / on a line Expected result: line is commented out Result: nothing happens and following error is displayed {code} [2014-04-23 14:47:47] An error occurred while processing the invoke block for the command Comment Line / Selection in /Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/122/1/.cp/bundles/source.ruble/commands/toggle_comment.rb: (NoMethodError) undefined method `replace' for nil:NilClass org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `replace' for nil:NilClass Ruble::Editor.[]=(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/77/1/.cp/framework/ruble/editor.rb:202) org.jruby.RubyProc.call(org/jruby/RubyProc.java:274) org.jruby.RubyProc.call(org/jruby/RubyProc.java:229) #.run(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/123/1/.cp/framework/ruble/ui.rb:249) Ruble::Editor.[]=(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/77/1/.cp/framework/ruble/editor.rb:193) LineComment.add(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/122/1/.cp/bundles/source.ruble/lib/comment.rb:233) #.define_command(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/122/1/.cp/bundles/source.ruble/commands/toggle_comment.rb:56) org.jruby.RubyArray.each(org/jruby/RubyArray.java:1603) #.define_command(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/122/1/.cp/bundles/source.ruble/commands/toggle_comment.rb:53) org.jruby.RubyArray.each(org/jruby/RubyArray.java:1603) #.define_command(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/122/1/.cp/bundles/source.ruble/commands/toggle_comment.rb:52) org.jruby.RubyProc.call(org/jruby/RubyProc.java:274) org.jruby.RubyProc.call(org/jruby/RubyProc.java:233) {code} 3. Press CMD + delete on the end of a line Expected result: line get all deleted Result: nothing happens and the following error is displayed in console {code} [2014-04-23 14:49:21] An error occurred while processing the invoke block for the command Delete to Beginning of Line in /Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/122/1/.cp/bundles/text.ruble/commands/delete_to_beginning_of_line.rb: (NoMethodError) undefined method `replace' for nil:NilClass org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `replace' for nil:NilClass Ruble::Editor.[]=(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/77/1/.cp/framework/ruble/editor.rb:202) org.jruby.RubyProc.call(org/jruby/RubyProc.java:274) org.jruby.RubyProc.call(org/jruby/RubyProc.java:229) #.run(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/123/1/.cp/framework/ruble/ui.rb:249) Ruble::Editor.[]=(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/77/1/.cp/framework/ruble/editor.rb:193) #.define_command(/Applications/AppceleratorStudio/Appcelerator_Studio_322GA_32bit/Appcelerator Studio/configuration/org.eclipse.osgi/bundles/122/1/.cp/bundles/text.ruble/commands/delete_to_beginning_of_line.rb:11) org.jruby.RubyProc.call(org/jruby/RubyProc.java:274) org.jruby.RubyProc.call(org/jruby/RubyProc.java:233) {code} 4. Edit another .xml file, for example an index.xml of an Alloy project. Use and on a line of code Result: shortcuts work as expected.
Story points: 8