Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-02-09 09:02:37 +0000
committerAlexander Kurtakov2016-02-10 07:57:09 +0000
commit0b3de15c83fddb6e45d1372ffdf88504e8951d1e (patch)
tree1a473bc6a5e0fe325fb6900b9bac630409450ae8 /bundles/org.eclipse.swt/Eclipse SWT WebKit
parent1a375bfbb7dca92b102db09891a18eeb80d671f2 (diff)
downloadeclipse.platform.swt-0b3de15c83fddb6e45d1372ffdf88504e8951d1e.tar.gz
eclipse.platform.swt-0b3de15c83fddb6e45d1372ffdf88504e8951d1e.tar.xz
eclipse.platform.swt-0b3de15c83fddb6e45d1372ffdf88504e8951d1e.zip
Bug 483640 - Add missing annotations to SWT after the move to Java 7
Add missing @Override annotation for interface methods. Change-Id: Ibce185467807acd2dc5e6b71fda643a3947f60eb Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT WebKit')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java3
6 files changed, 30 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
index 1a4b462222..2faa2e5b2c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 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
@@ -68,6 +68,7 @@ class WebKit extends WebBrowser {
static {
NativeClearSessions = new Runnable() {
+ @Override
public void run() {
NSHTTPCookieStorage storage = NSHTTPCookieStorage.sharedHTTPCookieStorage();
NSArray cookies = storage.cookies();
@@ -82,6 +83,7 @@ class WebKit extends WebBrowser {
};
NativeGetCookie = new Runnable () {
+ @Override
public void run () {
NSHTTPCookieStorage storage = NSHTTPCookieStorage.sharedHTTPCookieStorage ();
NSURL url = NSURL.URLWithString (NSString.stringWith (CookieUrl));
@@ -101,6 +103,7 @@ class WebKit extends WebBrowser {
};
NativeSetCookie = new Runnable () {
+ @Override
public void run () {
NSURL url = NSURL.URLWithString (NSString.stringWith (CookieUrl));
NSMutableDictionary headers = NSMutableDictionary.dictionaryWithCapacity (1);
@@ -216,6 +219,7 @@ public void create (Composite parent, int style) {
browser.view.addSubview(webView);
Listener listener = new Listener() {
+ @Override
public void handleEvent(Event e) {
switch (e.type) {
case SWT.FocusIn:
@@ -1131,6 +1135,7 @@ boolean showAuthenticationDialog (final String[] user, final String[] password,
final boolean[] result = new boolean[1];
final Button[] buttons = new Button[2];
Listener listener = new Listener() {
+ @Override
public void handleEvent(Event event) {
user[0] = userText.getText();
password[0] = passwordText.getText();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
index 895389fc37..ce2b50eced 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2015 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -134,6 +134,7 @@ class WebKit extends WebBrowser {
if (JSDOMEventProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
NativeClearSessions = new Runnable () {
+ @Override
public void run () {
if (!LibraryLoaded) return;
long /*int*/ session = WebKitGTK.webkit_get_default_session ();
@@ -158,6 +159,7 @@ class WebKit extends WebBrowser {
};
NativeGetCookie = new Runnable () {
+ @Override
public void run () {
if (!LibraryLoaded) return;
long /*int*/ session = WebKitGTK.webkit_get_default_session ();
@@ -191,6 +193,7 @@ class WebKit extends WebBrowser {
};
NativeSetCookie = new Runnable () {
+ @Override
public void run () {
if (!LibraryLoaded) return;
long /*int*/ session = WebKitGTK.webkit_get_default_session ();
@@ -328,6 +331,7 @@ static long /*int*/ JSDOMEventProc (long /*int*/ arg0, long /*int*/ event, long
case OS.GDK_Tab: {
if ((gdkEvent.state & (OS.GDK_CONTROL_MASK | OS.GDK_MOD1_MASK)) == 0) {
browser.getDisplay ().asyncExec (new Runnable () {
+ @Override
public void run () {
if (browser.isDisposed ()) return;
if (browser.getDisplay ().getFocusControl () == null) {
@@ -683,6 +687,7 @@ public void create (Composite parent, int style) {
}
Listener listener = new Listener () {
+ @Override
public void handleEvent (Event event) {
switch (event.type) {
case SWT.Dispose: {
@@ -1218,6 +1223,7 @@ boolean handleKeyEvent (String type, int keyCode, int charCode, boolean altKey,
if (browser.isFocusControl ()) {
if (keyCode == SWT.TAB && (stateMask & (SWT.CTRL | SWT.ALT)) == 0) {
browser.getDisplay ().asyncExec (new Runnable () {
+ @Override
public void run () {
if (browser.isDisposed ()) return;
if (browser.getDisplay ().getFocusControl () == null) {
@@ -1599,6 +1605,7 @@ void openDownloadWindow (final long /*int*/ webkitDownload) {
data.horizontalAlignment = GridData.CENTER;
cancel.setLayoutData (data);
final Listener cancelListener = new Listener () {
+ @Override
public void handleEvent (Event event) {
WebKitGTK.webkit_download_cancel (webkitDownload);
}
@@ -1609,6 +1616,7 @@ void openDownloadWindow (final long /*int*/ webkitDownload) {
final Display display = browser.getDisplay ();
final int INTERVAL = 500;
display.timerExec (INTERVAL, new Runnable () {
+ @Override
public void run () {
int status = WebKitGTK.webkit_download_get_status (webkitDownload);
if (shell.isDisposed () || status == WebKitGTK.WEBKIT_DOWNLOAD_STATUS_FINISHED || status == WebKitGTK.WEBKIT_DOWNLOAD_STATUS_CANCELLED) {
@@ -1623,6 +1631,7 @@ void openDownloadWindow (final long /*int*/ webkitDownload) {
OS.g_object_unref (webkitDownload);
cancel.removeListener (SWT.Selection, cancelListener);
cancel.addListener (SWT.Selection, new Listener () {
+ @Override
public void handleEvent (Event event) {
shell.dispose ();
}
@@ -1835,6 +1844,7 @@ long /*int*/ webkit_download_requested (long /*int*/ web_view, long /*int*/ down
* a hang. The workaround is to open it asynchronously with a new download.
*/
browser.getDisplay ().asyncExec (new Runnable () {
+ @Override
public void run () {
if (!browser.isDisposed ()) {
FileDialog dialog = new FileDialog (browser.getShell (), SWT.SAVE);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java
index 8036066a22..587b92e3b7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -189,6 +189,7 @@ void openDownloadWindow (final IWebDownload download, String name) {
data.horizontalAlignment = GridData.CENTER;
cancel.setLayoutData (data);
final Listener cancelListener = new Listener () {
+ @Override
public void handleEvent (Event event) {
download.cancel ();
status = DOWNLOAD_CANCELLED;
@@ -200,6 +201,7 @@ void openDownloadWindow (final IWebDownload download, String name) {
final Display display = browser.getDisplay ();
final int INTERVAL = 500;
display.timerExec (INTERVAL, new Runnable () {
+ @Override
public void run () {
if (shell.isDisposed () || status == DOWNLOAD_FINISHED || status == DOWNLOAD_CANCELLED) {
shell.dispose ();
@@ -209,6 +211,7 @@ void openDownloadWindow (final IWebDownload download, String name) {
statusLabel.setText (Compatibility.getMessage ("SWT_Download_Error")); //$NON-NLS-1$
cancel.removeListener (SWT.Selection, cancelListener);
cancel.addListener (SWT.Selection, new Listener () {
+ @Override
public void handleEvent (Event event) {
shell.dispose ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java
index 3d1d899343..9ba6e2ee66 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -589,6 +589,7 @@ boolean showCertificateDialog (long /*int*/ webView, final String failingUrlStri
final boolean[] result = new boolean[1];
final Button[] buttons = new Button[3];
Listener listener = new Listener() {
+ @Override
public void handleEvent (Event event) {
if (event.widget == buttons[2]) {
showCertificate (shell, certificate);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
index bf2190efca..bf2dcb1ffc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -144,6 +144,7 @@ static {
if (JSObjectCallAsFunctionProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
NativeClearSessions = new Runnable () {
+ @Override
public void run () {
long /*int*/[] result = new long /*int*/[1];
int hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebCookieManager, 0, WebKit_win32.IID_IWebCookieManager, result);
@@ -174,6 +175,7 @@ static {
};
NativeGetCookie = new Runnable () {
+ @Override
public void run () {
long /*int*/[] result = new long /*int*/[1];
int hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebCookieManager, 0, WebKit_win32.IID_IWebCookieManager, result);
@@ -221,6 +223,7 @@ static {
};
NativeSetCookie = new Runnable () {
+ @Override
public void run () {
long /*int*/[] result = new long /*int*/[1];
int hr = WebKit_win32.WebKitCreateInstance (WebKit_win32.CLSID_WebCookieManager, 0, WebKit_win32.IID_IWebCookieManager, result);
@@ -635,6 +638,7 @@ public void create (Composite parent, int style) {
initializeWebViewPreferences ();
Listener listener = new Listener () {
+ @Override
public void handleEvent (Event e) {
switch (e.type) {
case SWT.Dispose: {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java
index 0532061d44..b23a151d91 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -309,6 +309,7 @@ boolean showAuthenticationDialog (final String[] user, final String[] password,
final boolean[] result = new boolean[1];
final Button[] buttons = new Button[2];
Listener listener = new Listener () {
+ @Override
public void handleEvent (Event event) {
user[0] = userText.getText ();
password[0] = passwordText.getText ();

Back to the top