com.aptana.ide.debug.internal.core.model
Class JSDebugWatchpoint

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.debug.core.model.Breakpoint
          extended by com.aptana.ide.debug.internal.core.model.JSDebugWatchpoint
All Implemented Interfaces:
IJSWatchpoint, org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IBreakpoint, org.eclipse.debug.core.model.IWatchpoint

public class JSDebugWatchpoint
extends org.eclipse.debug.core.model.Breakpoint
implements IJSWatchpoint

Author:
Max Stepanov

Field Summary
protected static java.lang.String ACCESS
          Watchpoint attribute storing the access value (value "com.aptana.ide.debug.core.watchpoint.access").
protected static java.lang.String MODIFICATION
          Watchpoint attribute storing the modification value (value "com.aptana.ide.debug.core.watchpoint.access").
 
Fields inherited from interface org.eclipse.debug.core.model.IBreakpoint
BREAKPOINT_MARKER, ENABLED, ID, LINE_BREAKPOINT_MARKER, PERSISTED, REGISTERED
 
Constructor Summary
JSDebugWatchpoint()
          Default constructor is required for the breakpoint manager to re-create persisted breakpoints.
JSDebugWatchpoint(org.eclipse.core.resources.IResource resource, java.lang.String variableName, java.util.Map attributes, boolean register)
          Constructs a exception breakpoint on the given resource for the given exception type name.
JSDebugWatchpoint(org.eclipse.debug.core.model.IVariable variable)
          Constructs a watchpoint for the given variable.
JSDebugWatchpoint(java.lang.String variableName)
          Constructs a watchpoint for the given variable name.
 
Method Summary
 java.lang.String getModelIdentifier()
           
 java.lang.String getVariableName()
          Returns the name of the variable associated with this watchpoint
 boolean isAccess()
           
 boolean isModification()
           
 void setAccess(boolean access)
           
 void setModification(boolean modification)
           
 boolean supportsAccess()
           
 boolean supportsModification()
           
 
Methods inherited from class org.eclipse.debug.core.model.Breakpoint
delete, ensureMarker, equals, getMarker, getMarkerRule, getMarkerRule, hashCode, isEnabled, isPersisted, isRegistered, markerExists, run, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setEnabled, setMarker, setPersisted, setRegistered
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.debug.core.model.IBreakpoint
delete, getMarker, isEnabled, isPersisted, isRegistered, setEnabled, setMarker, setPersisted, setRegistered
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

ACCESS

protected static final java.lang.String ACCESS
Watchpoint attribute storing the access value (value "com.aptana.ide.debug.core.watchpoint.access"). This attribute is stored as a boolean, indicating whether a watchpoint is an access watchpoint.

See Also:
Constant Field Values

MODIFICATION

protected static final java.lang.String MODIFICATION
Watchpoint attribute storing the modification value (value "com.aptana.ide.debug.core.watchpoint.access"). This attribute is stored as a boolean, indicating whether a watchpoint is a modification watchpoint.

See Also:
Constant Field Values
Constructor Detail

JSDebugWatchpoint

public JSDebugWatchpoint()
Default constructor is required for the breakpoint manager to re-create persisted breakpoints. After instantiating a breakpoint, the setMarker(...) method is called to restore this breakpoint's attributes.


JSDebugWatchpoint

public JSDebugWatchpoint(java.lang.String variableName)
                  throws org.eclipse.core.runtime.CoreException
Constructs a watchpoint for the given variable name.

Parameters:
variableName -
Throws:
org.eclipse.core.runtime.CoreException - if unable to create the breakpoint

JSDebugWatchpoint

public JSDebugWatchpoint(org.eclipse.debug.core.model.IVariable variable)
                  throws org.eclipse.core.runtime.CoreException
Constructs a watchpoint for the given variable.

Parameters:
variable -
Throws:
org.eclipse.core.runtime.CoreException - if unable to create the breakpoint

JSDebugWatchpoint

public JSDebugWatchpoint(org.eclipse.core.resources.IResource resource,
                         java.lang.String variableName,
                         java.util.Map attributes,
                         boolean register)
                  throws org.eclipse.core.runtime.CoreException
Constructs a exception breakpoint on the given resource for the given exception type name.

Parameters:
resource - file on which to set the breakpoint
exceptionTypeName -
attributes - the marker attributes to set
register - whether to add this breakpoint to the breakpoint manager
Throws:
org.eclipse.core.runtime.CoreException - if unable to create the breakpoint
Method Detail

getVariableName

public java.lang.String getVariableName()
                                 throws org.eclipse.core.runtime.CoreException
Description copied from interface: IJSWatchpoint
Returns the name of the variable associated with this watchpoint

Specified by:
getVariableName in interface IJSWatchpoint
Returns:
field the name of the variable on which this watchpoint is installed
Throws:
org.eclipse.core.runtime.CoreException - if unable to access the property on this breakpoint's underlying marker
See Also:
IJSWatchpoint.getVariableName()

isAccess

public boolean isAccess()
                 throws org.eclipse.core.runtime.CoreException
Specified by:
isAccess in interface org.eclipse.debug.core.model.IWatchpoint
Throws:
org.eclipse.core.runtime.CoreException
See Also:
IWatchpoint.isAccess()

isModification

public boolean isModification()
                       throws org.eclipse.core.runtime.CoreException
Specified by:
isModification in interface org.eclipse.debug.core.model.IWatchpoint
Throws:
org.eclipse.core.runtime.CoreException
See Also:
IWatchpoint.isModification()

setAccess

public void setAccess(boolean access)
               throws org.eclipse.core.runtime.CoreException
Specified by:
setAccess in interface org.eclipse.debug.core.model.IWatchpoint
Throws:
org.eclipse.core.runtime.CoreException
See Also:
IWatchpoint.setAccess(boolean)

setModification

public void setModification(boolean modification)
                     throws org.eclipse.core.runtime.CoreException
Specified by:
setModification in interface org.eclipse.debug.core.model.IWatchpoint
Throws:
org.eclipse.core.runtime.CoreException
See Also:
IWatchpoint.setModification(boolean)

supportsAccess

public boolean supportsAccess()
Specified by:
supportsAccess in interface org.eclipse.debug.core.model.IWatchpoint
See Also:
IWatchpoint.supportsAccess()

supportsModification

public boolean supportsModification()
Specified by:
supportsModification in interface org.eclipse.debug.core.model.IWatchpoint
See Also:
IWatchpoint.supportsModification()

getModelIdentifier

public java.lang.String getModelIdentifier()
Specified by:
getModelIdentifier in interface org.eclipse.debug.core.model.IBreakpoint
See Also:
IBreakpoint.getModelIdentifier()