Plugin no longer working after upgrade to 2019.3

Answered

Is there anywhere to view change notes for the Plugin API between versions?

In particular, we were using com.intellij.ide.plugins.PluginManager to get the current version of the plugin being used, which appears to have been removed, hence the plugin no longer compiles. Update: have found PluginManagerCore, which seems to provide the same functionality - EL resolution still broken though.

My major that I'm seeing (which led me to discover the above, I (was) hoping they were linked) is that I recently implemented custom EL variables in my plugin (per https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006660119-Custom-EL-variable-marked-as-unresolved-in-Ultimate-despite-PsiReferenceContributor), and those are no longer working. 

Update:

Having gotten the plugin compiling again as per above, it seems that my ElVariablesProvider is not being called - it's currently being registered as per below, has this changed?

<javaee.jsp.elImplicitVariablesProvider implementation="com.packagename.ELProvider"/>

With dependencies on:

<depends>com.intellij.jsp</depends>
<depends>com.intellij.javaee</depends>

Any ideas?

 

7 comments
Comment actions Permalink

com.intellij.ide.plugins.PluginManager is available in 2019.3. Please list the full code causing problems.

I don't see any changes related to elImplicitVariablesProvider. Please double-check your IntelliJ SDK setup.

 

0
Comment actions Permalink

Hey - reconfigured everything to make sure the SDK was correct, everything seems fine. There's not much more code than that, a breakpoint on the first line is never hit (as it was previously).

 

public class FaceCaseELProvider extends ElVariablesProvider
{
/**
* Check if the EL in question matches to a bean, look up the class and register it as a reference.
* @param psiElement the current element
* @param elExpressionHolder the expression holder - not used
* @param elElementProcessor the element processor - needed to actually register the reference
* @return true if we successfully the element to a bean
*/
@Override
public boolean processImplicitVariables(@NotNull PsiElement psiElement, @NotNull ELExpressionHolder elExpressionHolder, @NotNull ELElementProcessor elElementProcessor)
{
String faceCasePath = FaceCaseConfig.findPath(psiElement);

try
{

The plugin is running on ~80 developer's machines, and it stopped working on each machine after the upgrade (without any changes to code), so it does seem that it's related to the upgrade. All the other features of the plugin are still working.

0
Comment actions Permalink

I've had the time to delve deeper - it seems that the list of providers in `com.intellij.psi.impl.source.jsp.el.impl.ELResolveUtil#processEmptyContext` is the following, where my provider is number 4:

    0 = {JsfElVariablesProvider@37478} 
    1 = {SpringSecurityELVariablesProvider@37484}
    2 = {SpringMvcElVariablesProvider@37485}
    3 = {WebflowElVariablesProvider@37486}
    4 = {FaceCaseELProvider@37472}
    5 = {JspElVariablesProvider@37487}

However, the SpringMvcElVariablesProvider is returning true from its processImplicitVariables call, even though it does not recognize the variable, meaning that my provider is never called.

Is there a way to avoid this behaviour?

0
Comment actions Permalink

I've managed work around this issue and get my plugin working by setting order="first" in the extension point. Still curious as to why this happened.

0
Comment actions Permalink

> SpringMvcElVariablesProvider is returning true from its processImplicitVariables call, even though it does not recognize the variable, meaning that my provider is never called.

`true` means "contunue", did you mean `false`? Yes it could be a wrong behavior of the `SpringMvcElVariablesProvider`. Is there a way we could debug it with your plugin?

0
Comment actions Permalink

Yes, sorry, I did mean false. My plugin needs quite a lot of additional plumbing around it, but you could probably simulate the behaviour by adding a non-existent variable, stepping through the loop that calls processImplicitVariable, and confirming that it doesn't progress further the `SpringMvcElVariablesProvider` provider.

0
Comment actions Permalink

Ok, thank you. Most probably it is a bug - I've created an issue about it IDEA-231615

0

Please sign in to leave a comment.