Skip to content

Properly register ConsoleManager listeners on workbench windows#2456

Merged
iloveeclipse merged 1 commit intoeclipse-platform:masterfrom
iloveeclipse:issue_2455
Feb 16, 2026
Merged

Properly register ConsoleManager listeners on workbench windows#2456
iloveeclipse merged 1 commit intoeclipse-platform:masterfrom
iloveeclipse:issue_2455

Conversation

@iloveeclipse
Copy link
Member

ConsoleManager service is activated on
org.eclipse.terminal.view.ui.internal.UIPlugin.start(BundleContext) before workbench creates any window. This prevents that it can register his window & perspective listeners to any window and so it can't properly manage terminals if they are opened from multiple different terminal view instances existing in parallel.

This happens because terminal ui bundle contributes ExternalExecutablesState service that is activated very early at workbench startup, before window creation.

Beside this, ConsoleManager service, if ever connected to a window, would only listen to that single window events and would never support other windows.

Fixed both issues by moving window & perspective listener registration (and de-registration) of ConsoleManager service to already existing org.eclipse.terminal.view.ui.internal.listeners.AbstractWindowListener.

Fixes #2455

`ConsoleManager` service is activated on
`org.eclipse.terminal.view.ui.internal.UIPlugin.start(BundleContext)`
**before** workbench creates any window. This prevents that it can
register his window & perspective listeners to any window and so it
can't properly manage terminals if they are opened from multiple
different terminal view instances existing in parallel.

This happens because terminal ui bundle contributes
`ExternalExecutablesState` service that is activated very early at
workbench startup, **before** window creation.

Beside this, `ConsoleManager` service, if ever connected to a window,
would only listen to that single window events and would never support
other windows.

Fixed both issues by moving window & perspective listener registration
(and de-registration) of `ConsoleManager` service to already existing
`org.eclipse.terminal.view.ui.internal.listeners.AbstractWindowListener`.

Fixes eclipse-platform#2455
@laeubi
Copy link
Contributor

laeubi commented Feb 16, 2026

This happens because terminal ui bundle contributes ExternalExecutablesState service that is activated very early at workbench startup, before window creation.

Maybe the creation of the service should then be more lazy as well?

@iloveeclipse
Copy link
Member Author

Maybe the creation of the service should then be more lazy as well?

I haven't checked which services (there are three as of today) and how should be or should be not activated at which time in terminal view ui bundle. However, I saw that there was already AbstractWindowListener code added (probably for similar reason) which one could reuse there to fix the current issue without refactoring whole bundle.

I would prefer to have this small fix integrated in RC1, which shouldn't be a big deal. For the possible optimization of terminal services one can create a dedicated ticket to work on in next release.

@github-actions
Copy link
Contributor

Test Results

 1 977 files  ±0   1 977 suites  ±0   1h 35m 21s ⏱️ + 1m 30s
 4 743 tests ±0   4 719 ✅ ±0   24 💤 ±0  0 ❌ ±0 
14 229 runs  ±0  14 047 ✅ ±0  182 💤 ±0  0 ❌ ±0 

Results for commit 837f94d. ± Comparison against base commit 17eafa7.

@iloveeclipse
Copy link
Member Author

@laeubi : any objections to merge it for RC1?

@iloveeclipse iloveeclipse merged commit acd8d2e into eclipse-platform:master Feb 16, 2026
18 checks passed
@iloveeclipse iloveeclipse deleted the issue_2455 branch February 16, 2026 10:48
@iloveeclipse
Copy link
Member Author

Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Terminal] Opening a terminal with multiple Terminal Views does not work

2 participants

Comments