Notes for Plugin Development in Eclipse

@eclipse @plugin

Runtime Eclipse

Runtime Eclipse IDE: When developing within Eclipse, to debug you can start a Runtime Eclipse IDE for testing and debugging.

Run configuration: specifies which plug-ins to be used in the runtime instance. Defined via run configuration, features, or products. Select in context menu of the plugin development workspace:

Run as > Eclipse Application

And for debugging:

Debug as > Eclipse Application

Which takes the plugins from the workspace by default.

Using run configurations

Can be accessed:

Run > Run Configurations

Parameters:

  • consoleLog : errors to std out
  • nl : selects locale
  • console : access to OSGi console (what is that?)
  • noExit : keep OSGi open after crashing
  • clearPersistedState: Deletes cashed runtime changes of Eclipse 4 application model

Launch configurations for Eclipse RCP apps is created based on the product configuration file.

Every time you start the application via the product (what does that mean?), the launch configuration is updated.

Common bug: This leads to a common bug. If you use an existing run configuration, this might be outdated and create errors. Just always start your app via the product file.

Checklist:

  • Check if any plug-ins are missing in your product.

For feature-based product configuration: check if dependencies mentioned in the MANIFEST.MF file are included in your features. If not, add them to your features. For a plug-in based product, add them to your plugin.

Don't fix stuff in your run configuration itself, because it is derived every time anew from the product configuration. So fix that one instead.

Run configurations > Plug-ins (TAB) > Validate Plug-ins / Validate plug-ins automatically prior to launching

Q: what's the difference between feature based and plugin based project?

Definitions:

  • Plug-in : "the smallest deployable and installable software components of Eclipse"
  • Feature-project: basically a list of plugins and other features which can be understood as a logical separate unit
  • Product: a stand-alone program built with the Eclipse platform. A product may optionally be packaged and delivered as one or more features, which are simply groupings of plug-ins that are managed as a single entity by the Eclipse update mechanisms.

Summary: plugins can be grouped in features which can be packaged as an executable unit called product

https://stackoverflow.com/questions/2692048/what-are-the-differences-between-plug-ins-features-and-products-in-eclipse-rcp

Probably less relevant: http://www.vogella.com/tutorials/EclipseRCP/article.html

Exercise 1: Create plugin

Create new Plugin Project.

Q: what's the difference between selection "RCP application" yes or no?

Feature project: "During development you can add plug-ins to your runtime Eclipse via the launch configuration. To deploy your Eclipse IDE extensions you use typically features. To use these features also to select the plug-ins available in your runtime Eclipse you can use a custom product"

File > New > Other ... > Plug-in Development > Feature Project

You add a plug-in to the feature.

Validate: If you open feature.xml, you can check "Included Plug-Ins".

History Β· 5 changes since 2018-12-03

Full changelog