Skip to content

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

Open
@Lerm

Description

@Lerm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions