Skip to content

Eclipse shows unexpected compile errors in org.eclipse.jface.text.tests #4405

Open

Description

@trancexpress

See:

errors.txt

E.g.:

Duplicate local variable _	IOConsoleTests.java	/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console	line 331	Java Problem
'_' is a keyword from source level 9 onwards, cannot be used as identifier	AnnotationRulerColumnTest.java	/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source	line 56	Java Problem

I'm not sure what is wrong, project JLS and classpath JRE is 25, my default JRE is 25, default JLS in my workspace is 17.

I see this with:

Eclipse SDK
Version: 2026-12 (4.42)
Build id: I20260925-2300

And latest master in platform UI.

Activity

  1. changed the title [-]Unexpected compile errors in org.eclipse.jface.text.tests[/-] [+]Eclipse shows unexpected compile errors in org.eclipse.jface.text.tests[/+] on Sep 26, 2026
  2. trancexpress commented on Sep 26, 2026

    @trancexpress
    ContributorAuthor

    At least some of this is coming from: 068bf82

    #4397

  3. trancexpress commented on Oct 9, 2026

    @trancexpress
    ContributorAuthor

    I don't see this anymore.

  4. trancexpress commented on Oct 9, 2026

    @trancexpress
    ContributorAuthor

    I do see the same in JDT UI now, so maybe some compiler bug:

    Description	Resource	Location	Path	Type
    '_' is a keyword from source level 9 onwards, cannot be used as identifier	ExternalizeStringsAction.java	line 477	/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions	Java Problem
    
  5. iloveeclipse commented on Oct 9, 2026

    @iloveeclipse
    Member

    Please check project settings. This error can't be reported if project is properly configured to use Java 25, which jdt.ui does. Probably you changed some settings locally or configured JDK doesn't match JRE 25 environment for some reason.

  6. trancexpress commented on Oct 9, 2026

    @trancexpress
    ContributorAuthor

    I've not touched settings in my workspace for months, the JDK installation is the same aside from package updates.

  7. iloveeclipse commented on Oct 10, 2026

    @iloveeclipse
    Member

    I've just observed same in my old workspace updated to latest code. The solution for me was simply to restart IDE and clean build. After that all the errors disappeared. I assume there is a cache somewhere in JDT which doesn't update if the project compilation settings are changed under the hood.

  8. merks commented on Oct 10, 2026

    @merks
    Contributor

    Yes, my past experience indicates that underlying changes to the *.prefs files are not noticed and are not taken into account. Indeed restarting and doing a clean build appears to help.

    Actually you can try to confirm this by editing the *.prefs file and saving it. One would hope that takes effect, but I think it does not. I think the preference dialog does something more than what happens when the file contents change because of a pull or an edit.

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