[Bug] Eclipse red border annotations persist for SonarQube issue locations and conflict with Copilot NES delete annotations · Issue #23 · microsoft/copilot-for-eclipse · GitHub
Skip to content

[Bug] Eclipse red border annotations persist for SonarQube issue locations and conflict with Copilot NES delete annotations #23

Closed

Description

Environment

  • OS: Windows 10 / Windows 11 / Linux
  • Eclipse Version: 2025-12 (4.38.0), 2026-03 (4.39.0)
  • GitHub Copilot for Eclipse: affected
  • SonarQube for Eclipse: 11.24.0, 11.25.0, 11.26, 12.1.0

Describe the bug
When GitHub Copilot for Eclipse and SonarQube for Eclipse are installed together, red rectangular borders appear around SonarQube issue locations in the Eclipse editor.

The same SonarQube setup does not show this problem when the Copilot plugin is not installed. The annotation label can be Text to be Deleted, which appears to match GitHub Copilot for Eclipse's Next Edit Suggestions delete annotation.

The red boxes are visually noisy and misleading because they are drawn around SonarQube issue locations. They may also remain visible after the SonarQube quick fix is applied.

To Reproduce

  1. Install SonarQube for Eclipse / SonarQube for IDE.
  2. Install GitHub Copilot for Eclipse.
  3. Open a Java or TypeScript file containing a SonarQube issue.
  4. Observe the red rectangular border around the issue location.
  5. Fix the issue manually or apply the SonarQube quick fix.
  6. Observe that the red border may remain visible.

Example:

import java.util.List;

public class TestSonar {
    boolean isEmpty(List l) {
        return l == null || l.size() == 0;
    }
}

Expected behavior
GitHub Copilot for Eclipse should not draw Text to be Deleted / Next Edit Suggestions annotations over SonarQube issue locations.

Copilot annotations should only appear for active Copilot suggestions and should be cleared when the suggestion is accepted, rejected, or no longer relevant. SonarQube issue decorations should not be affected by the Copilot plugin.

Screenshots
Image

Additional context
This appears to be caused by GitHub Copilot for Eclipse. With SonarQube for Eclipse installed alone, the red-border issue is not reproducible.

The likely source is Copilot's Next Edit Suggestions delete annotation, which is registered with a generic Eclipse text marker and uses boxed text styling.

Relevant Copilot declaration:

<type
    name="com.microsoft.copilot.eclipse.ui.nes.delete"
    markerType="org.eclipse.core.resources.textmarker">
</type>
<specification
    annotationType="com.microsoft.copilot.eclipse.ui.nes.delete"
    label="Text to be Deleted"
    textStylePreferenceValue="BOX">
</specification>

Activity

  1. jdneo commented on Apr 27, 2026

    @jdneo
    Member

    Copilot plugin will not add this square to editors.

    Please update the sonarqube plugin, see: https://github.com/orgs/community/discussions/151288#discussioncomment-15639518

  2. nquinquenel commented on Apr 27, 2026

    @nquinquenel
    Author

    I'm one of the maintainer of SonarQube for Eclipse. We are working on a fix on our side, to explicit register hidden annotation types for all our internal position-tracking textmarker subtypes.

    That said, I'd like to raise a concern about the Copilot side as well. I think that mapping com.microsoft.copilot.eclipse.ui.nes.delete directly to org.eclipse.core.resources.textmarker makes Copilot's NES delete annotation fire for any Eclipse marker that extends the platform root textmarker type and lacks its own annotation registration. SonarQube for Eclipse was affected, but this is a class of bug that will hit other plugins too, as they each discover the conflict. I may be wrong but this is my understanding so far.

    The safer approach on the Copilot side would probably be to have NES delete suggestions create markers under a Copilot-owned subtype of textmarker (e.g. com.microsoft.copilot.eclipse.ui.nes.deleteMarker) and map the annotation type to that subtype rather than to the platform root. That way the rendering is strictly scoped to markers Copilot itself created, and no other plugin can accidentally inherit it. WDYT?

  3. jdneo commented on Apr 27, 2026

    @jdneo
    Member

    Thank you, Nicolas QUINQUENEL (@nquinquenel), for the detailed report and for explaining the SonarQube for Eclipse side of the issue.

    I initially misunderstood the problem—thanks for your patience. We will be working on a fix shortly.

    Thanks again for catching this and for sharing your suggested direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions