Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] Alphabetical sorting in Outline view


On Mon, Nov 15, 2021 at 8:55 PM Sebastian Thomschke <sebt.eclipse@xxxxxxxxxxxx> wrote:

Hi,

Hi,
 

I am interested in tying to implement https://bugs.eclipse.org/bugs/show_bug.cgi?id=564503 Can anyone give me some hints if this is actually possible at the scope of the lsp4e project? E.g. is there an extension point one can use to contribute a menu item or a sort button to the outline view used by lsp4e editors?

The outline is based on the Common Navigator Framework. It has extension points to add sorters: https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_navigator_navigatorContent.html&anchor=e.commonSorter . There is probably a sorter existing in Platform and that could be reused to sort alphabetically .
Once you have a sorter, you can try adding a button to the outline, using usual menu extension point: https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_cmd_menus.htm ; the related action can then enable the sorter or not programatically using the common navigator API or some other strategy.
--
Mickael Istria
Eclipse IDE developer, for Red Hat Developers

Back to the top