Skip to content

Navigating to class, show class in java project in the center #2868

Closed as not planned

Description

@rajinder-yadav

Type: Feature Request

I notced when I control click on a class/symbol to view its defintion. In "Java Projects" tree view, the class is always shown at the bottom. Would be nice to scroll it to the center.

class-view

Extension version: 1.13.0
VS Code version: Code - Insiders 1.75.0-insider (11238faea62d570d77afe6edfe05c8b732c44a2b, 2022-12-13T05:22:26.937Z)
OS version: Linux x64 6.1.3-1-default
Modes:
Sandboxed: Yes

Activity

  1. jdneo commented on Jan 11, 2023

    @jdneo
    Collaborator

    Unfortunately, the VS Code API does not allow extensions to control where should the node be displayed: https://github.com/microsoft/vscode/blob/6674e482a2aba74b5dd9e309cd35260e9acded6b/src/vscode-dts/vscode.d.ts#L10639.

  2. rajinder-yadav commented on Jan 11, 2023

    @rajinder-yadav
    Author

    Why can't vscode then show the node in the center as default? It doesn't need to be told.

  3. jdneo commented on Jan 11, 2023

    @jdneo
    Collaborator

    IDK, it's not our decision. But I think it should be fine to file an issue at VS Code's repo for discussion.

  4. nickzhums commented on Jan 11, 2023

    @nickzhums
    Contributor

    @rajinder-yadav feel free to raise this issue to https://github.com/microsoft/vscode as mentioned, the discussion belongs there as we don't have control over this behavior

  5. rajinder-yadav commented on Jan 11, 2023

    @rajinder-yadav
    Author

    I see this bug is marked upstream, so should someone from the team deal with this? The way I see it, you're missing a needed API, so it makes more sense for a team member to request this functionality to close the bug off.

  6. nickzhums commented on Jan 11, 2023

    @nickzhums
    Contributor

    I would not classify this is a "bug". A bug is something causes an expected crash or something broken, but in this case, you can still work with your project. Since our extension was never given the control of this behavior, things are working as expected. Rather, this is something you find that it is inconvenient to your user experience, like we mentioned, this is something that is out of our control and this the first time an user reported this. Therefore, I think the correct course of action is to directly report this issue to the VS Code repo

  7. rajinder-yadav commented on Jan 11, 2023

    @rajinder-yadav
    Author

    I mispoke :) ... I submitted another bug to which @jdneo said the plugin can't control the treeview, so I confused the two.
    With respect to this "feature" request I will give your suggestion a try.

  8. rajinder-yadav commented on Jan 11, 2023

    @rajinder-yadav
    Author

    I've opened a feature request: microsoft/vscode#171062

  9. fbricon commented on Feb 16, 2026

    @fbricon
    Collaborator

    Closing as out-of-scope since the Java project view is provided by the Project Manager for Java extension, so tickets should be opened at https://github.com/Microsoft/vscode-java-dependency/issues.

    The fact microsoft/vscode#171062 was closed as "Not planned" doesn't give me much hope it can be fixed though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions