Error while copying file to source folder using d&d
jeancharles-roger opened this issue · 2 comments
jeancharles-roger commented
When dropping an HTML file in a ceylon module in the Project
view (any no-ceylon file should reproduce the problem), I get an exception. I must restart IntelliJ to be able to drag file again.
The exception:
java.lang.ArrayIndexOutOfBoundsException: 0
at com.intellij.refactoring.copy.CopyFilesOrDirectoriesHandler.copyImpl(CopyFilesOrDirectoriesHandler.java:240)
at com.intellij.refactoring.copy.CopyFilesOrDirectoriesHandler.lambda$doCopyAsFiles$2(CopyFilesOrDirectoriesHandler.java:146)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:149)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
at com.intellij.refactoring.copy.CopyFilesOrDirectoriesHandler.doCopyAsFiles(CopyFilesOrDirectoriesHandler.java:146)
at com.intellij.refactoring.copy.CopyFilesOrDirectoriesHandler.copyAsFiles(CopyFilesOrDirectoriesHandler.java:106)
at com.intellij.refactoring.copy.CopyFilesOrDirectoriesHandler.doCopy(CopyFilesOrDirectoriesHandler.java:87)
at org.intellij.plugins.ceylon.ide.refactoring.CopyCeylonFileHandler.doCopy(CopyCeylonFileHandler.ceylon:38)
at com.intellij.refactoring.copy.CopyHandler.doCopy(CopyHandler.java:55)
at com.intellij.ide.CopyPasteDelegator$MyEditable.performDefaultPaste(CopyPasteDelegator.java:171)
at com.intellij.ide.CopyPasteDelegator$MyEditable.performPaste(CopyPasteDelegator.java:128)
at com.intellij.ide.actions.PasteAction.actionPerformed(PasteAction.java:45)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:215)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:232)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:570)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$2(IdeKeyEventDispatcher.java:619)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:618)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:477)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:211)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:633)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
gavinking commented
@jeancharles-roger I have pushed a potential fix for this, can you check that it works for you please?
jeancharles-roger commented
I've tried it, it works. Thanks for the fix.