org.nlogo.workspace
Class ExtensionManager

java.lang.Object
  extended by org.nlogo.workspace.ExtensionManager
All Implemented Interfaces:
ExtensionManager

public class ExtensionManager
extends Object
implements org.nlogo.compiler.ExtensionManager, ExtensionManager


Constructor Summary
ExtensionManager(AbstractWorkspace workspace)
           
 
Method Summary
 void addConfigurable(Configurable c)
           
 boolean anyExtensionsLoaded()
           
 void cleanUp()
           
 String dumpExtensionPrimitives()
          Returns a String describing all the loaded extensions.
 String dumpExtensions()
          Returns a String describing all the loaded extensions.
 String getAddendum()
           
 String getExternalFileSource(String filename)
           
 void importExtension(String extName, org.nlogo.compiler.ErrorSource errors)
           
 void initializeHubNet()
          Intializes the HubNetManager, this method should be called if the extension intends to use HubNet.
 String[] listExtensions()
           
 ExtensionObject readExtensionObject(String extName, String typeName, String value)
           
 Object readFromString(String source)
           
 Primitive replaceIdentifier(String name)
           
 void reset()
           
 String resolvePath(String path)
           
 String resolvePathAsURL(String path)
           
 Object retrieveObject()
          Returns the stored object.
 void storeObject(Object obj)
          Stores an object for the extension that can be retrieved in runOnce if the extension is loaded again.
 AbstractWorkspace workspace()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionManager

public ExtensionManager(AbstractWorkspace workspace)
Method Detail

workspace

public AbstractWorkspace workspace()

anyExtensionsLoaded

public boolean anyExtensionsLoaded()

getAddendum

public String getAddendum()

getExternalFileSource

public String getExternalFileSource(String filename)
                             throws IOException
Throws:
IOException

storeObject

public void storeObject(Object obj)
Description copied from interface: ExtensionManager
Stores an object for the extension that can be retrieved in runOnce if the extension is loaded again. This is useful if the extension has initialization it needs to perform that should only happen once, even if the extension is loaded multiple times.

Specified by:
storeObject in interface ExtensionManager
Parameters:
obj - the object to be stored

retrieveObject

public Object retrieveObject()
Description copied from interface: ExtensionManager
Returns the stored object.

Specified by:
retrieveObject in interface ExtensionManager
Returns:
the stored object

importExtension

public void importExtension(String extName,
                            org.nlogo.compiler.ErrorSource errors)
                     throws CompilerException
Throws:
CompilerException

addConfigurable

public void addConfigurable(Configurable c)

initializeHubNet

public void initializeHubNet()
Description copied from interface: ExtensionManager
Intializes the HubNetManager, this method should be called if the extension intends to use HubNet.

Specified by:
initializeHubNet in interface ExtensionManager

resolvePath

public String resolvePath(String path)

resolvePathAsURL

public String resolvePathAsURL(String path)

readFromString

public Object readFromString(String source)
Specified by:
readFromString in interface ExtensionManager

readExtensionObject

public ExtensionObject readExtensionObject(String extName,
                                           String typeName,
                                           String value)
Specified by:
readExtensionObject in interface ExtensionManager

replaceIdentifier

public Primitive replaceIdentifier(String name)

listExtensions

public String[] listExtensions()

dumpExtensions

public String dumpExtensions()
Returns a String describing all the loaded extensions.


dumpExtensionPrimitives

public String dumpExtensionPrimitives()
Returns a String describing all the loaded extensions.


reset

public void reset()

cleanUp

public void cleanUp()