Bug 521986 - Provide menus for lsp4e like JDT does
Summary: Provide menus for lsp4e like JDT does
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LSP4E (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 549348
Blocks:
  Show dependency tree
 
Reported: 2017-09-07 07:07 EDT by Angelo ZERR CLA
Modified: 2022-02-04 09:12 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angelo ZERR CLA 2017-09-07 07:07:55 EDT
When JDT Java Editor is opened, menus on top of the IDE are updated which provide the features that you can do (ex: "Source / Format", "refactor / Rename").

I create this issue, but perhaps we should create an issue per feature. Here a list of menus for lsp4e but perhaps I miss some menu:

 * Source 
   * Format
 * Refactor
    * Rename
 * Navigate
   * Open Symbol
   * Open Hyperlink
 * Search
   * References
      * Project

Once we will have thoses menus, other plugins like tm4e (with language configuration) could contribute with "Source / Toggle Comment", etc
Comment 1 Mickael Istria CLA 2017-09-07 08:46:45 EDT
Ideally, it would be great to see such commands/menus provided directly by Platform and letting LSP4E and others simply bind a handler.
I agree with taking JDT as example, bUT i'm not a big fan of a single-child menu item: why Source > Format instead of just Format, Refactor > Rename instead of Rename...? That doesn't save any space nor time to the user, on the contrary.
Comment 2 Vlad Dumitrescu CLA 2017-09-07 09:16:08 EDT
Well, there are several other operations that can be put under 'source' and 'refactor' and we don't want a super-long context menu if there are ten of each, right? For consistency, the top level should remain the same even if there is only one child.

[If one-child menus are a big problem, I'd argue that the platform should handle that and remove the top level in such a case. Bu I'm sure this could create more problems than it solves]
Comment 3 Mickael Istria CLA 2017-09-07 10:31:54 EDT
(In reply to Vlad Dumitrescu from comment #2)
> Well, there are several other operations that can be put under 'source' and
> 'refactor' and we don't want a super-long context menu if there are ten of
> each, right?

Let's just wait for such menus to be crowded before making them recursive.

> For consistency, the top level should remain the same even if
> there is only one child.

I disagree with that. Less things to read for user = more usability.
Comment 4 Vlad Dumitrescu CLA 2017-09-07 10:45:55 EDT
(In reply to Mickael Istria from comment #3)
> (In reply to Vlad Dumitrescu from comment #2)
> > Well, there are several other operations that can be put under 'source' and
> > 'refactor' and we don't want a super-long context menu if there are ten of
> > each, right?
> 
> Let's just wait for such menus to be crowded before making them recursive.

My Erlang plug-in (not yet LSP-ized) already has three operations under 'source' ('toggle comment', 'indent' or 'format', 'generate documentation') and the 'refactor' list is so long that it has its own top-level menu. So for me it would be nice to be able to keep these operations together.
Comment 5 Eclipse Genie CLA 2019-07-10 02:07:08 EDT
New Gerrit change created: https://git.eclipse.org/r/145746
Comment 6 Eclipse Genie CLA 2019-07-10 02:07:11 EDT
New Gerrit change created: https://git.eclipse.org/r/145747
Comment 7 Lakshminarayana CLA 2019-07-10 02:13:59 EDT
(In reply to Eclipse Genie from comment #6)
> New Gerrit change created: https://git.eclipse.org/r/145747

(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/145746

Added format menu into Source -> 
Added two groups separators like a JDT menu.
Comment 8 Eclipse Genie CLA 2019-07-15 09:44:14 EDT
New Gerrit change created: https://git.eclipse.org/r/146087
Comment 9 Eclipse Genie CLA 2019-07-31 08:12:24 EDT
New Gerrit change created: https://git.eclipse.org/r/146854
Comment 10 Mickael Istria CLA 2021-11-16 15:56:35 EST
Eclipse LSP4E is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/lsp4e/issues/ instead. If this issue is relevant to you, your action is required.
0. Verify this issue is still happening with latest LSP4E snapshots (from https://download.eclipse.org/lsp4e/snapshots )
  if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done
  if issue is still present with snapshots:
* Create a new issue at https://github.com/eclipse/lsp4e/issues/
  ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  ** In the GitHub description, start with a link to this bugzilla ticket
  ** Optionally add new content to the description if it can helps towards resolution
  ** Submit GitHub issue
* Update bugzilla ticket
  ** Add to "See also" property (up right column) the link to the newly created GitHub issue
  ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  ** Set status as CLOSED MOVED
  ** Submit

All issues that remain open will be automatically closed soon. Then the Bugzilla component for LSP4E will be archived and made read-only.