Exception applying intention if read-only

I keep running into a problem where, if the file is read-only and I try
to apply an intention, the plug-in goes kablooie. I'm using CVS and the
file is read-only because it is committed.

Exception 266897:

Cannot modify a read-only file
'/Users/dmclean/IdeaProjects/dsb/dads/onegui_webapp/efl/src/edu/stsci/efl/remote/RemoteServiceFeature.scala'.:
Cannot modify a read-only file
'/Users/dmclean/IdeaProjects/dsb/dads/onegui_webapp/efl/src/edu/stsci/efl/remote/RemoteServiceFeature.scala'.
com.intellij.util.IncorrectOperationException: Cannot modify a read-only
file
'/Users/dmclean/IdeaProjects/dsb/dads/onegui_webapp/efl/src/edu/stsci/efl/remote/RemoteServiceFeature.scala'.
     at com.intellij.psi.impl.CheckUtil.checkWritable(CheckUtil.java:44)
     at
com.intellij.extapi.psi.ASTDelegatePsiElement.deleteChildRange(ASTDelegatePsiElement.java:326)
     at
org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunction$class.removeExplicitType(ScFunction.scala:183)
     at
org.jetbrains.plugins.scala.lang.psi.impl.statements.ScFunctionImpl.removeExplicitType(ScFunctionImpl.scala:35)
     at
org.jetbrains.plugins.scala.codeInspection.methodSignature.quickfix.RemoveTypeAnnotation.applyFix(RemoveTypeAnnotation.scala:17)
     at
org.jetbrains.plugins.scala.codeInspection.methodSignature.quickfix.RemoveTypeAnnotation.applyFix(RemoveTypeAnnotation.scala:11)
     at
com.intellij.codeInspection.ex.QuickFixWrapper.invoke(QuickFixWrapper.java:81)
     at
com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler$2.run(ShowIntentionActionsHandler.java:151)
     at
com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:844)
     at
com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler$3.run(ShowIntentionActionsHandler.java:164)
     at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:115)
     at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:91)
     at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:79)
     at
com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:169)
     at
com.intellij.codeInsight.intention.impl.IntentionListStep$2$1.run(IntentionListStep.java:227)
     at
com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
     at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:658)
     at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:511)
     at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:410)
     at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
     at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
     at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
     at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

0

请先登录再写评论。