| Summary: | Program#execute(String) cuts fragment part of file:/ arguments (starting at #) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Markus Keller <markus.kell.r> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | pinnamur, remy.suen, shahzadiftikhar, xixiyan |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux-GTK | ||
| Whiteboard: | |||
I will look into this. Do you have a snippet that reproduces the issue? Closing this ticket now as there has been no response in awhile. Please reopen it if you can reproduce the issue on GTK3.22/24 using SWT 4.10. Simple snippet to reproduce:
try {
IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
IWebBrowser browser = browserSupport.getExternalBrowser();
URL url = new URL("file://sometestfile/test.html#123");
browser.openURL(url);
} catch (Exception e) {
Logger.getLogger("An error occurred trying to open browser at: " + urlString);
}
Above code will discard #123 from the URL while opening in browser.
|
I20110310-1119 GTK Program#execute(String) cuts fragment part of file:/ arguments (starting at #) When I generate Javadoc and then want to open the Javadoc of a method selected in the editor in the system browser, then the fragment part (starting at #) is cut away in the browser. Example: String urlText = "file:/home/me/eclipse/runtime-New_configuration/javaP/doc/p/A.html#foo()"; Program program = Program.findProgram("html"); program.execute(urlText); The url looks right until Program#gio_execute(*) calls OS.g_file_new_for_uri (fileNameBuffer). Maybe g_file_new_for_commandline_arg () would be better? Unlike bug 339655 on Cocoa, this is not completely wrong, but it's unexpected. On Windows 7, the fragment is passed to the browser as expected.