When Autobuilding is disabled, SonarQube for Eclipse shows a popup informing the user that results may be inaccurate.
However, if multiple build commands are issued at the same time, it occasionally happens that this popup is shown multiple times (I could not find a reliable reproduction for this, but this problem might occur when switching branches / pulling in new commits via the Eclipse Git integration).
Looking into the code shows that the cause of this problem happens in NoAutomaticBuildWarningPopup.displayPopupIfNotIgnored():
Checking PopupUtils.popupCurrentlyDisplayed(Class<? extends AbstractNotificationPopup>) should guard against this popup being shown multiple times.
However, this method is not checked again by the time the asynchronously scheduled runnable is actually executed, which leads to the described problem (This can also be reproduced by calling NoAutomaticBuildWarningPopup.displayPopupIfNotIgnored() in a loop repeatedly).
I’ve proposed a solution for this in Added asyncExec guard for autobuild disabled popup by r-mennig · Pull Request #1098 · SonarSource/sonarlint-eclipse · GitHub which re-checks the isAutoBuilding(), popupCurrentlyDisplayed(...) and noAutomaticBuildWarning() inside the async runnable.
- Operating system: Windows
- IDE name and version: Eclipse 4.40
- SonarQube for Eclipse plugin version: 12.6.0.84813
- Programming language you’re coding in: Java
- Is connected mode used: Yes
- SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?): SonarQube Community Build

