-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Classpath changed sends too many microprofile/propertiesChanged notifications #235
Conversation
Before testing the PR, I suggest you that you see the problem in master. test 1 : space in pom.xml
In the LanguageSupport for Java Terminal, you will see that there will have 6 With the PR, you should see that there are no events. test 2 : add dependency in pom.xml
In the LanguageSupport for Java Terminal, you will see that there will have 7 With the PR, you should see that there are just one event with 1,2 type. test3 : change sourcesTo test this PR, you must change java sources file and save it, and check properties are recomputed correctly. Please note test are not working, I must find a solution for that otherwise I will disable it. |
Both test1 and test2 work great on my machine. For test3, with the For example, in Although this does not always happen, I find this issue easy to reproduce on my machine. |
@xorye I cannot reproduce it -( |
@angelozerr I'm not sure if it will help but here's a gif of the issue: If I understand correctly, every time I edit and save the GreetingResource file, I should see a new When I first edit and save the file, I do get "1 of 1" from the server trace search results as expected, but when I edit and save a second time, I still get "1 of 1" instead of "1 of 2". Going back into the application.properties file, I do not get completion for the new config. |
@snjeza if you have time, could you help me with this PR? The main idea of this PR is to improve the track of Java sources files. In master I track that with resources changed listener. It causes some trouble (too many events are fired, for instance if I have 5 java files in my project and I update pom.xml it fires 5 events although java files are not updated) so I tried to improve that by using JDT Element listener in https://github.com/redhat-developer/quarkus-ls/pull/235/files#diff-621737e98587a1a0febac12c446e4438R105 Is it a proper mean to do that? It works with my Windows OS but it doesn't worksometimes on Linux OS #235 (comment) My second question is about tests. My tests fails every time the first time. The test track the JDT element events, but as it is done asynchronously, it's hard for the test to catch the proper event when test is executed. Here the tests Line 87 in 21e2bed
Any feedback are welcome to fix those 2 problems, thanks! |
Ignore test by waiting a fix #235 Signed-off-by: azerr <azerr@redhat.com>
Ignore test by waiting a fix #235 Signed-off-by: azerr <azerr@redhat.com>
@angelozerr I think, you have to explore delta.getKind() and delta.getFlags() as the following:
|
@angelozerr you can try the following patch:
|
@snjeza I see the ideas, thanks a lot! I will try it. |
notifications Fixes redhat-developer#206 Signed-off-by: azerr <azerr@redhat.com>
I close this PR for #293 |
Classpath changed sends too many microprofile/propertiesChanged notifications
Fixes #206
Signed-off-by: azerr azerr@redhat.com