com.borland.primetime.insight
Class InsightManager

java.lang.Object
  |
  +--com.borland.primetime.insight.InsightManager

public class InsightManager
extends java.lang.Object

InsightManager manages the registration and instantiation of CodeInsight instances. Its responsibilities are:

  1. Registration of different implementations classes of Insight.
  2. Finding and an appropriate implementation of Insight.

See Also:
Insight, InsightFactory

Method Summary
 Insight getInsight(FileNode node)
          Find and instantiate an appropriate Insight implementation.
static InsightManager getInstance()
          Provides access to the Registry.
 void registerInsight(InsightFactory factory)
          Implementations of InsightFactory must call this during OpenTools initialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static InsightManager getInstance()
Provides access to the Registry. The constructor cannot be called directly. This is for enforcing the singleton pattern.

getInsight

public Insight getInsight(FileNode node)
Find and instantiate an appropriate Insight implementation.
Parameters:
node - The node that this Insight instance will handle.
Returns:
The newly created instance that can handle this type of node. When no suitable implementation is found, a reference to a stub implementation is returned. Null is never returned.

registerInsight

public void registerInsight(InsightFactory factory)
Implementations of InsightFactory must call this during OpenTools initialization.