You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To specify that a Chromium renderer be used by a Browser instance, create it with style `SWT.CHROMIUM` (since 4.17) or set the Java property `org.eclipse.swt.browser.DefaultType=chromium`.
2
+
3
+
You can get the SWT-Chromium libraries from the Eclipse SDK or from the standalone SWT Chromium support libraries section on the download page.
4
+
5
+
To use the Chromium libraries from the Eclipse SDK:
6
+
7
+
* Install the CEF binaries in Eclipse from the p2 repo - [CEF p2 repo from Make technology](https://dl.equo.dev/chromium-swt-ce/oss/p2)
8
+
* Add the required jars to classpath of project:
9
+
* SWT-Chromium fragment (`org.eclipse.swt.browser.chromium.<ws>.<os>.<arch>.jar`)
10
+
* SWT fragment (`org.eclipse.swt.<ws>.<os>.<arch>.jar`)
*[CEF Mac binaries](https://dl.equo.dev/chromium-swt-ce/oss/mvn/com/equo/com.equo.chromium.cef.cocoa.macosx.x86_64/128.0.0/com.equo.chromium.cef.cocoa.macosx.x86_64-128.0.0.jar)
18
+
*[CEF Windows binaries](https://dl.equo.dev/chromium-swt-ce/oss/mvn/com/equo/com.equo.chromium.cef.win32.win32.x86_64/128.0.0/com.equo.chromium.cef.win32.win32.x86_64-128.0.0.jar)
19
+
* Add the required jars to classpath of project:
20
+
* SWT-Chromium standalone jar (`swt-chromium.jar`)
To specify that an Edge renderer be used by a Browser instance, create it with style `SWT.EDGE` (since 4.19) or set the Java property `org.eclipse.swt.browser.DefaultType=edge`.
2
+
3
+
Edge rendering back-end uses the WebView2 component, which is based on, but distinct from the Edge browser itself. WebView2 has to be installed separately from one of the following sources:
4
+
5
+
* A stand-alone runtime installer, either web or offline ([Download the WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#webview-title) from Microsoft).
6
+
This runtime will be shared between all applications on the machine and will auto-update itself independent of your application.
7
+
* A fixed-version archive with all the necessary files (Same link as above).
8
+
This is a complete, fixed set of files to be included with your application. Unlike the first option, you have complete freedom in bundling, packaging and updating it.
9
+
* Beta, Dev, or Canary version of the Edge browser (<https://www.microsoftedgeinsider.com/en-us/download>).
10
+
This option is convenient for testing, but production deployments should use the previous two options.
11
+
12
+
_Note: Stable Edge browser installations don't provide a WebView2 component._
13
+
14
+
See also [Distribution of apps using WebView2](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution) on MSDN.
15
+
16
+
SWT will automatically locate installed browsers and runtimes. In case you want to use fixed-version binaries or override the automatically chosen version, set the `org.eclipse.swt.browser.EdgeDir` Java property to the directory containing `msedgewebview2.exe`. For example:
WebView2 creates a user data directory to stores caches and persistent data like cookies and local storage. All WebView2 instances in an application and all instances of the same application share this directory.
23
+
24
+
The default user-directory location is `%LOCALAPPDATA%\<AppName>\WebView2`, where `<AppName>` is defined with `Display.setAppName()`. This location can be overridden on a per-process basis by setting the `org.eclipse.swt.browser.EdgeDataDir` Java property.
The default native renderers that are used for `SWT.NONE`-style Browsers are listed in [Which platforms support the SWT Browser, and which native renderers do they use?](./FAQ-Which-platforms-support-the-SWT-Browser,-and-which-native-renderers-are-available). Default is chosen to not require additional software installation and to preserve backward-compativle behavior.
2
+
3
+
A user can set a property to specify the type of native renderer to use for `SWT.NONE`-style Browsers. Setting this property does not affect Browsers that are created with explicit renderer styles such as `SWT.WEBKIT` or `SWT.CHROMIUM`. The property name is `org.eclipse.swt.browser.DefaultType` and valid values for it currently include `webkit`, `ie` (since 4.3), `chromium` (since 4.17) and `edge` (since 4.19). This property must be set before the first `Browser` instance is created.
4
+
5
+
_Note: As of Eclipse/SWT 4.8, Mozilla (`XULRunner`) renderer is no longer supported, the value `mozilla` has no effect._
6
+
7
+
A user can specify a comma-separated list of native renderers, in order of preference, for the `org.eclipse.swt.browser.DefaultType` value. Values not applicable to a particular platform are ignored. For example, the value of `edge,chromium` will change the default to Edge on Windows and Chromium on other platforms.
8
+
9
+
The best opportunity for a user to set this property is by launching their application with a `-D` VM switch (e.g., add to the end of the `eclipse.ini` file: `-Dorg.eclipse.swt.browser.DefaultType=chromium`).
10
+
11
+
An alternate approach that an Eclipse application may use is to provide a `BrowserInitializer` implementation that sets this property. This implementation will be invoked when the first Browser instance is about to be created. The steps to do so are:
12
+
13
+
* Create a fragment with host plug-in `org.eclipse.swt`.
14
+
* In this fragment, create class `org.eclipse.swt.browser.BrowserInitializer`.
15
+
* Implement a static initializer in this class that sets the `org.eclipse.swt.browser.DefaultType` property.
| Edge (Chromium-based) | Windows |`SWT.EDGE`| No |
8
+
| Chromium | All |`SWT.CHROMIUM`| No |
9
+
10
+
_Note: As of Eclipse/SWT 4.8, Mozilla (`XULRunner`) renderer is no longer supported, `SWT.MOZILLA` flag is deprecated and has no effect._
11
+
12
+
Browser instances created with style `SWT.NONE` will use the default platform renderer according to the table above. The default renderer does not require additional software installation. It is possible to override the default native renderer. See [How do I specify the default type of native renderer that is used by the Browser](./FAQ-How-do-I-specify-the-default-type-of-native-renderer-that-is-used-by-the-Browser).
13
+
14
+
For additional information on specific renderers, see [How do I explicitly use Chromium as the Browser's underlying renderer](FAQ-How-do-I-explicitly-use-Chromium-as-the-Browser's-underlying-renderer) and [How do I explicitly use Edge as the Browser's underlying renderer](./FAQ-How-do-I-explicitly-use-Edge-as-the-Browser's-underlying-renderer).
-[Perspectives and Views](#perspectives-and-views)
25
+
-[Generic Editors](#generic-editors)
26
+
-[Actions, Commands, and Activities](#actions-commands-and-activities)
27
+
-[Building Your Own Application](#building-your-own-application)
28
+
-[Productizing an Eclipse Offering](#productizing-an-eclipse-offering)
29
+
-[Part III -- The Eclipse IDE Platform](#part-iii----the-eclipse-ide-platform)
30
+
-[Text Editors](#text-editors)
31
+
-[Help, Search, and Compare](#help-search-and-compare)
32
+
-[Workspace and Resources API](#workspace-and-resources-api)
33
+
-[Workbench IDE](#workbench-ide)
34
+
-[Implementing Support for Your Own Language](#implementing-support-for-your-own-language)
35
+
-[The language already has parsers, compilers, and other services](#the-language-already-has-parsers-compilers-and-other-services)
36
+
-[This is a DSL of your own](#this-is-a-dsl-of-your-own)
37
+
-[Legacy](#legacy)
38
+
-[Java Development Tool API](#java-development-tool-api)
39
+
-[Acknowledgement](#acknowledgement)
38
40
39
41
Part I -- The Eclipse Ecosystem
40
42
-------------------------------
@@ -196,8 +198,6 @@ Part I discussed the Eclipse ecosystem: how to run it, how to use it, and how to
196
198
*[FAQ How do I make my plug-in dynamic enabled?](./FAQ_How_do_I_make_my_plug-in_dynamic_enabled.md"FAQ How do I make my plug-in dynamic enabled?")
197
199
*[FAQ How do I make my plug-in dynamic aware?](./FAQ_How_do_I_make_my_plug-in_dynamic_aware.md"FAQ How do I make my plug-in dynamic aware?")
198
200
199
-
200
-
201
201
### Runtime Facilities
202
202
203
203
Above, we already discussed most of the basic functionality of the org.eclipse.core.runtime plug-in. This chapter covers the remaining facilities of Eclipse Platform runtime: APIs for logging, tracing, storing preferences, and other such core functionality. These various services, although not strictly needed by all plug-ins, are common enough that they merit being located directly alongside the Eclipse kernel. In Eclipse 3.0, this plug-in was expanded to add infrastructure for running and managing background operations. This chapter answers some of the questions that may arise when you start to use this new concurrency infrastructure.
@@ -216,6 +216,12 @@ Above, we already discussed most of the basic functionality of the org.eclipse.c
216
216
*[FAQ How do I find out whether a particular job is running?](./FAQ_How_do_I_find_out_whether_a_particular_job_is_running.md"FAQ How do I find out whether a particular job is running?")
217
217
*[FAQ How can I track the lifecycle of jobs?](./FAQ_How_can_I_track_the_lifecycle_of_jobs.md"FAQ How can I track the lifecycle of jobs?")
218
218
*[FAQ How do I create a repeating background task?](./FAQ_How_do_I_create_a_repeating_background_task.md"FAQ How do I create a repeating background task?")
219
+
*[FAQ How do I explicitly use Chromium as the Browser's underlying renderer?](./FAQ-How-do-I-explicitly-use-Chromium-as-the-Browser's-underlying-renderer.md"FAQ How do I explicitly use Chromium as the Browser's underlying renderer?")
220
+
*[FAQ How do I explicitly use Edge as the Browser's underlying renderer?](./FAQ-How-do-I-explicitly-use-Edge-as-the-Browser's-underlying-renderer.md"FAQ How do I explicitly use Edge as the Browser's underlying renderer?")
221
+
*[FAQ How do I specify the default type of native renderer that is used by the Browser?](./FAQ-How-do-I-specify-the-default-type-of-native-renderer-that-is-used-by-the-Browser.md"FAQ How do I specify the default type of native renderer that is used by the Browser?")
222
+
*[FAQ Which GTK version do I need to run SWT?](./FAQ-Which-GTK-version-do-I-need-to-run-SWT.md"FAQ Which GTK version do I need to run SWT?")
223
+
*[FAQ Which platforms support the SWT Browser, and which native renderers are available?](./FAQ-Which-platforms-support-the-SWT-Browser,-and-which-native-renderers-are-available.md"FAQ Which platforms support the SWT Browser, and which native renderers are available?")
0 commit comments