Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-06-26 09:16:35 +0000
committerAlexander Kurtakov2017-06-26 10:16:35 +0000
commit16ccb324f949ee915ca80a80cba992d5d1dc7eb0 (patch)
tree6854ad426cb7d0aafc1d268f354f38c952a3e9d8 /examples
parentc865494fb259ebc05119833f35bb3ee247922433 (diff)
downloadeclipse.platform.swt-16ccb324f949ee915ca80a80cba992d5d1dc7eb0.tar.gz
eclipse.platform.swt-16ccb324f949ee915ca80a80cba992d5d1dc7eb0.tar.xz
eclipse.platform.swt-16ccb324f949ee915ca80a80cba992d5d1dc7eb0.zip
Bug 518542: Remove XULRunner related code from SWT source repository
Changed Snippet260 to use Webkit as it's the only cross platform browser backend supported now. Make TextEditor example to not specify browser type at all. Change-Id: I95c777763b386f57d16141f97194ee8c3ffa10b3 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java4
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet260.java14
2 files changed, 9 insertions, 9 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
index e0584312d6..40346b6fdf 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1046,7 +1046,7 @@ public class TextEditor {
Shell dialog = new Shell(shell);
dialog.setLayout(new FillLayout());
dialog.setText(getResourceString("Browser")); //$NON-NLS-1$
- Browser browser = new Browser(dialog, SWT.MOZILLA);
+ Browser browser = new Browser(dialog, SWT.NONE);
browser.setUrl(link);
dialog.open();
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet260.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet260.java
index 5c3e858855..cf40efd9bb 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet260.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet260.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,10 +11,10 @@
package org.eclipse.swt.snippets;
/*
- * Mozilla in a Browser
+ * WebKit in a Browser
*
* The requirements for using Mozilla-based Browsers are described
- * at http://www.eclipse.org/swt/faq.php#howusemozilla
+ * https://www.eclipse.org/swt/faq.php#howusewebkit
*
* For a list of all SWT example snippets see
* http://www.eclipse.org/swt/snippets/
@@ -22,9 +22,9 @@ package org.eclipse.swt.snippets;
* @since 3.3
*/
import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
import org.eclipse.swt.browser.*;
import org.eclipse.swt.layout.*;
+import org.eclipse.swt.widgets.*;
public class Snippet260 {
@@ -32,17 +32,17 @@ public class Snippet260 {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
- shell.setText("Mozilla");
+ shell.setText("WebKit");
final Browser browser;
try {
- browser = new Browser(shell, SWT.MOZILLA);
+ browser = new Browser(shell, SWT.WEBKIT);
} catch (SWTError e) {
System.out.println("Could not instantiate Browser: " + e.getMessage());
display.dispose();
return;
}
shell.open();
- browser.setUrl("http://mozilla.org");
+ browser.setUrl("https://webkit.org/");
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}

Back to the top