public abstract class KahinaInstance<S extends KahinaState,G extends KahinaGUI,B extends KahinaBridge,P extends KahinaProject> extends java.lang.Object implements KahinaListener
Modifier and Type | Field and Description |
---|---|
protected B |
bridge |
java.util.List<KahinaPerspective> |
defaultPerspectives |
java.util.List<P> |
defaultProjects |
protected G |
gui |
protected KahinaController |
instanceControl
GUI and views listen to this controller.
|
protected KahinaLogger |
logger |
protected P |
project |
java.util.List<KahinaPerspective> |
recentPerspectives |
java.util.List<P> |
recentProjects |
protected KahinaController |
sessionControl
Everything else (e.g.
|
protected S |
state |
protected ObjectMagazine<KahinaStep> |
steps |
protected static boolean |
VERBOSE |
Constructor and Description |
---|
KahinaInstance() |
Modifier and Type | Method and Description |
---|---|
protected abstract B |
createBridge() |
protected abstract G |
createGUI() |
protected abstract P |
createNewProject() |
protected abstract S |
createState() |
protected abstract void |
createTreeBehavior() |
void |
deregisterInstanceListener(java.lang.String type,
KahinaListener listener) |
void |
deregisterSessionListener(java.lang.String type,
KahinaListener listener) |
void |
dispatchEvent(KahinaEvent e) |
void |
dispatchInstanceEvent(KahinaEvent e) |
void |
dispatchSessionEvent(KahinaEvent e) |
protected void |
fillViewRegistry()
overwrite this to register views for user-defined datatypes MUST register
views for all data types use super.fillViewRegistry() in implementations
to register most basic views
|
java.lang.String |
getApplicationName() |
KahinaBridge |
getBridge() |
G |
getGUI() |
KahinaLogger |
getLogger() |
P |
getProject() |
KahinaProjectStatus |
getProjectStatus() |
S |
getState() |
protected void |
initializeNewSession(boolean withBridge) |
protected KahinaPerspective |
loadPerspective(java.io.InputStream stream) |
abstract P |
loadProject(java.io.File file) |
void |
newProject(java.io.File grammarFile,
java.lang.String name) |
protected abstract void |
preparePerspectiveLists() |
protected abstract void |
prepareProjectLists() |
void |
processEvent(KahinaEvent e) |
protected void |
processNewProject() |
protected void |
processProjectEvent(KahinaProjectEvent e) |
void |
registerInstanceListener(java.lang.String type,
KahinaListener listener) |
protected void |
registerRecentPerspective(KahinaPerspective psp) |
protected void |
registerRecentProject(P prj) |
void |
registerSessionListener(java.lang.String type,
KahinaListener listener) |
void |
saveProjectAs(java.io.File projectFile) |
void |
setProjectStatus(KahinaProjectStatus projectStatus) |
void |
start(java.lang.String[] args)
Writing a main method for a Kahina-based debugging environment is simple:
just create an instance of your KahinaInstance subclass and pass its
start method the arguments.
|
B |
startNewSession() |
void |
startNewSessionWithoutBridge() |
protected static final boolean VERBOSE
protected S extends KahinaState state
protected B extends KahinaBridge bridge
protected P extends KahinaProject project
public java.util.List<KahinaPerspective> recentPerspectives
public java.util.List<KahinaPerspective> defaultPerspectives
public java.util.List<P extends KahinaProject> recentProjects
public java.util.List<P extends KahinaProject> defaultProjects
protected ObjectMagazine<KahinaStep> steps
protected final KahinaController instanceControl
protected KahinaController sessionControl
protected KahinaLogger logger
protected abstract void preparePerspectiveLists()
protected abstract void prepareProjectLists()
public void startNewSessionWithoutBridge()
public B startNewSession()
protected void initializeNewSession(boolean withBridge)
public void registerSessionListener(java.lang.String type, KahinaListener listener)
public void registerInstanceListener(java.lang.String type, KahinaListener listener)
public void deregisterSessionListener(java.lang.String type, KahinaListener listener)
public void deregisterInstanceListener(java.lang.String type, KahinaListener listener)
protected abstract void createTreeBehavior()
protected abstract S createState()
protected abstract G createGUI()
protected abstract B createBridge()
protected abstract P createNewProject()
public S getState()
public void setProjectStatus(KahinaProjectStatus projectStatus)
public KahinaProjectStatus getProjectStatus()
protected void fillViewRegistry()
public void dispatchEvent(KahinaEvent e)
public void dispatchSessionEvent(KahinaEvent e)
public void dispatchInstanceEvent(KahinaEvent e)
public void processEvent(KahinaEvent e)
processEvent
in interface KahinaListener
protected void processProjectEvent(KahinaProjectEvent e)
protected void processNewProject()
protected KahinaPerspective loadPerspective(java.io.InputStream stream)
protected void registerRecentPerspective(KahinaPerspective psp)
protected void registerRecentProject(P prj)
public void start(java.lang.String[] args)
args
- public KahinaBridge getBridge()
public java.lang.String getApplicationName()
public P getProject()
public KahinaLogger getLogger()
public void newProject(java.io.File grammarFile, java.lang.String name)
public void saveProjectAs(java.io.File projectFile)
public abstract P loadProject(java.io.File file)
public G getGUI()