Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
12c (12.1.3)

E41664-01

Package oracle.ide.inspector

Contains interfaces and classes that integrators may use to make their objects editable from the property inspector.

See: Description

Package oracle.ide.inspector Description

Contains interfaces and classes that integrators may use to make their objects editable from the property inspector.

The InspectorWindow displays the properties of the selected object(s) of the active View.  As the selection within the active View changes (e.g. from obj1 to obj2), the InspectorWindow will refresh to display the properties of the new selection (e.g. obj2) providing that the underlying data meets one of the following conditions:

Likewise, as changes to the selected object are applied from either the InspectorWindow or from any other Editor (e.g. change background property from red to blue), the property value displayed in the InspectorWindow  (e.g. background) is immediately updated to reflect those changes.

The collection of available properties upon a given type are described by a PropertyModel.  A PropertyModel is made available from the Inspectable implementation associated with that type.  The Inspectable implementation for that type is registered with the InspectorFactory.

In the simplest case, the collective Inspectable instances, one for each object in the current selection where the selection is made of one or more objects of similar or dissimilar typess, are wrapped inside of a MultiInspectable.  The MultiInspectable in turn wraps the collection of PropertyModel instances, one from each Inspectable, into an IdePropertyModel.  The MultiInspectable is ultimately the object that is handed to the InspectorWindow and its IdePropertyModel is the model used for display.

In the case where a given data type is known to only ever be selectable in conjunction with other instances of that data type (i.e. it can be stated with certainty that instances of the data type will never appear in a selection with instances of any other data type, as might be the case from an Editor that only ever operates on private tokens of its own construction, a single Inspectable may be used to represent the entire selection.  In such cases, an InspectableFactory may be registered that provides the single Inspectable instance based upon a given Context.  The PropertyModel of the single Inspectable is still wrapped inside of an IdePropertyModel by the MultiInspectable for handing off to the InspectorWindow as described in the simplest case above.

Default implementations of PropertyModel and Inspectable are provided by the framework where the default Inspectable returns an instance of the default PropertyModel.  In the simplest case, integrators need only ensure that their underlying data implements SupportsInspection in order for it to participate in property inspection.  If the underlying data cannot be made to implement SupportsInspection, or it is undesirable to do so for some other reason, integrators may still simply register DefaultInspectable for their data type as would have been the case if the data type had implemented SupportsInspection.

The default implementation of PropertyModel, DefaultModel, uses the JavaBeans design pattern for determining the properties of the underlying data type.  It is important to note that the underlying data referred to above is that returned from Element.getData(), not the Element itself, where the Element(s) are those found in Context.getSelection() and the Context is the result of View.getContext() called upon the active View in response to a ViewSelectionEvent.

The activity flow is as follows:

  1. InspectorWindow receives a ViewSelectionEvent  describing a change of selection in the active View.
  2. InspectorWindow fetches Context from the active View.
  3. InspectorWindow asks InspectorFactory for a MultiInspectable for the Context received from the View.
  4. InspectorFactory constructs a MultiInspectable with the Context.
  5. MultiInspectable asks InspectorFactory for a single Inspectable capable of handling the entire selection of the Context.
  6. InspectorFactory looks for a registered InspectableFactory capable of handling the Context.  If found, returns to the MultiInspectable the Inspectable provided by the InspectableFactory.  Otherwise, returns null.
  7. Upon receiving an Inspectable for the entire selection back from the InspectorFactory, the MultiInspectable wraps the PropertyModel provided by that Inspectable into an IdePropertyModel.  The MultiInspectable is now ready to be returned by the InspectorFactory to the calling InspectorWindow.
  8. Otherwise, MultiInspectable iterates through the selection of the Context and asks the InspectorFactory for a separate Inspectable for each Element in the selection.
  9. The InspectorFactory will call getData upon the given Element and look for a registered Inspectable for that type (e.g. if the result of Element.getData() was an instance of MyData it would determine whether MyData was itself an Inspectable or whether an Inspectable has been explicitly registered for MyData).  If the data type is not itself an Inspectable and no Inspectable has been explicitly registered for the data type but the data type does implement SupportsInspection,  then an instance of DefaultInspectable is returned.
  10. Upon receiving any Inspectable for each of the selected objects back from the InspectorFactory, the MultiInspectable wraps each of their PropertyModel instances collectively into a single IdePropertyModel.  The MultiInspectable is now ready to be returned by the InspectorFactory to the calling InspectorWindow.
  11. Upon receiving the MultiInspectable from the InspectorFactory, the InspectorWindow will construct a PropertyInspector page initialized with the IdePropertyModel of the MultiInspectable to display the properties of the inspectable selection.  If the MultiInspectable represents a single Inspectable instance, the InspectorWindow will also display any additional pages provided by that Inspectable's getAdditionalTabPages method.  The same condition applies for the display of any Customizer.
If the default implementation of PropertyModel is not sufficient, integrators are encouraged to extend DefaultModel.  The integrator would then have to implement an Inspectable (extending DefaultInspectable is encouraged) which returned an instance of that model..  That Inspectable would then have to be registered with the InspectorFactory for the applicable data type.

Related Documentation

See Extending JDeveloper Using the Addin API for detailed information.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
12c (12.1.3)

E41664-01

Copyright © 1997, 2014, Oracle. All rights reserved.