Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutUtils.java')
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutUtils.java44
1 files changed, 16 insertions, 28 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutUtils.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutUtils.java
index 9767b8e5095..c400c6c56e4 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutUtils.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutUtils.java
@@ -76,13 +76,11 @@ public class AboutUtils {
urlOffset++;
// Right to "://"
- StringTokenizer tokenizer = new StringTokenizer(s
- .substring(urlSeparatorOffset + 3), " \t\n\r\f<>", false); //$NON-NLS-1$
+ StringTokenizer tokenizer = new StringTokenizer(s.substring(urlSeparatorOffset + 3), " \t\n\r\f<>", false); //$NON-NLS-1$
if (!tokenizer.hasMoreTokens())
return null;
- int urlLength = tokenizer.nextToken().length() + 3
- + urlSeparatorOffset - urlOffset;
+ int urlLength = tokenizer.nextToken().length() + 3 + urlSeparatorOffset - urlOffset;
if (startDoubleQuote) {
int endOffset = -1;
@@ -103,19 +101,17 @@ public class AboutUtils {
urlSeparatorOffset = s.indexOf("://", urlOffset + urlLength + 1); //$NON-NLS-1$
}
- return new AboutItem(s, linkRanges.toArray(new int[linkRanges
- .size()][2]), links
- .toArray(new String[links.size()]));
+ return new AboutItem(s, linkRanges.toArray(new int[linkRanges.size()][2]),
+ links.toArray(new String[links.size()]));
}
/**
- * Open a browser with the argument title on the argument url. If the url
- * refers to a resource within a bundle, then a temp copy of the file will
- * be extracted and opened.
+ * Open a browser with the argument title on the argument url. If the url refers
+ * to a resource within a bundle, then a temp copy of the file will be extracted
+ * and opened.
*
* @see <code>Platform.asLocalUrl</code>
- * @param url
- * The target url to be displayed, null will be safely ignored
+ * @param url The target url to be displayed, null will be safely ignored
* @return true if the url was successfully displayed and false otherwise
*/
public static boolean openBrowser(Shell shell, URL url) {
@@ -146,8 +142,7 @@ public class AboutUtils {
}
href = "file:///" + href; //$NON-NLS-1$
}
- IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
- .getBrowserSupport();
+ IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
try {
IWebBrowser browser = support.getExternalBrowser();
browser.openURL(new URL(urlEncodeForSpaces(href.toCharArray())));
@@ -159,9 +154,8 @@ public class AboutUtils {
}
/**
- * This method encodes the url, removes the spaces from the url and replaces
- * the same with <code>"%20"</code>. This method is required to fix Bug
- * 77840.
+ * This method encodes the url, removes the spaces from the url and replaces the
+ * same with <code>"%20"</code>. This method is required to fix Bug 77840.
*
* @since 3.0.2
*/
@@ -180,12 +174,9 @@ public class AboutUtils {
/**
* display an error message
*/
- private static void openWebBrowserError(Shell shell, final String href,
- final Throwable t) {
+ private static void openWebBrowserError(Shell shell, final String href, final Throwable t) {
String title = WorkbenchMessages.ProductInfoDialog_errorTitle;
- String msg = NLS.bind(
- WorkbenchMessages.ProductInfoDialog_unableToOpenWebBrowser,
- href);
+ String msg = NLS.bind(WorkbenchMessages.ProductInfoDialog_unableToOpenWebBrowser, href);
IStatus status = WorkbenchPlugin.getStatus(t);
StatusUtil.handleStatus(status, title + ": " + msg, StatusManager.SHOW, //$NON-NLS-1$
shell);
@@ -203,8 +194,7 @@ public class AboutUtils {
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=97783
File logCopy = makeDisplayCopy(log);
if (logCopy != null) {
- AboutUtils.openLink(shell,
- "file:///" + logCopy.getAbsolutePath()); //$NON-NLS-1$
+ AboutUtils.openLink(shell, "file:///" + logCopy.getAbsolutePath()); //$NON-NLS-1$
return;
}
// Couldn't make copy, try to open the original log.
@@ -220,10 +210,8 @@ public class AboutUtils {
AboutUtils.openLink(shell, "file:///" + filename); //$NON-NLS-1$
return;
}
- MessageDialog.openInformation(shell,
- WorkbenchMessages.AboutSystemDialog_noLogTitle, NLS.bind(
- WorkbenchMessages.AboutSystemDialog_noLogMessage,
- filename));
+ MessageDialog.openInformation(shell, WorkbenchMessages.AboutSystemDialog_noLogTitle,
+ NLS.bind(WorkbenchMessages.AboutSystemDialog_noLogMessage, filename));
}
/**

Back to the top