- Eclipse Plug-in Development:Beginner's Guide(Second Edition)
- Dr Alex Blewitt
- 299字
- 2021-07-14 10:36:35
Time for action – installing the E4 tools
A model fragment needs to be created to add commands and handlers into an E4 plug-in or application. This can be created with the E4 tools that are part of the default Eclipse repository for Eclipse Mars and Eclipse Neon, or can be installed from the E4 page for Luna and below versions.
- Go to the Help | Install New Software… menu. For Eclipse Mars, Eclipse Neon and later, choose the http://download.eclipse.org/releases/neon/ site, substituting the platform name if necessary. For Eclipse Luna and below, choose the corresponding update site from the http://download.eclipse.org/e4/downloads/ page instead.
- Type
e4 tools
into the search box and select the Eclipse e4 Tools feature: - Click on Finish to continue installing the tools and restart Eclipse when prompted.
- To verify that the tools have been installed correctly, select the
com.packtpub.e4.clock.ui
project, go to the File | New menu, and search fornew model fragment
. This should show an entry under Eclipse 4 | Model | New Model Fragment: - Click on Next and choose the
com.packtpub.e4.clock.ui
as the container withfragment.e4xmi
as the filename. - The
plugin.xml
should have a new fragment entry:<extension id="com.packtpub.e4.clock.ui.fragment" point="org.eclipse.e4.workbench.model"> <fragment uri="fragment.e4xmi"/> </extension>
What just happened?
The Eclipse E4 tools are used to create application fragments that allow E4 content to be created and hosted in a plug-in. The E4 tools have been present in the default update site since Eclipse Mars.
An E4 application fragment is stored in another XML file, linked to from the plugin.xml
file. Although it is possible to have multiple fragments in a single plug-in, it's more common to have only a single fragment per plug-in. The default fragment name is fragment.e4xmi
, but other names with the e4xmi
extension can be used instead, provided that the reference from the plugin.xml
points to the file.
- Vue 3移動Web開發與性能調優實戰
- Docker進階與實戰
- vSphere High Performance Cookbook
- 碼上行動:零基礎學會Python編程(ChatGPT版)
- Production Ready OpenStack:Recipes for Successful Environments
- 你不知道的JavaScript(中卷)
- Java實戰(第2版)
- 微信小程序開發與實戰(微課版)
- OpenCV with Python By Example
- Machine Learning With Go
- Building Business Websites with Squarespace 7(Second Edition)
- Qt 4開發實踐
- Wearable:Tech Projects with the Raspberry Pi Zero
- PHP動態網站開發實踐教程
- 第五空間戰略:大國間的網絡博弈