AlexeyDmitriev / JHelper

GNU Lesser General Public License v3.0
119 stars 31 forks source link

Getting error but still it works as expected. #106

Closed emli closed 5 years ago

emli commented 5 years ago
com.intellij.util.IncorrectOperationException: java.io.IOException: Invalid file name: 'acmp/acmp368.cpp'
    at com.intellij.psi.impl.file.PsiDirectoryImpl.add(PsiDirectoryImpl.java:438)
    at name.admitriev.jhelper.task.TaskUtils.lambda$generateCPP$0(TaskUtils.java:62)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1050)
    at name.admitriev.jhelper.task.TaskUtils.generateCPP(TaskUtils.java:61)
    at name.admitriev.jhelper.task.TaskUtils.saveNewTask(TaskUtils.java:38)
    at name.admitriev.jhelper.actions.AddTaskAction.performAction(AddTaskAction.java:30)
    at name.admitriev.jhelper.actions.BaseAction.actionPerformed(BaseAction.java:15)
    at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:255)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:272)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:204)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:146)
    at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:391)
    at java.awt.Component.processEvent(Component.java:6313)
    at java.awt.Container.processEvent(Container.java:2237)
    at java.awt.Component.dispatchEventImpl(Component.java:4903)
    at java.awt.Container.dispatchEventImpl(Container.java:2295)
    at java.awt.Component.dispatchEvent(Component.java:4725)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
    at java.awt.Container.dispatchEventImpl(Container.java:2281)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4725)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    at java.awt.EventQueue$4.run(EventQueue.java:737)
    at java.awt.EventQueue$4.run(EventQueue.java:735)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:781)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:718)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
    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)
Caused by: java.io.IOException: Invalid file name: 'acmp/acmp368.cpp'
    at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.a(VirtualFileSystemEntry.java:297)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.createChildData(VirtualFileSystemEntry.java:216)
    at com.intellij.psi.impl.file.PsiDirectoryImpl.add(PsiDirectoryImpl.java:402)
    ... 43 more
AlexeyDmitriev commented 5 years ago

Can you explain what you do when you get this error, i.e what you are writing to the Add Task dialog

emli commented 5 years ago

I tried add task to tasks/acmp directory.

AlexeyDmitriev commented 5 years ago

I'll look into it

AlexeyDmitriev commented 5 years ago

OK, I see where the problem is: FileUtils::getDirectory/getFilename work only for one level of directories. I think I'll able to fix this in a week.

AlexeyDmitriev commented 5 years ago

I believe it's fixed in v0.16.1