Properly register ConsoleManager listeners on workbench windows#2456
Properly register ConsoleManager listeners on workbench windows#2456iloveeclipse merged 1 commit intoeclipse-platform:masterfrom
Conversation
`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
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 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. |
|
@laeubi : any objections to merge it for RC1? |
|
Thanks. |
ConsoleManagerservice is activated onorg.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
ExternalExecutablesStateservice that is activated very early at workbench startup, before window creation.Beside this,
ConsoleManagerservice, 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
ConsoleManagerservice to already existingorg.eclipse.terminal.view.ui.internal.listeners.AbstractWindowListener.Fixes #2455