Extension SDK 10.1.2

oracle.javatools.editor.insight
Interface InsightProvider


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.

See Also:
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

public 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

public 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

public 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

Extension SDK

 

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