See Development Environment to use an IDE for development.
File
>
New
>
Others
>
Plugin Project
, then follow the wizard. Give a name
org.polarsys.capella.addonXX
for instance.
(There is some templates on the last page, but you can click on Finish after the second page).
org.eclipse.ui
org.polarsys.capella.core.model.helpers
org.polarsys.capella.core.model.handler
show only extensions point from requiring plugin
org.eclipse.ui.commands
,
org.eclipse.ui.menus
(when eclipse ask you to add them as dependencies, answer Yes)
plugin.xml
tab, you will see similar xml sections like in
Add a Menu
Command1Handler
in the sample sets the name of a System Function. In this class, you can manipulate capella model elements as you want. (see
command-handler and API
Edit an Element)
In the
Run
menu,
Debug Configuration
, double click on
Eclipse Application
. Ensure that
org.polarsys.capella.rcp.product
is selected in
Product to Run
in the right pane, then
Debug
it will launch a Capella in debug mode, with you new menu in it. If you click on an element of your model in the
Project Explorer
then menu shall appear.
File > Export > Plugin Development > Deployable plug-ins and fragments
to export it as a jar.
Note
File > Export > Java > JAR
will not export it as a valid plugin.
If you have several plugins, you can export the whole content by creating a
Feature
.
Feature Project
.
Included Plugins
, add the one you created
Overview
tab, you can click on
Exporting
>
Export Wizard
.
Of course, this is a first step, then you will have to create some automatic packaging, automatic tests, using Jenkins for instance
You can inspire from existing addons to see how it can be done :
Existing addons