Author: yradtsevich
Date: 2012-04-27 09:41:51 -0400 (Fri, 27 Apr 2012)
New Revision: 40571
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-11498 : Show more informative messages when
BrowserSim cannot be run
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java 2012-04-27
13:35:40 UTC (rev 40570)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ExceptionNotifier.java 2012-04-27
13:41:51 UTC (rev 40571)
@@ -52,11 +52,10 @@
&& error.getMessage() != null // Apple Application Support is not
installed
&& error.getMessage().contains("Safari must be installed to use a
SWT.WEBKIT-style Browser")) {
message = Messages.ExceptionNotifier_APPLE_APPLICATION_SUPPORT_IS_NOT_FOUND;
- } else if (PlatformUtil.OS_LINUX.equals(os) && error.getMessage() != null
// WebKitGTK is not installed
- && error.getMessage().contains("WebKitGTK")) {
- message = Messages.ExceptionNotifier_WEBKIT_GTK_IS_NOT_FOUND;
+ } else if (PlatformUtil.OS_LINUX.equals(os) && error.getMessage() != null) {
// Linux - probably WebKitGTK is not installed
+ message =
MessageFormat.format(Messages.ExceptionNotifier_WEBKIT_IS_FAILED_TO_START_ON_LINUX,
error.getMessage());
} else { // everything else
- message =
MessageFormat.format(Messages.ExceptionNotifier_COULD_NOT_INSTANTIATE_WEBKIT_BROWSER,
error.getMessage());
+ message = MessageFormat.format(Messages.ExceptionNotifier_WEBKIT_IS_FAILED_TO_START,
error.getMessage());
}
showErrorMessageWithLinks(parentShell, message);
}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java 2012-04-27
13:35:40 UTC (rev 40570)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java 2012-04-27
13:41:51 UTC (rev 40571)
@@ -40,9 +40,9 @@
public static String EditDeviceDialog_USER_AGENT;
public static String EditDeviceDialog_WIDTH;
public static String ExceptionNotifier_APPLE_APPLICATION_SUPPORT_IS_NOT_FOUND;
- public static String ExceptionNotifier_COULD_NOT_INSTANTIATE_WEBKIT_BROWSER;
+ public static String ExceptionNotifier_WEBKIT_IS_FAILED_TO_START;
public static String ExceptionNotifier_ONLY_32_BIT_ECLIPSE_IS_SUPPORTED_ON_WINDOWS;
- public static String ExceptionNotifier_WEBKIT_GTK_IS_NOT_FOUND;
+ public static String ExceptionNotifier_WEBKIT_IS_FAILED_TO_START_ON_LINUX;
public static String ManageDevicesDialog_ADD;
public static String ManageDevicesDialog_CANCEL;
public static String ManageDevicesDialog_DEFAULT;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties 2012-04-27
13:35:40 UTC (rev 40570)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties 2012-04-27
13:41:51 UTC (rev 40571)
@@ -20,17 +20,20 @@
EditDeviceDialog_SKIN=Skin:
EditDeviceDialog_USER_AGENT=User-Agent:
EditDeviceDialog_WIDTH=Width:
-ExceptionNotifier_APPLE_APPLICATION_SUPPORT_IS_NOT_FOUND=Apple Application Support is not
found.\
-\nPlease install <a
href=\"http://www.apple.com/quicktime/download/\">Apple QuickTime</a>
or <a
href=\"http://www.apple.com/itunes/download/\">Apple
iTunes</a> to run BrowserSim.\
-\nAlso see <a
href=\"https://community.jboss.org/docs/DOC-18100\">BrowserSim FAQ</a>.
-ExceptionNotifier_COULD_NOT_INSTANTIATE_WEBKIT_BROWSER=Could not instantiate WebKit
Browser:\n{1}\
-\nAlso see <a
href=\"https://community.jboss.org/docs/DOC-18100\">BrowserSim
FAQ</a>.
-ExceptionNotifier_ONLY_32_BIT_ECLIPSE_IS_SUPPORTED_ON_WINDOWS=64-bit Eclipse/JBDS is not
supported on Windows.\
-\nPlease install 32-bit Eclipse/JBDS to run BrowserSim.\
-\nAlso see <a
href=\"https://community.jboss.org/docs/DOC-18100\">BrowserSim
FAQ</a>.
-ExceptionNotifier_WEBKIT_GTK_IS_NOT_FOUND=WebKitGTK 1.2.0 or newer is not found in the
library load path.\
-\nPlease use your package manager to install libwebkitgtk.\
-\nAlso see <a
href=\"https://community.jboss.org/docs/DOC-18100\">BrowserSim
FAQ</a>.
+ExceptionNotifier_APPLE_APPLICATION_SUPPORT_IS_NOT_FOUND=Apple Application Support is not
found.\n\
+Please install <a
href\="http\://www.apple.com/quicktime/download/">Apple
QuickTime</a> or <a
href\="http\://www.apple.com/itunes/download/">Apple iTunes</a> to run
BrowserSim.\n\
+Also see <a
href\="https\://community.jboss.org/docs/DOC-18100">BrowserSim FAQ</a>.
+ExceptionNotifier_WEBKIT_IS_FAILED_TO_START=WebKit is failed to start with the following
error:\n\
+\"{0}\"\n\
+Also see <a
href\="https\://community.jboss.org/docs/DOC-18100">BrowserSim
FAQ</a>.
+ExceptionNotifier_ONLY_32_BIT_ECLIPSE_IS_SUPPORTED_ON_WINDOWS=64-bit Eclipse/JBDS is not
supported on Windows.\n\
+Please install 32-bit Eclipse/JBDS to run BrowserSim.\n\
+Also see <a
href\="https\://community.jboss.org/docs/DOC-18100">BrowserSim
FAQ</a>.
+ExceptionNotifier_WEBKIT_IS_FAILED_TO_START_ON_LINUX=WebKit is failed to start with the
following error:\n\
+\"{0}\"\n\
+Please note that WebKitGTK 1.2.0 or newer must be installed and available in the library
load path.\n\
+If not, use your package manager to install libwebkitgtk.\n\
+Also see <a
href\="https\://community.jboss.org/docs/DOC-18100">BrowserSim
FAQ</a>.
ManageDevicesDialog_ADD=Add
ManageDevicesDialog_CANCEL=Cancel
ManageDevicesDialog_DEFAULT=DEFAULT