Instead of every object having to have its own custom information dialog, the Eclipse IDE provides a generic Properties view (in the org.eclipse.ui.views
plug-in), which can be used to show information about the currently selected object. The properties are discovered generically from an object and accessed through the IPropertySource
interface. This allows an object to provide an abstracted way of computing the fields shown in the property view.
The easiest way to create a property source is to let the object in question implement its own IPropertySource
interface. This works when the source code can be modified, but in many cases (such as the TimeZone
, or a Map.Entry
containing a String
key and a TimeZone
) the source code cannot be modified.
Open the
MANIFEST/META-INF.MF
of the plug-in, and addorg.eclipse.ui.views
as a dependency via the Dependencies tab, or by adding it to the bundles in theRequire-Bundle
entry. Without this, theIPropertySource
interface...