Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.editor.insight
Interface InsightProvider

All Known Subinterfaces:
SmartInsightProvider

public interface InsightProvider

The InsightProvider interface describes the public API available for the portion of Insight responsible for looking up Insight assistance information for the user. The search is based on the current caret position in the editor, the data of the document near the caret (and the document type.)

Results of the search for Insight information is returned by an InsightData instance, and displayed within an InsightView (also created by this class.) Currently, this implementation is limited to a single view for a given provider.

This same interface is used for "smart" InsightProvider implementations that provide a filtered or smarter data view based on the editor's context (or whatever additional criteria an implementation may choose to use.) Implementations that provide a "smart" InsightProvider must fulfill the following requirements:

As an example of the data toggling mentioned above, the user may perform the following sequence of events:

See Also:
AbstractInsight, Insight, InsightData, InsightView

Method Summary
 InsightData getInsightData(BasicEditorPane editorPane)
          Performs a search for insight information using the document and caret position in the given editor pane.
 InsightView getInsightView()
          Fetches an InsightView suitable for displaying data represented by an InsightData instance created by this provider.
 InsightData updateInsightData(BasicEditorPane editorPane, InsightData lastData)
          Requests an update of Insight information following a document or caret change in the editor.
 

Method Detail

getInsightData

InsightData getInsightData(BasicEditorPane editorPane)
Performs a search for insight information using the document and caret position in the given editor pane. If there is no insight information available, null should be returned.

Parameters:
editorPane - the editor for which we want to get Insight info
Returns:
the InsightData instance if data is found, or null if there is no Insight information available

updateInsightData

InsightData updateInsightData(BasicEditorPane editorPane,
                              InsightData lastData)
Requests an update of Insight information following a document or caret change in the editor. The Insight data from the last search or update is passed in lastData. If there is no insight information (maybe caret moved to different position), then null should be returned.

Parameters:
editorPane - the editor for which we want to update the info
lastData - the last InsightData found
Returns:
the InsightData instance of updated data, or null if there is no more Insight info available

getInsightView

InsightView getInsightView()
Fetches an InsightView suitable for displaying data represented by an InsightData instance created by this provider.

Returns:
the InsightView which can be used for display Insight data

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

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