Skip to content

test: add unit test suite for AutoComplete module - #126

Merged
bobbylight merged 1 commit into
masterfrom
add-test-coverage-and-uimanager-style-context
Aug 26, 2026
Merged

test: add unit test suite for AutoComplete module#126
bobbylight merged 1 commit into
masterfrom
add-test-coverage-and-uimanager-style-context

Conversation

@bobbylight

Copy link
Copy Markdown
Owner

Summary

Adds a JUnit 5 unit test suite covering most of the org.fife.ui.autocomplete package, and makes AutoCompletionStyleContext's colors overridable via UIManager keys so LookAndFeels/apps can theme them without subclassing.

Details

  • New test classes for completions (BasicCompletion, FunctionCompletion, VariableCompletion, TemplateCompletion, MarkupTagCompletion, ShorthandCompletion), providers (DefaultCompletionProvider, LanguageAwareCompletionProvider), renderers (CompletionCellRenderer, DelegatingCellRenderer), RoundRobinAutoCompletion, XML parsing (CompletionXMLParser), and several smaller UI helper classes (SizeGrip, FastListUI, TipUtil, EmptyIcon, OutlineHighlightPainter, CompletionListModel, AutoCompletionEvent).
  • AutoCompletionStyleContext now exposes public UIManager key constants (PROPERTY_PARAMETER_OUTLINE_COLOR, PROPERTY_PARAMETER_COPY_COLOR, PROPERTY_PARAMETERIZED_COMPLETION_CURSOR_POSITION_COLOR) and reads from UIManager first, falling back to the existing hardcoded defaults (cached back into UIManager as ColorUIResource, matching the existing autocomplete.descWindow.* icon-key convention).
  • SizeGrip's OS-X detection and resource-loading logic was simplified (uses OS.get() instead of parsing os.name, drops a dead file-system fallback path) to make it unit-testable.

Test plan

  • ./gradlew clean build passes locally (checkstyle, spotbugs, and the full test suite).

🤖 Generated with Claude Code

@bobbylight
bobbylight force-pushed the add-test-coverage-and-uimanager-style-context branch 4 times, most recently from 5ff5929 to b245228 Compare August 25, 2026 03:27
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@bobbylight bobbylight self-assigned this Aug 25, 2026
@bobbylight
bobbylight force-pushed the add-test-coverage-and-uimanager-style-context branch from b245228 to 7df9c76 Compare August 26, 2026 01:30
@bobbylight
bobbylight marked this pull request as ready for review August 26, 2026 01:33
@bobbylight
bobbylight force-pushed the add-test-coverage-and-uimanager-style-context branch 2 times, most recently from 2ecdc23 to f385de8 Compare August 26, 2026 02:28
Adds JUnit 5 test coverage across the autocomplete package (completions,
providers, renderers, XML parsing, UI helpers), makes AutoCompletionStyleContext
colors overridable via UIManager keys with cached fallbacks, and simplifies
SizeGrip's OS-X detection/resource-loading logic to be testable.

Co-Authored-By: Claude <noreply@anthropic.com>
@bobbylight
bobbylight force-pushed the add-test-coverage-and-uimanager-style-context branch from f385de8 to e9df271 Compare August 26, 2026 02:36
@bobbylight
bobbylight merged commit c7d0f2a into master Aug 26, 2026
4 checks passed
@bobbylight bobbylight added this to the 4.0.0 milestone Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants