Skip to content

Add SourceViewer#computeStyleRanges() to highlight external documents#3868

Open
tobiasmelcher wants to merge 1 commit intoeclipse-platform:masterfrom
tobiasmelcher:computeStyleRanges
Open

Add SourceViewer#computeStyleRanges() to highlight external documents#3868
tobiasmelcher wants to merge 1 commit intoeclipse-platform:masterfrom
tobiasmelcher:computeStyleRanges

Conversation

@tobiasmelcher
Copy link
Copy Markdown
Contributor

Introduces computeStyleRanges(IDocument, IRegion) on SourceViewer, which applies the viewer's own presentation reconciler and partitioner to an external document, returning the resulting SWT StyleRanges for the given region without affecting the viewer's current document.
This method will be used by the unified diff implementation to calculate the syntax coloring for the parts rendered inside the code mining which are not part of the original editor document (see eclipse-platform/eclipse.platform#2560).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

Test Results

   852 files  ±0     852 suites  ±0   53m 59s ⏱️ - 9m 47s
 7 894 tests ±0   7 651 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 184 runs  ±0  19 529 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit 0afb18c. ± Comparison against base commit a7e91a0.

♻️ This comment has been updated with latest results.

@tobiasmelcher
Copy link
Copy Markdown
Contributor Author

test error org.eclipse.e4.ui.tests.workbench.PartRenderingEngineTests#ensureCleanUpAddonCleansUp not related to this change (#3581)

Introduces computeStyleRanges(IDocument, IRegion) on SourceViewer,
which applies the viewer's own presentation reconciler and partitioner
to an external document, returning the resulting SWT StyleRanges for
the given region without affecting the viewer's current document.
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