com.borland.primetime.insight
Interface Insight


public interface Insight

One of two interfaces that must be implemented to create a CodeInsight implementation. For more details see com.borland.primetime.InsightFactory.

See Also:
com.borland.primetime.InsightFactory, com.borland.primetime.InsightManager

Method Summary
 java.lang.Object activate(EditorPane editPane, Context context, java.lang.Object option)
          Activates an insight instance for the given editor.
 java.lang.Object invoke(EditorPane editPane, int feature, int options, java.lang.Object param)
          Invokes the given CodeInsight feature.
 void release(EditorPane editPane)
          Called when the Insight is no longer needed.
 

Method Detail

invoke

public java.lang.Object invoke(EditorPane editPane,
                               int feature,
                               int options,
                               java.lang.Object param)
Invokes the given CodeInsight feature. This is the generic entry point where the feature being invoked is passed as a parameter. Implementations can provide a specific entry point for each feature as well.
Parameters:
editPane - The Editor pane where CodeInsight is being invoked.
feature - The feature id, as determined by getFeatureList().
options - Implementation dependent.
param - Implementation dependent.
Returns:
Implementation dependent. It is acceptable to return null.

activate

public java.lang.Object activate(EditorPane editPane,
                                 Context context,
                                 java.lang.Object option)
Activates an insight instance for the given editor. This allows the engine to to perform per-editor tasks, such as adding listeners to editor events.
Parameters:
editPane - The Editor pane where CodeInsight is being invoked.
option - Implementation dependent.
Returns:
Implementation dependent. It is acceptable to return null.

release

public void release(EditorPane editPane)
Called when the Insight is no longer needed. This allows the engine to clean up after itself, such as removing any listeners.