Skip to content

Fix macOS CI failure by aligning formatting fallback with Eclipse editor preferences#273

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-actions-job
Closed

Fix macOS CI failure by aligning formatting fallback with Eclipse editor preferences#273
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-actions-job

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

build (macos-latest) was failing due to FormatOptionProviderTests expecting editor-derived indentation defaults, while production fallback logic returned hardcoded values for unknown/no-extension files. This change makes fallback behavior preference-driven and updates tests to assert the same source of truth.

  • Problem

    • FormatOptionProvider defaulted to hardcoded space + tabSize=4 when no language-specific formatter was available, diverging from Eclipse editor preference behavior on macOS.
  • Production change

    • In FormatOptionProvider, unknown language and no-extension paths now resolve indentation from org.eclipse.ui.editors preferences:
      • spacesForTabs
      • tabWidth
    • Retains hardcoded defaults only as an error fallback, with exception logging for diagnostics.
  • Test alignment

    • FormatOptionProviderTests now computes expected values from the same Eclipse preference service instead of asserting hardcoded defaults for unknown/no-extension cases.
IPreferencesService service = Platform.getPreferencesService();
boolean useSpaces = service.getBoolean("org.eclipse.ui.editors", "spacesForTabs", true, null);
int tabSize = service.getInt("org.eclipse.ui.editors", "tabWidth", 4, null);
return new FormattingOptions(tabSize, useSpaces);

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build (macos-latest) Fix macOS CI failure by aligning formatting fallback with Eclipse editor preferences Jun 2, 2026
Copilot finished work on behalf of jdneo June 2, 2026 02:07
Copilot AI requested a review from jdneo June 2, 2026 02:07
@jdneo jdneo closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants