com.borland.primetime.insight
Interface InsightFactory
- public interface InsightFactory
One of two interfaces that must be implemented to create a
CodeInsight implementation. The Insight class provides the actual
handler for CodeInsight functionality. The InsightFactory class
returns information about the implementation, and manages loading of the
Insight class, which does the actual work when CodeInsight is invoked.
Implementations should keep InsightFactory as small and fast loading as
possible, so as not to slow down IDE startup time. Expensive operations
should be deferred until the implementation is actually invoked, and
code should be in a separate class that does not get loaded during
OpenTools initialization.
The responsibilities of an InsightFactory implementation are:
- Include itself in OpenTools initialization.
- Registering with InsightManager during OpenTools initialization,
by calling the registerInsight method of
com.borland.primetime.insight.InsightManager.
- Report whether a given node-type is supported by the
implementation.
- Return a list of features provided by this implementation.
- Create instances of the implementation.
- Perform other implementation-dependent tasks, such as initialization,
caching, etc.
- Provide OpenTools addins that register the keystrokes necessary to
invoke the implementation.
- See Also:
Insight
,
InsightManager
getInsight
public Insight getInsight(FileNode node)
- Returns a new instance of the associated Insight class
for this implementation.
- Parameters:
node
- The node that this Insight instance will handle.- Returns:
- The newly created instance of this implementation.
getFeatures
public InsightFactory.InsightFeature[] getFeatures()
- Returns the list of features in this implementation of CodeInsight.
E.g. the Java implementation will have ParameterInsight, MemberInsight
and ClassInsight.
- Returns:
- Array containing the list of features.
- See Also:
InsightFactory.InsightFeature
isSupported
public boolean isSupported(FileNode node)
- Determines whether the given content is supported by this implementation.
- Parameters:
contentType
- The content type, in mime format, e.g. "text/java"