From d10ae885382f59ef6af8a71d7f5a843dc5bc8cfc Mon Sep 17 00:00:00 2001 From: Titouan Vervack Date: Thu, 6 Feb 2025 10:30:42 +0100 Subject: [PATCH] Add new SWT FAQ pages and some cleanup * Cleanup fenced code blocks * Some small markdown cleanup --- ..._SWT_outside_Eclipse_for_my_own_project.md | 10 ++- .../FAQ_How_do_I_display_a_Web_page_in_SWT.md | 55 ++++++++-------- ...How_do_I_embed_AWT_and_Swing_inside_SWT.md | 4 +- ...um_as_the_Browser's_underlying_renderer.md | 30 +++++++++ ...ge_as_the_Browser's_underlying_renderer.md | 27 ++++++++ ...ve_renderer_that_is_used_by_the_Browser.md | 18 ++++++ docs/FAQ/FAQ_What_is_Ant.md | 2 - ...here_can_I_find_more_information_on_SWT.md | 49 +++++++------- ..._Which_GTK_version_do_I_need_to_run_SWT.md | 24 +++++++ ...nd_which_native_renderers_are_available.md | 17 +++++ docs/FAQ/FAQ_Why_does_Eclipse_use_SWT.md | 2 - docs/FAQ/The_Official_Eclipse_FAQs.md | 64 ++++++++++--------- 12 files changed, 208 insertions(+), 94 deletions(-) create mode 100644 docs/FAQ/FAQ_How_do_I_explicitly_use_Chromium_as_the_Browser's_underlying_renderer.md create mode 100644 docs/FAQ/FAQ_How_do_I_explicitly_use_Edge_as_the_Browser's_underlying_renderer.md create mode 100644 docs/FAQ/FAQ_How_do_I_specify_the_default_type_of_native_renderer_that_is_used_by_the_Browser.md create mode 100644 docs/FAQ/FAQ_Which_GTK_version_do_I_need_to_run_SWT.md create mode 100644 docs/FAQ/FAQ_Which_platforms_support_the_SWT_Browser,_and_which_native_renderers_are_available.md diff --git a/docs/FAQ/FAQ_Can_I_use_SWT_outside_Eclipse_for_my_own_project.md b/docs/FAQ/FAQ_Can_I_use_SWT_outside_Eclipse_for_my_own_project.md index e8be9264662..533959dee5a 100644 --- a/docs/FAQ/FAQ_Can_I_use_SWT_outside_Eclipse_for_my_own_project.md +++ b/docs/FAQ/FAQ_Can_I_use_SWT_outside_Eclipse_for_my_own_project.md @@ -1,18 +1,17 @@ - FAQ Can I use SWT outside Eclipse for my own project? ===================================================== This can be interpreted as either a legal question or a technical question. You can find an official answer to the legal question on the SWT FAQ hosted on the SWT development team home page at eclipse.org. The answer to the technical question is an unqualified yes! However, because SWT has a native component, the technical details are a bit more involved than they are for simple Java libraries. -Each platform you want your project to run on will need its own native libraries. Luckily, this is easier than it used to be because the download section of eclipse.org now includes SWT drops. Download the appropriate SWT drop for the platform you are interested in running on, and set up the VM's classpath and library path accordingly. Here is a command line that was used to launch the BrowserSnippet stand-alone program: +Each platform you want your project to run on will need its own native libraries. Luckily, this is easier than it used to be because the download section of eclipse.org now includes SWT drops. Download the appropriate SWT drop for the platform you are interested in running on, and set up the VM's classpath and library path accordingly. Here is a command line that was used to launch the `BrowserSnippet` stand-alone program: - java -cp swt.jar;. -Djava.library.path=. BrowserSnippet +```sh +java -cp swt.jar;. -Djava.library.path=. BrowserSnippet +``` This command line assumes that java is on your execution path and that both swt.jar and the SWT dynamic link library are located in the current working directory. - - See Also: --------- @@ -20,4 +19,3 @@ See Also: * [FAQ How do I create an executable JAR file for a stand-alone SWT program?](./FAQ_How_do_I_create_an_executable_JAR_file_for_a_stand-alone_SWT_program.md "FAQ How do I create an executable JAR file for a stand-alone SWT program?") * [FAQ\_How\_is\_Eclipse\_licensed?](./FAQ_How_is_Eclipse_licensed.md "FAQ How is Eclipse licensed?") * [FAQ\_How\_do\_I\_display\_a\_Web\_page\_in_SWT?](./FAQ_How_do_I_display_a_Web_page_in_SWT.md "FAQ How do I display a Web page in SWT?") - diff --git a/docs/FAQ/FAQ_How_do_I_display_a_Web_page_in_SWT.md b/docs/FAQ/FAQ_How_do_I_display_a_Web_page_in_SWT.md index c88547a52df..d8abb335be4 100644 --- a/docs/FAQ/FAQ_How_do_I_display_a_Web_page_in_SWT.md +++ b/docs/FAQ/FAQ_How_do_I_display_a_Web_page_in_SWT.md @@ -3,44 +3,45 @@ FAQ How do I display a Web page in SWT? In Eclipse 3.0, SWT introduced a browser widget for displaying a native HTML renderer inside an SWT control. Prior to the introduction of this browser, it was necessary to invoke an external Web browser program for displaying rendered HTML. The browser can be instructed to render either a URL or a supplied string containing HTML content. The browser widget does not include the usual controls for navigation, bookmarks, and all the usual bells and whistles associated with a Web browser. As such, it can be used for highly controlled applications, such as displaying help text or even for showing decorated and interactive text inside a view or an editor. -The browser has API for programmatically manipulating the content, such as browsing forward or back in the navigation history, refreshing the content, or halting a rendering in process. You can install listeners on the browser to be notified when the location is changing or when the title changes or to receive progress notification as a page loads. It is fairly straightforward to implement basic Web browser functionality around this browser widget. For more details, take a look at BrowserAction in the org.eclipse.faq.examples plug-in. This action implements a fully functional Web browser in fewer than 60 lines of code! +The browser has API for programmatically manipulating the content, such as browsing forward or back in the navigation history, refreshing the content, or halting a rendering in process. You can install listeners on the browser to be notified when the location is changing or when the title changes or to receive progress notification as a page loads. It is fairly straightforward to implement basic Web browser functionality around this browser widget. For more details, take a look at `BrowserAction` in the `org.eclipse.faq.examples` plug-in. This action implements a fully functional Web browser in fewer than 60 lines of code! -As a quick example, here is a stand-alone SWT snippet that opens a browser shell on this book's Web site. +As a quick example, here is a stand-alone SWT snippet that opens a browser shell on this book's Website. A title listener is added to the browser in order to update the shell title with the name of the Web page being displayed: - Display display = new Display(); - final Shell shell = new Shell(display, SWT.SHELL_TRIM); - shell.setLayout(new FillLayout()); - Browser browser = new Browser(shell, SWT.NONE); - browser.addTitleListener(new TitleListener() { - public void changed(TitleEvent event) { - shell.setText(event.title); - } - }); - browser.setBounds(0,0,600,400); - shell.pack(); - shell.open(); - browser.setUrl("https://eclipse.org"); - while (!shell.isDisposed()) - if (!display.readAndDispatch()) - display.sleep(); - +```java +Display display = new Display(); +final Shell shell = new Shell(display, SWT.SHELL_TRIM); +shell.setLayout(new FillLayout()); +Browser browser = new Browser(shell, SWT.NONE); +browser.addTitleListener(new TitleListener() { + public void changed(TitleEvent event) { + shell.setText(event.title); + } +}); +browser.setBounds(0,0,600,400); +shell.pack(); +shell.open(); +browser.setUrl("https://eclipse.org"); +while (!shell.isDisposed()) + if (!display.readAndDispatch()) + display.sleep(); +``` -Figure 7.1 shows the resulting browser inside a simple shell. The browser widget is not yet available on all platforms as not all platforms that SWT supports have an appropriate native control that can be exploited. For Eclipse 3.0, the browser will at least be available on Windows, Linux, QNX, and MacOS. For platforms that do not have a browser widget available, the Browser constructor will throw an SWT error, allowing you to catch the condition and fall back to an alternative, such as a user-specified external browser. +Figure 7.1 shows the resulting browser inside a simple shell. The browser widget is not yet available on all platforms as not all platforms that SWT supports have an appropriate native control that can be exploited. For Eclipse 3.0, the browser will at least be available on Windows, Linux, QNX, and macOS. For platforms that do not have a browser widget available, the Browser constructor will throw an SWT error, allowing you to catch the condition and fall back to an alternative, such as a user-specified external browser. -How can I invoke the eclipse default web browser in my own plugin? +How can I invoke the Eclipse default web browser in my own plugin? ------------------------------------------------------------------ > > I want to invoke the eclipse default web browser which is specified in > > "Preferences" -> "General" -> "Web Browser" in my own plugin, giving it > > a URL and make it visit that URL. How can I do this? Thanks. -I think you want something like... +I think you want something like below. - IWorkbenchBrowserSupport support = +```java + IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport(); - IWebBrowser browser = support.createBrowser("someId"); - browser.openURL(new URL("https://www.eclipse.org")); - - + IWebBrowser browser = support.createBrowser("someId"); + browser.openURL(new URL("https://www.eclipse.org")); +``` diff --git a/docs/FAQ/FAQ_How_do_I_embed_AWT_and_Swing_inside_SWT.md b/docs/FAQ/FAQ_How_do_I_embed_AWT_and_Swing_inside_SWT.md index 2585bf065b4..0bdec1a59c3 100644 --- a/docs/FAQ/FAQ_How_do_I_embed_AWT_and_Swing_inside_SWT.md +++ b/docs/FAQ/FAQ_How_do_I_embed_AWT_and_Swing_inside_SWT.md @@ -1,9 +1,8 @@ - FAQ How do I embed AWT and Swing inside SWT? ============================================ -In Eclipse 3.0, APIs have been introduced for integrating AWT and Swing with SWT. This support is product-quality on Windows and has only early access support on Linux under JDK 1.5. The main entry point for AWT integration is the class SWT_AWT. It provides a factory method, new_Frame, that creates an AWT Frame that is parented within an SWT Composite. From there, you can create whatever AWT components you want within that frame. The bridging layer created by SWT_AWT handles forwarding of SWT events to the corresponding AWT events within the frame. +In Eclipse 3.0, APIs have been introduced for integrating AWT and Swing with SWT. This support is product-quality on Windows and has only early access support on Linux under JDK 1.5. The main entry point for AWT integration is the class `SWT_AWT`. It provides a factory method, `new_Frame`, that creates an AWT Frame that is parented within an SWT Composite. From there, you can create whatever AWT components you want within that frame. The bridging layer created by `SWT_AWT` handles forwarding of SWT events to the corresponding AWT events within the frame. Articles -------- @@ -16,4 +15,3 @@ See Also: * [FAQ Is SWT better than Swing?](./FAQ_Is_SWT_better_than_Swing.md "FAQ Is SWT better than Swing?") * [Albireo](https://www.eclipse.org/albireo/) Albireo is an Eclipse Technology project (in incubation phase) that simplifies the task of combining user interface components from the Swing and SWT toolkits. It builds on SWT's standard SWT_AWT bridge, implementing much of the tricky code that is currently left to the developer. * [DJ project](http://djproject.sourceforge.net/) The other way around. The DJ Project lets you embed SWT components in Swing. - diff --git a/docs/FAQ/FAQ_How_do_I_explicitly_use_Chromium_as_the_Browser's_underlying_renderer.md b/docs/FAQ/FAQ_How_do_I_explicitly_use_Chromium_as_the_Browser's_underlying_renderer.md new file mode 100644 index 00000000000..31cab5f9986 --- /dev/null +++ b/docs/FAQ/FAQ_How_do_I_explicitly_use_Chromium_as_the_Browser's_underlying_renderer.md @@ -0,0 +1,30 @@ +FAQ How do I explicitly use Chromium as the Browser's underlying renderer +========================================================================= + +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`. + +You can get the SWT-Chromium libraries from the Eclipse SDK or from the standalone SWT Chromium support libraries section on the download page. + +To use the Chromium libraries from the Eclipse SDK: + +* 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) +* Add the required jars to classpath of project: + * SWT-Chromium fragment (`org.eclipse.swt.browser.chromium....jar`) + * SWT fragment (`org.eclipse.swt....jar`) + * CEF binary (`com.make.chromium.cef....jar`) + +To use the Chromium libraries from the standalone SWT downloads: + +* Get CEF binaries for your platform from the p2 repo: + * [CEF GTK binaries](https://dl.equo.dev/chromium-swt-ce/oss/mvn/com/equo/com.equo.chromium.cef.gtk.linux.x86_64/128.0.0/com.equo.chromium.cef.gtk.linux.x86_64-128.0.0.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) + * [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) +* Add the required jars to classpath of project: + * SWT-Chromium standalone jar (`swt-chromium.jar`) + * SWT standalone jar (`swt.jar`) + * CEF binary (`com.make.chromium.cef....jar`) + +To launch Eclipse with Chromium as the default browser type: + +* 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) +* In `eclipse.ini`, add `-Dorg.eclipse.swt.browser.DefaultType=chromium` under `-vmargs`. diff --git a/docs/FAQ/FAQ_How_do_I_explicitly_use_Edge_as_the_Browser's_underlying_renderer.md b/docs/FAQ/FAQ_How_do_I_explicitly_use_Edge_as_the_Browser's_underlying_renderer.md new file mode 100644 index 00000000000..a9b57086905 --- /dev/null +++ b/docs/FAQ/FAQ_How_do_I_explicitly_use_Edge_as_the_Browser's_underlying_renderer.md @@ -0,0 +1,27 @@ +FAQ How do I explicitly use Edge as the Browser's underlying renderer +===================================================================== + +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`. + +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: + +* 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). + This runtime will be shared between all applications on the machine and will auto-update itself independent of your application. +* A fixed-version archive with all the necessary files (Same link as above). + 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. +* Beta, Dev, or Canary version of the Edge browser (). + This option is convenient for testing, but production deployments should use the previous two options. + +_Note: Stable Edge browser installations don't provide a WebView2 component._ + +See also [Distribution of apps using WebView2](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution) on MSDN. + +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: + +```sh +java "-Dorg.eclipse.swt.browser.EdgeDir=C:\Program Files (x86)\Microsoft\Edge Beta\Application\88.0.705.29" ... +``` + +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. + +The default user-directory location is `%LOCALAPPDATA%\\WebView2`, where `` 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. diff --git a/docs/FAQ/FAQ_How_do_I_specify_the_default_type_of_native_renderer_that_is_used_by_the_Browser.md b/docs/FAQ/FAQ_How_do_I_specify_the_default_type_of_native_renderer_that_is_used_by_the_Browser.md new file mode 100644 index 00000000000..e457c3e6b95 --- /dev/null +++ b/docs/FAQ/FAQ_How_do_I_specify_the_default_type_of_native_renderer_that_is_used_by_the_Browser.md @@ -0,0 +1,18 @@ +FAQ How do I specify the default type of native renderer that is used by the Browser +==================================================================================== + +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.md). Default is chosen to not require additional software installation and to preserve backward-compatible behavior. + +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. + +_Note: As of Eclipse/SWT 4.8, Mozilla (`XULRunner`) renderer is no longer supported, the value `mozilla` has no effect._ + +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. + +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`). + +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: + +* Create a fragment with host plug-in `org.eclipse.swt`. +* In this fragment, create class `org.eclipse.swt.browser.BrowserInitializer`. +* Implement a static initializer in this class that sets the `org.eclipse.swt.browser.DefaultType` property. diff --git a/docs/FAQ/FAQ_What_is_Ant.md b/docs/FAQ/FAQ_What_is_Ant.md index fe735ff8338..60148abc029 100644 --- a/docs/FAQ/FAQ_What_is_Ant.md +++ b/docs/FAQ/FAQ_What_is_Ant.md @@ -1,5 +1,4 @@ - FAQ What is Ant? ================ @@ -16,4 +15,3 @@ See Also: * [Apache Ant](http://ant.apache.org) * [FAQ What is the use of the build.xml file?](./FAQ_What_is_the_use_of_the_build_xml_file.md "FAQ What is the use of the build.xml file?") - diff --git a/docs/FAQ/FAQ_Where_can_I_find_more_information_on_SWT.md b/docs/FAQ/FAQ_Where_can_I_find_more_information_on_SWT.md index 956160a1511..6807c74944a 100644 --- a/docs/FAQ/FAQ_Where_can_I_find_more_information_on_SWT.md +++ b/docs/FAQ/FAQ_Where_can_I_find_more_information_on_SWT.md @@ -4,21 +4,23 @@ FAQ Where can I find more information on SWT? Contents -------- -* [1 Books](#Books) -* [2 Web sites](#Web-sites) -* [3 Articles](#Articles) -* [4 Discussion forums](#Discussion-forums) -* [5 See Also](#See-Also) +- [FAQ Where can I find more information on SWT?](#faq-where-can-i-find-more-information-on-swt) + - [Contents](#contents) + - [Books](#books) + - [Websites](#websites) + - [Articles](#articles) + - [Discussion forums](#discussion-forums) + - [See Also](#see-also) Books ----- -Before 2004, comprehensive information on SWT was not available outside the SWT source code and javadoc itself. -This situation changed in 2004 with the publication of _SWT: The Standard Widget Toolkit_ in the Addison-Wesley Eclipse Series. -This book was written by Steve Northover and Mike Wilson, two of the original architects and developers of SWT. +Before 2004, comprehensive information on SWT was not available outside the SWT source code and Javadoc itself. +This situation changed in 2004 with the publication of _SWT: The Standard Widget Toolkit_ in the Addison-Wesley Eclipse Series. +This book was written by Steve Northover and Mike Wilson, two of the original architects and developers of SWT. When the acronym first appeared, it was jokingly referred to as Steve's Widget Toolkit. -Nobody knows SWT better than these authors, and their book is the most authoritative guide to the subject. +Nobody knows SWT better than these authors, and their book is the most authoritative guide to the subject. If you're doing extensive development using SWT, it's indispensable. Volume 2 of their book is forthcoming. Several other Eclipse books include a chapter or more on SWT: @@ -28,39 +30,37 @@ Several other Eclipse books include a chapter or more on SWT: * Sherry Shavor, et al., _The Java Developer's Guide to Eclipse_ (Addison-Wesley, 2004), Chapter 14. * Rob Warner and Robert Harris, _The Definitive Guide to SWT and JFace_, (Apress, 2004), major part of book. -Web sites +Websites --------- -The information hub for SWT is the [SWT development team home page](https://eclipse.org/swt). -The main page has a basic SWT overview, and the Development Resources page has loads more information, including a comprehensive library of stand-alone SWT programs--called snippets--illustrating many of the important concepts in SWT. +The information hub for SWT is the [SWT development team home page](https://eclipse.org/swt). +The main page has a basic SWT overview, and the Development Resources page has loads more information, including a comprehensive library of stand-alone SWT programs--called snippets--illustrating many of the important concepts in SWT. This page also hosts the official SWT FAQ maintained by the SWT development team, as well as development plans, platform porting status, and much more. The home page for SWT and JFace has links to other resource pages, but some information is here, along with a collection of FAQs. - Articles -------- -The first place to look for articles is the articles page on eclipse.org. -We won't bother listing all the articles here as the list would probably be stale by the time this book goes to print. -Of particular note is the two-part article entitled 'SWT: The Standard Widget Toolkit.' -These articles were written by the SWT development team to describe some of the design rationale behind the project. +The first place to look for articles is the articles page on eclipse.org. +We won't bother listing all the articles here as the list would probably be stale by the time this book goes to print. +Of particular note is the two-part article entitled 'SWT: The Standard Widget Toolkit.' +These articles were written by the SWT development team to describe some of the design rationale behind the project. The CD included with this book has PDF versions of all the articles, captured in May, 2004. - Discussion forums ----------------- -The main forum for discussion of SWT is the eclipse.platform.swt newsgroup. -This is the place to go for all kinds of SWT questions for users of all levels, from novices taking their first steps with SWT to highly experienced SWT developers. -The SWT develoment team regularly reads this newsgroup, so you can be sure of authoritative answers. +The main forum for discussion of SWT is the `eclipse.platform.swt` newsgroup. +This is the place to go for all kinds of SWT questions for users of all levels, from novices taking their first steps with SWT to highly experienced SWT developers. +The SWT development team regularly reads this newsgroup, so you can be sure of authoritative answers. Be sure to do a [quick search](https://www.eclipse.org/search/search.cgi), before posting, to avoid asking a question that's been asked before. -The platform-swt-dev mailing list is for discussion among members of the SWT development team and other contributors to SWT. -If you are fixing SWT bugs, porting SWT to another platform, or looking for solutions to advanced questions that have not been answered on the newsgroup, you are welcome to ask here. +The `platform-swt-dev` mailing list is for discussion among members of the SWT development team and other contributors to SWT. +If you are fixing SWT bugs, porting SWT to another platform, or looking for solutions to advanced questions that have not been answered on the newsgroup, you are welcome to ask here. SWT users are welcome to subscribe and follow along with the discussion, but to avoid cluttering the developer list, please use the newsgroup for your questions. -Some other Java forums have been known to host discussion threads on SWT. Unfortunately, these forums can sometimes deteriorate into flame wars on Swing versus SWT. +Some other Java forums have been known to host discussion threads on SWT. Unfortunately, these forums can sometimes deteriorate into flame wars on Swing versus SWT. See Also -------- @@ -69,4 +69,3 @@ See Also * [FAQ What Eclipse mailing lists are available?](./FAQ_What_Eclipse_mailing_lists_are_available.md "FAQ What Eclipse mailing lists are available?") * [FAQ What articles on Eclipse have been written?](./FAQ_What_articles_on_Eclipse_have_been_written.md "FAQ What articles on Eclipse have been written?") * [FAQ What books have been written on Eclipse?](./FAQ_What_books_have_been_written_on_Eclipse.md "FAQ What books have been written on Eclipse?") - diff --git a/docs/FAQ/FAQ_Which_GTK_version_do_I_need_to_run_SWT.md b/docs/FAQ/FAQ_Which_GTK_version_do_I_need_to_run_SWT.md new file mode 100644 index 00000000000..1da81da1160 --- /dev/null +++ b/docs/FAQ/FAQ_Which_GTK_version_do_I_need_to_run_SWT.md @@ -0,0 +1,24 @@ +FAQ Which GTK version do I need to run SWT +========================================== + +SWT requires the following GTK+ versions (or newer) to be installed: + +* Eclipse/SWT 4.16.x: GTK+ 3.20.0 and its dependencies +* Eclipse/SWT 4.15.x: GTK+ 3.14.0 and its dependencies +* Eclipse/SWT 4.11.x - 4.14.x: GTK+ 3.10.0 and its dependencies +* Eclipse/SWT 4.10.x: GTK+ 3.8.0 and its dependencies +* Eclipse/SWT 4.6.x - 4.9.x: GTK+ 2.24.0 and its dependencies (for GTK+ 2) OR GTK+ 3.0.0 and its dependencies (for GTK+ 3) +* Eclipse/SWT 4.5.x: GTK+ 2.18.0 and its dependencies (for GTK+ 2) OR GTK+ 3.0.0 and its dependencies (for GTK+ 3) +* Eclipse/SWT 4.4.x: GTK+ 2.10.0 and its dependencies (for GTK+ 2) OR GTK+ 3.0.0 and its dependencies (for GTK+ 3) +* Eclipse/SWT 4.3.x: GTK+ 2.10.0 and its dependencies +* Eclipse/SWT 3.8.x: GTK+ 2.6.0 and its dependencies +* Eclipse/SWT 3.6.x - 3.7.x: GTK+ 2.4.1 and its dependencies +* Eclipse/SWT 3.0.x - 3.5.x: GTK+ 2.2.1 and its dependencies +* Eclipse/SWT 2.1.x: GTK+ 2.0.6 and its dependencies + +Note that Eclipse/SWT 4.3.x includes early access support for GTK+ 3.x. +Starting from Eclipse/SWT 4.4.x, Linux builds come with GTK+ 3 support enabled by default. + +Starting from Eclipse/SWT 4.10.x, Linux builds only come with GTK+ 3 support, GTK+ 2 is no longer supported. + +You can determine which version(s) of GTK you have installed with `rpm -q gtk2` or `rpm -q gtk3`. diff --git a/docs/FAQ/FAQ_Which_platforms_support_the_SWT_Browser,_and_which_native_renderers_are_available.md b/docs/FAQ/FAQ_Which_platforms_support_the_SWT_Browser,_and_which_native_renderers_are_available.md new file mode 100644 index 00000000000..0a31e89b7fe --- /dev/null +++ b/docs/FAQ/FAQ_Which_platforms_support_the_SWT_Browser,_and_which_native_renderers_are_available.md @@ -0,0 +1,17 @@ +FAQ Which platforms support the SWT Browser, and which native renderers are available +===================================================================================== + +The SWT Browser is currently available on all supported platforms. Available renderers and corresponding widget style flags are: + +| Renderer | Platform | Style Flag | Default | +| --------------------- | ---------------- | -------------- | ------- | +| Internet Explorer | Windows | `SWT.IE` | Yes | +| WebKit | macOS, Linux GTK | `SWT.WEBKIT` | Yes | +| Edge (Chromium-based) | Windows | `SWT.EDGE` | No | +| Chromium | All | `SWT.CHROMIUM` | No | + +_Note: As of Eclipse/SWT 4.8, Mozilla (`XULRunner`) renderer is no longer supported, `SWT.MOZILLA` flag is deprecated and has no effect._ + +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). + +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). diff --git a/docs/FAQ/FAQ_Why_does_Eclipse_use_SWT.md b/docs/FAQ/FAQ_Why_does_Eclipse_use_SWT.md index de24398055c..01715e07242 100644 --- a/docs/FAQ/FAQ_Why_does_Eclipse_use_SWT.md +++ b/docs/FAQ/FAQ_Why_does_Eclipse_use_SWT.md @@ -1,5 +1,4 @@ - FAQ Why does Eclipse use SWT? ============================= @@ -15,4 +14,3 @@ See Also: --------- * [FAQ How do I embed AWT and Swing inside SWT?](./FAQ_How_do_I_embed_AWT_and_Swing_inside_SWT.md "FAQ How do I embed AWT and Swing inside SWT?") - diff --git a/docs/FAQ/The_Official_Eclipse_FAQs.md b/docs/FAQ/The_Official_Eclipse_FAQs.md index ed0f023d11c..0d0a28c15ee 100644 --- a/docs/FAQ/The_Official_Eclipse_FAQs.md +++ b/docs/FAQ/The_Official_Eclipse_FAQs.md @@ -8,33 +8,35 @@ Note that this FAQ is updated less frequently than [this FAQ](/IRC_FAQ "IRC FAQ" Contents -------- -* [1 Part I -- The Eclipse Ecosystem](#Part-I----The-Eclipse-Ecosystem) - * [1.1 The Eclipse Community](#The-Eclipse-Community) - * [1.2 Getting Started](#Getting-Started) - * [1.3 Java Development in Eclipse](#Java-Development-in-Eclipse) - * [1.4 Plug-In Development Environment](#Plug-In-Development-Environment) -* [2 Part II -- The Rich Client Platform](#Part-II----The-Rich-Client-Platform) - * [2.1 All about Plug-ins](#All-about-Plug-ins) - * [2.2 Runtime Facilities](#Runtime-Facilities) - * [2.3 Standard Widget Toolkit (SWT)](#standard-widget-toolkit-swt) - * [2.4 JFace](#JFace) - * [2.5 Generic Workbench](#Generic-Workbench) - * [2.6 Perspectives and Views](#Perspectives-and-Views) - * [2.7 Generic Editors](#Generic-Editors) - * [2.8 Actions, Commands, and Activities](#Actions.2C-Commands.2C-and-Activities) - * [2.9 Building Your Own Application](#Building-Your-Own-Application) - * [2.10 Productizing an Eclipse Offering](#Productizing-an-Eclipse-Offering) -* [3 Part III -- The Eclipse IDE Platform](#Part-III----The-Eclipse-IDE-Platform) - * [3.1 Text Editors](#Text-Editors) - * [3.2 Help, Search, and Compare](#Help.2C-Search.2C-and-Compare) - * [3.3 Workspace and Resources API](#Workspace-and-Resources-API) - * [3.4 Workbench IDE](#Workbench-IDE) - * [3.5 Implementing Support for Your Own Language](#Implementing-Support-for-Your-Own-Language) - * [3.5.1 The language already has parsers, compilers, and other services](#The-language-already-has-parsers.2C-compilers.2C-and-other-services) - * [3.5.2 This is a DSL of your own](#This-is-a-DSL-of-your-own) - * [3.5.3 Legacy](#Legacy) - * [3.6 Java Development Tool API](#Java-Development-Tool-API) -* [4 This content is based on](#This-content-is-based-on) +- [The Official Eclipse FAQs](#the-official-eclipse-faqs) + - [Contents](#contents) + - [Part I -- The Eclipse Ecosystem](#part-i----the-eclipse-ecosystem) + - [The Eclipse Community](#the-eclipse-community) + - [Getting Started](#getting-started) + - [Java Development in Eclipse](#java-development-in-eclipse) + - [Plug-In Development Environment](#plug-in-development-environment) + - [Part II -- The Rich Client Platform](#part-ii----the-rich-client-platform) + - [All about Plug-ins](#all-about-plug-ins) + - [Runtime Facilities](#runtime-facilities) + - [Standard Widget Toolkit (SWT)](#standard-widget-toolkit-swt) + - [JFace](#jface) + - [Generic Workbench](#generic-workbench) + - [Perspectives and Views](#perspectives-and-views) + - [Generic Editors](#generic-editors) + - [Actions, Commands, and Activities](#actions-commands-and-activities) + - [Building Your Own Application](#building-your-own-application) + - [Productizing an Eclipse Offering](#productizing-an-eclipse-offering) + - [Part III -- The Eclipse IDE Platform](#part-iii----the-eclipse-ide-platform) + - [Text Editors](#text-editors) + - [Help, Search, and Compare](#help-search-and-compare) + - [Workspace and Resources API](#workspace-and-resources-api) + - [Workbench IDE](#workbench-ide) + - [Implementing Support for Your Own Language](#implementing-support-for-your-own-language) + - [The language already has parsers, compilers, and other services](#the-language-already-has-parsers-compilers-and-other-services) + - [This is a DSL of your own](#this-is-a-dsl-of-your-own) + - [Legacy](#legacy) + - [Java Development Tool API](#java-development-tool-api) + - [Acknowledgement](#acknowledgement) Part I -- The Eclipse Ecosystem ------------------------------- @@ -196,8 +198,6 @@ Part I discussed the Eclipse ecosystem: how to run it, how to use it, and how to * [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?") * [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?") - - ### Runtime Facilities 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 * [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?") * [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?") * [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?") +* [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?") +* [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?") +* [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?") +* [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?") +* [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?") + ### Standard Widget Toolkit (SWT)