Class AbstractDebuggerMaleSocket
- java.lang.Object
-
- jmri.jmrit.logixng.implementation.AbstractMaleSocket
-
- jmri.jmrit.logixng.tools.debugger.AbstractDebuggerMaleSocket
-
- All Implemented Interfaces:
PropertyChangeProvider
,Base
,Debugable
,MaleSocket
- Direct Known Subclasses:
DebuggerMaleAnalogActionSocket
,DebuggerMaleAnalogExpressionSocket
,DebuggerMaleDigitalActionSocket
,DebuggerMaleDigitalBooleanActionSocket
,DebuggerMaleDigitalExpressionSocket
,DebuggerMaleStringActionSocket
,DebuggerMaleStringExpressionSocket
public abstract class AbstractDebuggerMaleSocket extends AbstractMaleSocket
Abstract debugger male socket
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowException
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Debugable
Debugable.DebugConfig
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.MaleSocket
MaleSocket.ErrorHandlingType
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.logixng.implementation.AbstractMaleSocket
_localVariables
-
Fields inherited from interface jmri.jmrit.logixng.Base
PRINT_LINE_NUMBERS_FORMAT, PROPERTY_CHILD_COUNT, PROPERTY_CHILD_REORDER, PROPERTY_LAST_RESULT_CHANGED, PROPERTY_SOCKET_CONNECTED, PROPERTY_SOCKET_DISCONNECTED, SEPARATOR, SOCKET_CONNECTED, SOCKET_DISCONNECTED
-
-
Constructor Summary
Constructors Constructor Description AbstractDebuggerMaleSocket(BaseManager<? extends MaleSocket> manager, MaleSocket maleSocket)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
after()
protected void
before()
Debugable.DebugConfig
createDebugConfig()
Create a debug configuration for this male socket.protected void
disposeMe()
Disposes this object.abstract java.lang.String
getAfterInfo()
Get information about this action/expression after it is executed or evaluated.abstract java.lang.String
getBeforeInfo()
Get information about this action/expression before it is executed or evaluated.boolean
getBreakpointAfter()
boolean
getBreakpointBefore()
java.lang.String
getComment()
Get associated comment text.Debugable.DebugConfig
getDebugConfig()
Get the debug configuration for this male socket.boolean
getLogAfter()
boolean
getLogBefore()
protected boolean
isDebuggerActive()
boolean
isEnabled()
Determines whether this male socket is enabled.protected boolean
isLogAllAfter()
protected boolean
isLogAllBefore()
protected void
registerListenersForThisClass()
Register listeners if this object needs that.void
setBreakpointAfter(boolean value)
void
setBreakpointBefore(boolean value)
void
setComment(java.lang.String comment)
Set associated comment text.void
setDebugConfig(Debugable.DebugConfig config)
Set the debug configuration for this male socket.void
setEnabled(boolean enable)
Set whenether this male socket is enabled or disabled.void
setEnabledFlag(boolean enable)
Set whenether this male socket is enabled or disabled, without activating the male socket.void
setLogAfter(boolean value)
void
setLogBefore(boolean value)
void
setParent(Base parent)
Set the parent.void
setStepInto(boolean value)
protected void
unregisterListenersForThisClass()
Unregister listeners if this object needs that.-
Methods inherited from class jmri.jmrit.logixng.implementation.AbstractMaleSocket
addLocalVariable, addLocalVariable, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, clearLocalVariables, deepCopyChildren, dispose, getCatchAbortExecution, getCategory, getChild, getChildCount, getConditionalNG, getDeepCopy, getErrorHandlingType, getListen, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLocalVariables, getLogixNG, getLongDescription, getManager, getNumPropertyChangeListeners, getObject, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getRoot, getShortDescription, getSystemName, getUsageDetail, getUsageTree, getUserName, handleError, handleError, handleError, hasChild, isActive, isLocked, isSystem, printLocalVariable, printTree, printTree, printTree, printTreeRow, registerListeners, removePropertyChangeListener, removePropertyChangeListener, setCatchAbortExecution, setErrorHandlingType, setListen, setLocked, setParentForAllChildren, setSystem, setUserName, toString, unregisterListeners, updateListenerRef, vetoableChange
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.jmrit.logixng.Base
doSocketOperation, existsInTree, forEntireTree, forEntireTreeWithException, getLongDescription, getModule, getShortDescription, isSocketOperationAllowed, printTree, printTree
-
Methods inherited from interface jmri.jmrit.logixng.MaleSocket
find, isSupportingLocalVariables, setup
-
-
-
-
Constructor Detail
-
AbstractDebuggerMaleSocket
public AbstractDebuggerMaleSocket(BaseManager<? extends MaleSocket> manager, MaleSocket maleSocket)
-
-
Method Detail
-
getBeforeInfo
public abstract java.lang.String getBeforeInfo()
Get information about this action/expression before it is executed or evaluated.- Returns:
- an information string
-
getAfterInfo
public abstract java.lang.String getAfterInfo()
Get information about this action/expression after it is executed or evaluated.- Returns:
- an information string
-
isLogAllBefore
protected boolean isLogAllBefore()
-
isLogAllAfter
protected boolean isLogAllAfter()
-
isDebuggerActive
protected boolean isDebuggerActive()
-
before
protected void before()
-
after
protected void after()
-
setStepInto
public void setStepInto(boolean value)
-
setBreakpointBefore
public void setBreakpointBefore(boolean value)
-
getBreakpointBefore
public boolean getBreakpointBefore()
-
setBreakpointAfter
public void setBreakpointAfter(boolean value)
-
getBreakpointAfter
public boolean getBreakpointAfter()
-
setLogBefore
public void setLogBefore(boolean value)
-
getLogBefore
public boolean getLogBefore()
-
setLogAfter
public void setLogAfter(boolean value)
-
getLogAfter
public boolean getLogAfter()
-
registerListenersForThisClass
protected final void registerListenersForThisClass()
Description copied from class:AbstractMaleSocket
Register listeners if this object needs that.Important: This method may be called more than once. Methods overriding this method must ensure that listeners are not registered more than once.
- Specified by:
registerListenersForThisClass
in classAbstractMaleSocket
-
unregisterListenersForThisClass
protected final void unregisterListenersForThisClass()
Description copied from class:AbstractMaleSocket
Unregister listeners if this object needs that.Important: This method may be called more than once. Methods overriding this method must ensure that listeners are not unregistered more than once.
- Specified by:
unregisterListenersForThisClass
in classAbstractMaleSocket
-
disposeMe
protected final void disposeMe()
Description copied from class:AbstractMaleSocket
Disposes this object. This must remove _all_ connections!- Specified by:
disposeMe
in classAbstractMaleSocket
-
setEnabled
public final void setEnabled(boolean enable)
Description copied from interface:MaleSocket
Set whenether this male socket is enabled or disabled.This method must call registerListeners() / unregisterListeners().
- Parameters:
enable
- true if this male socket should be enabled, false otherwise
-
setEnabledFlag
public void setEnabledFlag(boolean enable)
Description copied from interface:MaleSocket
Set whenether this male socket is enabled or disabled, without activating the male socket. This is used when loading the xml file and when copying an item.This method must call registerListeners() / unregisterListeners().
- Parameters:
enable
- true if this male socket should be enabled, false otherwise
-
isEnabled
public final boolean isEnabled()
Description copied from interface:MaleSocket
Determines whether this male socket is enabled.- Returns:
- true if the male socket is enabled, false otherwise
-
setDebugConfig
public final void setDebugConfig(Debugable.DebugConfig config)
Description copied from interface:Debugable
Set the debug configuration for this male socket.Each implementation of MaleSocket has their own implementation of DebugConfig. Use reflection to get the proper class <package-name>.debug.<ClassName>Debug that returns a JPanel that can configure debugging for this male socket.
- Parameters:
config
- the new configuration or null to turn off debugging
-
getDebugConfig
public final Debugable.DebugConfig getDebugConfig()
Description copied from interface:Debugable
Get the debug configuration for this male socket.- Returns:
- the configuration or null if debugging is turned off for this male socket
-
createDebugConfig
public final Debugable.DebugConfig createDebugConfig()
Description copied from interface:Debugable
Create a debug configuration for this male socket.- Returns:
- the new configuration
-
getComment
public final java.lang.String getComment()
Description copied from interface:Base
Get associated comment text. A LogixNG comment can have multiple lines, separated with \n.- Specified by:
getComment
in interfaceBase
- Overrides:
getComment
in classAbstractMaleSocket
- Returns:
- the comment or null
-
setComment
public final void setComment(java.lang.String comment)
Description copied from interface:Base
Set associated comment text.Comments can be any valid text.
- Specified by:
setComment
in interfaceBase
- Overrides:
setComment
in classAbstractMaleSocket
- Parameters:
comment
- the comment or null to remove an existing comment
-
setParent
public void setParent(Base parent)
Description copied from interface:Base
Set the parent.The following rules apply
- ExecutionGroups has no parent. The method throws an UnsupportedOperationException if called.
- LogixNGs has the execution group as its parent.
- Expressions and actions has the male socket that they are connected to as their parent.
- Male sockets has the female socket that they are connected to as their parent.
- The parent of a female sockets is the LogixNG, expression or action that has this female socket.
- The parent of a male sockets is the same parent as the expression or action that it contains.
- Specified by:
setParent
in interfaceBase
- Overrides:
setParent
in classAbstractMaleSocket
- Parameters:
parent
- the new parent of this object
-
-