redhat-developer / quarkus-ls

Language server for Quarkus tooling
Eclipse Public License 2.0
44 stars 15 forks source link

Deleteing a Java file from the project doesn't refresh Qute validation #833

Open datho7561 opened 1 year ago

datho7561 commented 1 year ago

To reproduce the issue:

  1. Create a template extensions file that defines a template extension for java.lang.String called sandwich()

eg.

@io.quarkus.qute.TemplateExtension
public class TemplateExtensions {
    public static String sandwich(String str) {
        return str + "!";
    }
}
  1. Create the following template in the templates folder:
{@String myString}

{myString.sandwich}
  1. Delete the file that declares the template extension

Expected: the qute template validation refreshes, and {myString.sandwich} is marked as invalid

Actual: {myString.sandwich} is still marked as valid, and doesn't update until you modify one of the Java files.

angelozerr commented 1 year ago

I suspect the problem come from JDT side at https://github.com/redhat-developer/quarkus-ls/blob/79fe7b977bc4c72a38e9c65fc8b3cf2a7a4d3300/qute.jdt/com.redhat.qute.jdt/src/main/java/com/redhat/qute/jdt/internal/JavaDataModelListenerManager.java#L76 which throws the notification to the Qute LS.

We need to debug it