| Summary: | TextResult link with target=_blank doesn't work | ||
|---|---|---|---|
| Product: | [Tools] MAT | Reporter: | Kevin Grigorenko <kevin.grigorenko> |
| Component: | GUI | Assignee: | Andrew Johnson <andrew_johnson> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.1 | ||
| Target Milestone: | 1.11.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/158330 https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=348dd0093b71274c05876ce506d931535c0bc952 https://git.eclipse.org/r/158338 https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=54d17e445324cb2d4e23a50b0f9bc7e80a11cbef https://git.eclipse.org/r/158349 https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=89feb810a9a4f7e44a4b3dab80b680ae46e800d0 https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170912 https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=2cbee99cb302c2ac51bcb2197d64647daf1d0c8d |
||
| Whiteboard: | |||
For information, it works as expected on Windows 7 - the first one launches the page inside MAT, and the right click has a back option, the target="_blank" opens an external browser. (In reply to comment #1) > For information, it works as expected on Windows 7 - the first one launches the > page inside MAT, and the right click has a back option, the target="_blank" > opens an external browser. Ok, so this must be a problem with the Linux based browser integration All reports (e.g. leak suspects) have the following at the bottom right corner. I guess they have the same problem on Linux; Windows works fine. Created by <a href="http://www.eclipse.org/mat/" target="_blank">Eclipse Memory Analyzer</a> Yes, I just tested this on Fedora 31 and the issue still exists. I recently created a WAS and Java lab which includes Docker and allows Windows and Mac users to run a Linux VM on Docker with various WAS and Java tools: https://hub.docker.com/r/kgibm/fedorawasdebug This problem is reproducible with: 1) run the above docker image, 2) vnc into it, 3) double click MAT on the desktop, 4) open a heapdump from /opt/dockerdebug/fedorawasdebug/supplemental/exampledata/liberty/verbosegc_and_oom/*.phd, 5) run leak suspects, 6) click on the Eclipse Memory Analyzer link in the bottom right. See https://www.eclipse.org/forums/index.php/t/164766/ Possibly use: browser.addOpenWindowListener(new OpenWindowListener() New Gerrit change created: https://git.eclipse.org/r/158330 Gerrit change https://git.eclipse.org/r/158330 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=348dd0093b71274c05876ce506d931535c0bc952 New Gerrit change created: https://git.eclipse.org/r/158338 Gerrit change https://git.eclipse.org/r/158338 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=54d17e445324cb2d4e23a50b0f9bc7e80a11cbef The change didn't work on a Docker Ubuntu image. Clicking on the 'Created by Eclipse Memory Analyzer' link caused MAT to crash: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f4807785ddf, pid=24, tid=25 # # JRE version: OpenJDK Runtime Environment (11.0.6+10) (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1) # Java VM: OpenJDK 64-Bit Server VM (11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64) # Problematic frame: # C [libwebkit2gtk-4.0.so.37+0x87bddf] # # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # //hs_err_pid24.log # # If you would like to submit a bug report, please visit: # https://bugs.launchpad.net/ubuntu/+source/openjdk-lts # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # On the Welcome page, clicking on 'Memory Analyzer @ Eclipse.org' does work, and brings up Firefox. New Gerrit change created: https://git.eclipse.org/r/158349 Gerrit change https://git.eclipse.org/r/158349 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=89feb810a9a4f7e44a4b3dab80b680ae46e800d0 New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170912 Gerrit change https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170912 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=2cbee99cb302c2ac51bcb2197d64647daf1d0c8d I think I've now fixed it, by using org.eclipse.swt.program.Program.launch to launch the external browser. I've only tested running Ubuntu 18.04? and Fedora under Docker on Windows. Thanks Andrew! I confirmed it worked as well in a snapshot build. |
Build Identifier: I would like to add a link to a webpage in a TextResult (with html=true). If I add an <a href="">...</a> tag then, when clicked, the page is loaded in the existing tab which is awkward -- there is no way to go back (i.e. right click doesn't work -- I'm running on Linux). If I add target="_blank" then the link no longer works. Perhaps the default for a normal link should launch the user's default web browser instead? Reproducible: Always Steps to Reproduce: new TextResult("Click <a href=\"http://www.eclipse.org/\">here</a>", true);