Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs with empty tabs (e.g. created from clipboard) cause problems with links handling #277

Open
Lerm opened this issue Dec 6, 2019 · 0 comments

Comments

@Lerm
Copy link

Lerm commented Dec 6, 2019

If JD GUI has some tabs with empty path (not bound to real files - e.g. tabs created from the clipboard), then they will prevent navigating to the right tab while clicking on the type link.

Test case:
0. Start JD-GUI.

  1. Open rt.jar from JDK in JD-GUI.
  2. Copy following text and paste it into JD-GUI - this should create new tab (e.g. 'clipboard-1.log') with such text:
    `` at java.lang.String.equals(String.class)
  3. Click on 'java.lang.String.equals' link in this newly created tab.
    ER: JD-GUI is navigated to the 'java/lang/String' class and 'equals' method in 'rt.jar' tab.
    AR: JD-GUI stays at the current tab ('clipboard-1.log') or navigates to the last tab created from clipboard instead of navigating to 'rt.jar'.

The problem seems to be related to the method TabbedPanel.showPage - it iterates through all existing tabs, checking whether tab path is at the beginning of the resolved URL path. However, tabs created from the clipboard have empty path, so they always match this check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant