Skip to content

[Edge] Improve dialog when WebView2 engine is not available #2035 #2344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class Browser extends Composite {
static final String PACKAGE_PREFIX = "org.eclipse.swt.browser."; //$NON-NLS-1$
static final String PROPERTY_DEFAULTTYPE = "org.eclipse.swt.browser.DefaultType"; //$NON-NLS-1$

static final String WEBIEW_UNAVAILABLE_DISABLED = "org.eclipse.swt.browser.DisableWebViewUnavailableDialog"; //$NON-NLS-1$

/**
* Constructs a new instance of this class given its parent
* and a style value describing its behavior and appearance.
Expand Down Expand Up @@ -144,7 +146,7 @@ private record DialogOption(int index, String message) {};
private static final DialogOption CANCEL_OPTION = new DialogOption(SWT.CANCEL, "Cancel");

private static final String DIALOG_TITLE = "Default browser engine not available";
private static final String DIALOG_MESSAGE = "Microsoft Edge (WebView2) is not available. Do you want to use the legacy Internet Explorer?\n\nNote: It is necessary to reopen browsers for the change to take effect.";
private static final String DIALOG_MESSAGE = "Microsoft Edge (WebView2) is not available. Do you want to use the legacy Internet Explorer?\n\nNote: It is necessary to reopen browsers for the change to take effect and the effect will be lost at next application start. For information on how to permanently switch to Internet Explorer, press the \"Information\" button.";
private static final String FAQ_URL = "https://github.com/eclipse-platform/eclipse.platform/tree/master/docs/FAQ/FAQ_How_do_I_use_Edge-IE_as_the_Browser's_underlying_renderer.md";

private static final int DIALOG_OPTION_FLAGS = USE_IE_OPTION.index | MORE_INFORMATION_OPTION.index | CANCEL_OPTION.index;
Expand All @@ -156,7 +158,8 @@ private record DialogOption(int index, String message) {};
private static boolean shownOnce;

static void showAsync(Shell parentShell) {
if (shownOnce) {
if (shownOnce || Boolean.getBoolean(WEBIEW_UNAVAILABLE_DISABLED)) {
shownOnce = true;
return;
}
shownOnce = true;
Expand Down
Loading