Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2017-12-11 20:06:31 +0000
committerLeo Ufimtsev2017-12-11 20:06:31 +0000
commit9f13fe28a434720b783cb6e1681537bbe5331077 (patch)
treea7d441b55968d04eeaf8496c95407db988413bea
parentbbc79642d607eaa8ec1137f3244b5de268dd9de6 (diff)
downloadeclipse.platform.swt-9f13fe28a434720b783cb6e1681537bbe5331077.tar.gz
eclipse.platform.swt-9f13fe28a434720b783cb6e1681537bbe5331077.tar.xz
eclipse.platform.swt-9f13fe28a434720b783cb6e1681537bbe5331077.zip
Bug 510905 (Webkit2FuncRetVal) Remove debug messages.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=510905 Change-Id: I603f78225bbe1022cb065a59991e3fc000cc6f7b Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java2
3 files changed, 1 insertions, 19 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
index ac0ce5e5ac..92f75a4ec3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
@@ -360,9 +360,6 @@ public static String getVersionString () {
}
-/** TEMP VAR to figure out how to package webkitextensions* folder into OSGI mechanism. To re removed upon completion of Bug 510905 */
-private static boolean SWT_WEBKIT_DEBUG_MSGS = System.getenv("SWT_WEBKIT_DEBUG_MSGS") != null ? true : false;
-
/**
* Locates a resource located either in java library path, swt library path, or attempts to extract it from inside swt.jar file.
* This function supports a single level subfolder, e.g SubFolder/resource.
@@ -395,7 +392,6 @@ public static File findResource(String subDir, String resourceName, boolean mapR
for (String path : paths) {
File file = new File(path + SEPARATOR + maybeSubDirPath + finalResourceName);
if (file.exists()){
- if (SWT_WEBKIT_DEBUG_MSGS) System.out.println("SWT_WEBKIT: findResource has found a file in search path: " + file.getPath()); // Temp, will be removed. Bug 510905
return file;
}
}
@@ -413,8 +409,6 @@ public static File findResource(String subDir, String resourceName, boolean mapR
// 2) If SWT is ran as OSGI bundle (e.g inside Eclipse), then local resources are extracted to
// eclipse/configuration/org.eclipse.osgi/NN/N/.cp/<resource> and we're given a pointer to the file.
{
- if (SWT_WEBKIT_DEBUG_MSGS) System.out.println("SWT_WEBKIT: findResource is attempting to find resource from OSGI Bundle."); // Temp, will be removed. Bug 510905
-
// If this is an OSGI bundle look for the resource using getResource
URL url = Library.class.getClassLoader().getResource(maybeSubDirPathWithPrefix + finalResourceName);
URLConnection connection;
@@ -424,17 +418,13 @@ public static File findResource(String subDir, String resourceName, boolean mapR
if (getFileURLMethod != null){
// This method does the actual extraction of file to: ../eclipse/configuration/org.eclipse.osgi/NN/N/.cp/<SubDir>/resource.ext
URL result = (URL) getFileURLMethod.invoke(connection);
- File returnedFile = new File(result.toURI());
- if (SWT_WEBKIT_DEBUG_MSGS) System.out.println("SWT_WEBKIT: OSGI found resource in: " + returnedFile.getAbsolutePath());
- return returnedFile;
+ return new File(result.toURI());
}
} catch (Exception e) {
// If any exceptions are thrown the resource cannot be located this way.
}
}
- if (SWT_WEBKIT_DEBUG_MSGS) System.out.println("SWT_WEBKIT: findResource didn't find file in paths. Will attempt to extract."); // Temp, will be removed. Bug 510905
-
// 3) Need to try to pull the resource out of the swt.jar.
// Look for the resource in the user's home directory, (if already extracted in the temp swt folder. (~/.swt/lib...)
// Extract from the swt.jar if not there already.
@@ -458,10 +448,8 @@ public static File findResource(String subDir, String resourceName, boolean mapR
}
StringBuffer message = new StringBuffer("");
- if (SWT_WEBKIT_DEBUG_MSGS) System.out.println("SWT_WEBKIT: findResource Attempting to extract: " + maybeSubDirPath + finalResourceName); // Temp, will be removed. Bug 510905
if (extract(file.getPath(), maybeSubDirPath + finalResourceName, message)) {
if (file.exists()) {
- if (SWT_WEBKIT_DEBUG_MSGS) System.out.println("SWT_WEBKIT: findResource extracted file sucessfully!"); // Temp, will be removed. Bug 510905
return file;
}
}
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 d6d16b4a1d..e7be2f2cd7 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
@@ -396,8 +396,6 @@ class WebKit extends WebBrowser {
*/
@SuppressWarnings("unused") // Only called directly from C
private static void initializeWebExtensions_callback (long /*int*/ WebKitWebContext, long /*int*/ user_data) {
- if (WebKitGTK.SWT_WEBKIT_DEBUG_MSGS) System.out.println("SWT_WEBKIT: Initializing webextension");
-
// 1) GDBus:
// Normally we'd first initialize gdbus channel. But gdbus makes Browser slower and isn't always needed.
// So WebkitGDBus is lazy-initialized, although it can be initialized here if gdbus is ever needed
@@ -408,7 +406,6 @@ class WebKit extends WebBrowser {
// 2) Load Webkit Extension:
// Webkit extensions should be in their own directory.
String swtVersion = Library.getVersionString();
- if (WebKitGTK.SWT_WEBKIT_DEBUG_MSGS) System.out.println("SWT_WEBKIT: Webkit dir is:" + "webkitextensions" + swtVersion);
File extension;
try {
extension = Library.findResource("webkitextensions" + swtVersion ,"swt-webkit2extension", true);
@@ -424,7 +421,6 @@ class WebKit extends WebBrowser {
loadFailed = true;
return;
}
- if (WebKitGTK.SWT_WEBKIT_DEBUG_MSGS && extension != null) System.out.println(" SWT_WEBKIT: Found extension in: " + extension.getAbsolutePath());
String extensionsFolder = extension.getParent();
/* Dev note:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
index 88a522e985..c2eb48549e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
@@ -38,8 +38,6 @@ public class WebKitGTK extends C {
* e.g debug issues in compiled eclipse builds, OSGI loading of the extension etc..
* Should be removed once webkit2 (and it's enhancements) are completed, no need to keep these msgs around.
*/
- public static boolean SWT_WEBKIT_DEBUG_MSGS = System.getenv("SWT_WEBKIT_DEBUG_MSGS") != null ? true : false;
-
static {
try {
Library.loadLibrary ("swt-webkit"); // $NON-NLS-1$

Back to the top