Project: Eclipse_Platform_UI
Bug 163461 [Field Assist] - API - ControlDecoration should work with image+text, not FieldDecoration
Reported: 2006-11-04 17:38:01 | Status: verified fixed

DecoratedField supported multiple decoration locations, so it was useful to expose a data structure that referred to a particular decoration. Hence FieldDecoration was defined. It is just an image+text data structure, but was useful for asking DecoratedField to "do things" to a particular decoration, such as hiding it, showing it, updating it, etc. The initial API for ControlDecoration also supported FieldDecoration, in an attempt to "explain itself" as being similar to DecoratedField. However, since a ControlDecoration only shows one decoration, there's not really a need for the image+text to have any kind of identity. It would be better if the ControlDecoration API worked in terms of having an image and a description text. Clients could still use FieldDecorations and the registry if desired, but the API shouldn't require it, since it's trivial to pull the image and text out of a decoration and feed it to ControlDecoration.

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java examples/org.eclipse.ui.examples.fieldassist/Eclipse UI Examples Field Assist/org/eclipse/ui/examples/fieldassist/ControlDecorationTestDialog.java