Add Eclipse 4 Commands documentation and migration guide #3419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Adds comprehensive documentation for calling commands programmatically in Eclipse 4 (E4) applications and migrating from Eclipse 3.x command execution patterns.
Changes
New Documentation:
docs/Eclipse4_Commands.mdCreated a complete guide for programmatically calling commands in E4 applications, covering:
Map<String, Object>All code examples are based on actual Eclipse Platform UI source code (e.g.,
PerspectiveSwitcher.java,LegacyHandlerService.java) to ensure technical accuracy.Example from the new documentation:
Enhanced Migration Guide:
docs/Eclipse4_Migration.mdAdded a new section "Migrate Programmatic Command Execution" that provides:
E3 to E4 Migration Example:
ICommandServiceECommandServiceIHandlerServiceEHandlerServicegetSite().getService()@InjectannotationgetCommand()+new ParameterizedCommand()createCommand()Parameterization[]arrayMap<String, Object>executeCommand()executeHandler()Cross-References Added
docs/Eclipse4_RCP_FAQ.md(Commands and Handlers section)docs/Eclipse4_RCP_EAS_List_of_All_Provided_Services.mdMotivation
As noted in the issue, Eclipse Platform UI was missing clear documentation on how to programmatically call commands using the E4 approach. Developers needed guidance on:
ECommandServiceandEHandlerServiceinstead of the E3 servicesThis documentation provides developers with practical, copy-paste ready examples and comprehensive migration guidance.
References
Fixes eclipse-platform/eclipse.platform.ui#XXXX
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.