History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-5965
Type: Exception Exception
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Bas Leijdekkers
Reporter: Exception Analyzer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

[#1573] PIEAE: LeafPsiElement.getContainingFile

Created: 15 May 06 17:22   Updated: 15 May 06 19:30
Component/s: None
Fix Version/s: Demetra 5281

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 5,261
Fixed in build: 5,276


 Description  « Hide
exception://1573/
Last updated by unknown
User description: The error could be reproduced this way:
package some.test.pack;
public class test {
/* public test() {

}*/
}
Code analyzer suggests to "Replace with end-of-line comment" (on line where comment starts)
If check to replace it produces following code:
package some.test.pack;
public class test {
/* public test() {

}*///}
}
end this error occurs.
Error message: No message
com.intellij.psi.PsiInvalidElementAccessException
at com.intellij.psi.impl.source.tree.LeafPsiElement.getContainingFile(LeafPsiElement.java:59)
at com.intellij.psi.impl.source.codeStyle.CodeEditUtil.saveWhitespacesInfo(CodeEditUtil.java:97)
at com.intellij.psi.impl.source.tree.ChangeUtil.saveIndentationToCopy(ChangeUtil.java:427)
at com.intellij.psi.impl.source.tree.ChangeUtil.copyElement(ChangeUtil.java:420)
at com.intellij.psi.impl.source.tree.TreeElement.copyElement(TreeElement.java:34)
at com.intellij.psi.impl.source.tree.LeafPsiElement.copy(LeafPsiElement.java:72)
at com.siyeh.ipp.comment.ChangeToEndOfLineCommentIntention.processIntention(ChangeToEndOfLineCommentIntention.java:55)
at com.siyeh.ipp.base.Intention.invoke(Intention.java:53)
at com.intellij.codeInsight.intention.impl.IntentionHintComponent$5$1$1.run(IntentionHintComponent.java:479)
at com.intellij.openapi.application.impl.ApplicationImpl$9.compute(ApplicationImpl.java:685)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.postponeFormattingInside(PostprocessReformattingAspect.java:88)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:683)
at com.intellij.codeInsight.intention.impl.IntentionHintComponent$5$1$2.run(IntentionHintComponent.java:492)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:98)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:78)
at com.intellij.codeInsight.intention.impl.IntentionHintComponent$5$1.run(IntentionHintComponent.java:497)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:216)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:374)
at com.intellij.ide.IdeEventQueue.<unknown>(IdeEventQueue.java:365)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:274)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)



 All   Comments   Work Log   Change History      Sort Order:
Bas Leijdekkers - 15 May 06 19:30
I'm pretty sure this is a bug in the PSI api, but I've managed to work around it.