DomFileDescription and CGILib proxy
Ha all,
I managed to create dom model ( almost automatcically ) and dom file description finds and recognizes my file type - how ever,
it borks on CCE:
Caused by: java.lang.ClassCastException: xxxxxxx.Module$$EnhancerByCGLIB$$dcc27d5 cannot be cast to com.intellij.util.xml.DomElement
at com.intellij.util.xml.impl.DomInvocationHandler.<init>(DomInvocationHandler.java:107)
at com.intellij.util.xml.impl.DomRootInvocationHandler.<init>(DomRootInvocationHandler.java:35)
at com.intellij.util.xml.impl.DomFileElementImpl.<init>(DomFileElementImpl.java:128)
at com.intellij.util.xml.impl.FileDescriptionCachedValueProvider.a(FileDescriptionCachedValueProvider.java:128)
at com.intellij.util.xml.impl.FileDescriptionCachedValueProvider.getFileElement(FileDescriptionCachedValueProvider.java:67)
at com.intellij.util.xml.impl.DomManagerImpl.getFileElement(DomManagerImpl.java:359)
at com.intellij.util.xml.impl.DomManagerImpl.getFileElement(DomManagerImpl.java:58)
at com.intellij.util.xml.DomManager.getDomFileDescription(DomManager.java:171)
at com.intellij.util.xml.DomFileIconProvider.getIcon(DomFileIconProvider.java:33)
at com.intellij.util.PsiIconUtil.getProvidersIcon(PsiIconUtil.java:41)
at com.intellij.psi.impl.ElementBase.computeIconNow(ElementBase.java:133)
at com.intellij.psi.impl.ElementBase.access$000(ElementBase.java:53)
at com.intellij.psi.impl.ElementBase$1.fun(ElementBase.java:63)
at com.intellij.psi.impl.ElementBase$1.fun(ElementBase.java:57)
at com.intellij.ui.DeferredIconImpl$1$1.run(DeferredIconImpl.java:93)
at com.intellij.ui.IconDeferrerImpl.evaluateDeferred(IconDeferrerImpl.java:100)
at com.intellij.ui.DeferredIconImpl$1$2.run(DeferredIconImpl.java:108)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1182)
at com.intellij.ui.DeferredIconImpl$1.run(DeferredIconImpl.java:105)
at com.intellij.concurrency.JobLauncherImpl$3.call(JobLauncherImpl.java:145)
at com.intellij.concurrency.JobLauncherImpl$3.call(JobLauncherImpl.java:142)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
Module is my root Tag and was generated (almost) automatically by idea internal tools::
package xxxxxxxx;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.GenericAttributeValue;
import com.intellij.util.xml.Namespace;
import com.intellij.util.xml.Stubbed;
import com.kosmosbanking.apdl.idea.ApdlConstants;
import org.jetbrains.annotations.NotNull;
/**
*
* @author Konstantin Pribluda
*/
@Namespace(ApdlConstants.EBIMODULE_NAMESPACE)
@Stubbed
public interface Module extends DomElement {
/**
* Returns the value of the name child.
* @return the value of the name child.
*/
@NotNull
GenericAttributeValue<String> getName();
}
Struts2 plugin seems to work without.
Please sign in to leave a comment.
Please try removing @Stubbed to see if it works (you must provide corresponding values in your DomFileDescription otherwise).
Does not help:
Exception happens while indexing,
PS: I tried stubbed as sinspiration from your code in first place.
Is there posibilty that this comes as some weird classpath issue while starting plugin in IDE?
Please try File|Invalidate Caches in your sandbox installation. Did you maybe compile your plugin against a different version of IntelliJ IDEA SDK than you're using to run the sandbox? If this doesn't help, could you provide ZIP of your plugin's sources?
Solved this issue. Cause was class com.intellij.util.xml.DomElement which was in my sources -
it seems that it was created by idea XSLT processing to generate Dom-Model. No it works perfectly