Migrate commands from E3 to E4 in org.eclipse.terminal.view.ui bundle
- [x] Create E4 model fragment (fragment.e4xmi)
- [x] Register fragment in plugin.xml
- [x] Migrate commands to E4 model fragment
- [x] Convert handler classes to use E4 dependency injection
- [x] Update LaunchTerminalCommandHandler to E4
- [x] Update DisconnectTerminalCommandHandler to E4
- [x] Update MaximizeViewHandler to E4
- [x] Update QuickAccessHandler to E4
- [x] Update NewTerminalViewHandler to E4
- [x] Update MANIFEST.MF with required E4 dependencies
- [x] Remove E3 command and handler registrations from plugin.xml
- [x] Use E4 command services (ECommandService/EHandlerService) instead of PlatformUI
- [x] Run security scan with CodeQL
Summary:
Successfully migrated all commands and handlers from E3 to E4 in org.eclipse.terminal.view.ui bundle following the Eclipse 4 Migration Guide.
Latest Update: Updated QuickAccessHandler, MaximizeViewHandler, and NewTerminalViewHandler to use E4 command services (ECommandService and EHandlerService) via dependency injection instead of accessing ICommandService through PlatformUI singleton. This follows the proper E4 pattern for programmatic command execution.
Changes Made:
- Created
fragment.e4xmiwith E4 model definitions for 5 commands and their handlers - Registered the fragment in
plugin.xml - Updated
MANIFEST.MFto include E4 dependencies and Jakarta annotations/inject packages - Converted 5 handler classes to use E4 dependency injection with
@Executeand@CanExecuteannotations - Removed E3 command and handler registrations from
plugin.xml - Updated handlers to use ECommandService/EHandlerService for command execution
- Updated
build.propertiesto include the fragment file
Commands Migrated:
- org.eclipse.terminal.view.ui.command.launch
- org.eclipse.terminal.view.ui.command.launchConsole
- org.eclipse.terminal.view.ui.command.launchToolbar
- org.eclipse.terminal.view.ui.command.disconnect
- org.eclipse.terminal.view.ui.command.newview
Handlers Converted:
- LaunchTerminalCommandHandler (3 instances)
- DisconnectTerminalCommandHandler
- MaximizeViewHandler (now uses E4 services)
- QuickAccessHandler (now uses E4 services)
- NewTerminalViewHandler (now uses E4 services)
All command IDs are preserved to maintain backward compatibility.
Reference: https://github.com/eclipse-platform/eclipse.platform/issues/2042
Original prompt
Convert commands from E3 to E4 in bundle org.eclipse.terminal.view.ui
We have the E4 migration guide here https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/docs/Eclipse4_Migration.md
As described ther we want to migrate all commands from E3 to E4 in the mentioned bundle.
Reference but do not close https://github.com/eclipse-platform/eclipse.platform/issues/2042
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.