eclipse.platform icon indicating copy to clipboard operation
eclipse.platform copied to clipboard

Convert "Terminal View" to only using E4 API

Open laeubi opened this issue 5 months ago • 10 comments

The just migrated Terminal View currently uses classic E3 contributions for its UI.

To make it usable in plain RCP4 Applications, we should migrate its usage of E3 to the E4 model also to prove the model / services are complete for migration of usual UI contributions.

FYI @ruspl-afed

laeubi avatar Jul 14 '25 07:07 laeubi

hm, now that you mention it, @laeubi , is this the reason there is no terminal in the IDE?

fedejeanne avatar Jul 14 '25 07:07 fedejeanne

Eclipse IDE uses "Legacy E4 Application" so it can use E3 and E4 in parallel for a "transition phase" :-)

Beside that EPPs contains a Terminal for a long time, and platform will ship it now as well see

  • https://eclipse.dev/eclipse/markdown/?f=news/4.37/platform.md#support-launching-with-a-terminal-console
  • https://eclipse.dev/eclipse/markdown/?f=news/4.37/platform_isv.md#terminal-view-and-connectors-are-now-available-from-platform

laeubi avatar Jul 14 '25 07:07 laeubi

Neat, thank you for the hint!

I added the terminal view and opened a console. I'll try to actively use it and report any findings :-)

For now I only see one small detail regarding the news --> https://github.com/eclipse-platform/www.eclipse.org-eclipse/pull/384

fedejeanne avatar Jul 14 '25 08:07 fedejeanne

@laeubi may be we can start from removing E3 IMemento We may try to replace it with E4 MContext in API, WDYT?

ruspl-afed avatar Jul 15 '25 07:07 ruspl-afed

Whatever seems sufficient, other quite obvious place would be registering Menu Contributions and the View itself... at best this would never need to surface to any API (I hope I made most of this internal).

laeubi avatar Jul 15 '25 07:07 laeubi

Very cool, will also have a look tomorrow.

vogella avatar Jul 15 '25 07:07 vogella

Whatever seems sufficient, other quite obvious place would be registering Menu Contributions and the View itself... at best this would never need to surface to any API (I hope I made most of this internal).

Here I mean an API type org.eclipse.terminal.view.ui.IMementoHandler

ruspl-afed avatar Jul 15 '25 07:07 ruspl-afed

Yes if possible start with anything that surfaces the API, I'm just not sure if there is a good E4 alternative for this. Looking in how it is used, we might better replace IMemento by an abstraction, it seems we just copy data from one side to the other here...

laeubi avatar Jul 15 '25 07:07 laeubi

Very cool, will also have a look tomorrow.

Lots of e3 API in usage, I assume migration will take significant effort. Best will be to hide an external API (if possible) as @laeubi suggested to allow such a transformation in the future.

vogella avatar Jul 16 '25 07:07 vogella

Lots of e3 API in usage, I assume migration will take significant effort.

I will now use this issue to explore ways to using AI agent support for this as it likely is a lot of boilerplate to do.

As a first step we need a consistent description on the "how to migrate steps" as I found it useful for Tycho migration with JSR330, but also for other users this is helpful. I therefore started with this one:

  • https://github.com/eclipse-platform/eclipse.platform.ui/pull/3417

once we have this in, I'll issue a first migration task to copilote and then we need to check:

  1. What is working
  2. What is missing
  3. What is not working and where we need to refine the recipe

After we have a quite good recipe, we can the apply this consequently to other parts in platform as well to finally bring the E4 story forward. @opcoach @vogella @ruspl-afed it would be good if you can help with review such PRs and give suggestions what might be done better and write these steps down.

laeubi avatar Oct 21 '25 04:10 laeubi