Add toString() to Browser showing the underlying browser type#3259
Open
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
Open
Add toString() to Browser showing the underlying browser type#3259vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
Override Browser.toString() to append the active browser backend (e.g. "webkit", "edge", "ie", "safari") returned by getBrowserType(). This makes it easy to see in the debugger or in logs which native browser implementation a Browser instance is using, without having to drill into the internal webBrowser field. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Test Results 181 files - 1 181 suites - 1 27m 26s ⏱️ -18s For more details on these failures and errors, see this check. Results for commit 2ec0b30. ± Comparison against base commit f03d65d. This pull request removes 57 tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Browser.toString()to append the active browser backend (e.g.webkit,edge,ie,safari) returned bygetBrowserType().Browserinstance is using, both in the debugger and in log output, without having to drill into the internalwebBrowserfield.webBrowser.getBrowserType()directly (with a null guard) instead of the publicgetBrowserType()method, because the public method callscheckWidget()whichtoString()is not expected to trigger (e.g. when called on a disposed widget or from a non-UI thread, mirroringWidget.toString()behavior).Test plan
Browserand inspect/print it; the result should look likeBrowser {} [webkit](or the corresponding backend on Windows/macOS).Browserand confirmtoString()does not throw.🤖 Generated with Claude Code