Re: CreateClass LocalQuickFix

Hello WarnerJan,

The exception doesn't seem to be directly caused by what you're doing. Is
there a way for us to run IDEA with your plugin and debug the problem>

My XML inspection uses  the following code to create a class that does
not exist:

CreateClassOrPackageFix classOrPackageFix =
CreateClassOrPackageFix.createFix(aPackage.getQualifiedName() + "." +
classname,
GlobalSearchScope.allScope(project),
problemDescriptor.getPsiElement(), aPackage, ClassKind.CLASS,
"org.apache.click.Page", null);
classOrPackageFix.applyFix(project, problemDescriptor);
This actually will create the class, because I can see it being there,
but when I try to SafeDelete it, I run into the following error:

java.lang.AssertionError: Null usages from processor
com.intellij.refactoring.safeDelete.SafeDeleteProcessor@1f6d83b9
at
com.intellij.refactoring.BaseRefactoringProcessor.doRun(BaseRefactorin
gProcessor.java:187)
at
com.intellij.refactoring.BaseRefactoringProcessor.run(BaseRefactoringP
rocessor.java:438)
at
com.intellij.refactoring.safeDelete.SafeDeleteHandler$1.run(SafeDelete
Handler.java:107)
at
com.intellij.refactoring.safeDelete.SafeDeleteDialog.doOKAction(SafeDe
leteDialog.java:129)
at
com.intellij.openapi.ui.DialogWrapper$OkAction.actionPerformed(DialogW
rapper.java:1057)
Does the class or file need some extra treatment after this quickfix?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


1 comment
Comment actions Permalink

I had deleted this post, because this error never happened afterwards anymore, although nothing really changed around this part of my plugin. If I got a reproducible situation, I'll post again.

Thanks for the great support you have here on the forum!

0

Please sign in to leave a comment.