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

Open Declaration (F3) Option in the Right-Click Menu #393

Open
sigmaaa opened this issue Jan 21, 2025 · 1 comment
Open

Open Declaration (F3) Option in the Right-Click Menu #393

sigmaaa opened this issue Jan 21, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@sigmaaa
Copy link

sigmaaa commented Jan 21, 2025

At Espressif, we’ve received feedback that the "Open Declaration" feature is missing from the right-click menu in the CDT LSP editor. Many users are accustomed to using the right-click menu for this action and are unaware of the alternatives, such as Ctrl + Left Mouse Click or pressing F3.

I assume the absence of this option in the context menu might be due to the already crowded list of items, and perhaps the assumption that most users would intuitively use Ctrl + LMB or F3. Could you confirm if this is the case? Is there any plan to include this option in the right-click menu in the future?

In my attempt to address this on the Espressif-IDE side, I tried adding the command using the following extension configuration:

<extension
       point="org.eclipse.ui.menus">
    <menuContribution
          allPopups="true"
          locationURI="popup:#TextEditorContext?before=org.eclipse.ui.genericeditor.findReferences">
       <command
             commandId="org.eclipse.cdt.ui.edit.opendecl"
             style="push">
       </command>
    </menuContribution>
</extension>

However, I couldn’t locate the specific handler for the F3 or Ctrl + LMB functionality. The closest match I found was the org.eclipse.cdt.ui.edit.opendecl command, which appears to belong to the CDT plugin and might not be what I need.

Could you provide clarification on this or guidance on how to properly add this feature?

Thank you for your time and insights!

@sigmaaa sigmaaa changed the title Open Declaration (F3)" Option in the Right-Click Menu Open Declaration (F3) Option in the Right-Click Menu Jan 21, 2025
@ghentschke
Copy link
Contributor

Hi, thanks for the feedback.

I assume the absence of this option in the context menu might be due to the already crowded list of items, and perhaps the assumption that most users would intuitively use Ctrl + LMB or F3

You're right :-)
I think the fix should be relatively easy. I think you're on the right way. I hope to find some time in the next couple of days to look into this topic.

@ghentschke ghentschke added the enhancement New feature or request label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants