DebugSvc.NullDebugSvc Class
- public static class DebugSvc.NullDebugSvc
extends Object
implements DebugSvc.I
An implementation of DebugSvc.I
that does nothing. If there is no extension loaded
that is capable of doing debugging, you will get an instance of this class back.
-
Hierarchy
-
Object
DebugSvc.NullDebugSvc
-
All Implemented Interfaces
-
DebugSvc.I
-
Enclosing class
-
DebugSvc
public void |
-
addBreakPoint (IDebugBreakPoint breakPoint)
- Adds a breakpoint to the
IDebugClient .
|
public void |
-
addBreakpointListener (DebugSvc.IBreakpointListener bpl)
- adds a breakpoint listener to a listen to all breakpoint changes.
|
public void |
-
addBreakpointListener (URI uri, DebugSvc.IBreakpointListener bpl)
- adds a breakpoint listener to a given document.
|
public void |
-
addDebugListener (DebugSvc.IDebugListener dbl)
- adds a debug listener.
|
public void |
-
addPropertyChangeListener (String name, PropertyChangeListener listener)
- Adds a PropertyChangeListener for a specific property.
|
public void |
-
addPropertyChangeListener (PropertyChangeListener listener)
- Adds a PropertyChangeListener to the listener list.
|
public void |
-
breakpointHasChanged (IDebugBreakPoint bp)
- notifies all people listening on breakpoint events, that this breakpoint
has changed in some way.
|
public URI |
-
browseToSource (String className)
- Prompts the user to browse to the source for the given classname.
|
public void |
-
clearAllBreakpoints ()
- Removes all the breakpoints the DebugClient knows about.
|
public void |
-
disableAllBreakpoints (boolean fDisable)
- disables or enables all breakpoints.
|
public void |
-
disableBreakpoint (IDebugBreakPoint bp, boolean fDisable)
- disables or enables the specified breakpoint.
|
public IDebugBreakPoint |
-
getBreakpoint (int id)
- Gets a breakpoint specified by its unique id.
|
public ISourceBreakPoint |
-
getBreakpoint (IDocument file, int line)
- Gets a breakpoint specified by a file and line number.
|
public int |
-
getBreakpointCount ()
- gets the count of all the breakpoints the DebugClient knows about.
|
public List |
-
getBreakPointList (List startList)
- Gets a list of all the breakpoints set in the current application.
|
public List |
-
getBreakPointsForURI (URI uri, List startList)
- Gets a list of all the breakpoints for a specified URI.
|
public IDebugData |
-
getDebugData (IProject proj)
- Gets the
IDebugData associated with project, proj .
|
public int |
-
getEnabledBreakpointCount ()
- gets the count of all the enabled breakpoints the DebugClient knows about.
|
public String [] |
-
getExtensions ()
- gets the list of extensions that we know about for debugging.
|
public URI |
-
getFile (String className, String sourceName)
- does an exhaustive search to try to find a file.
|
public URI |
-
getFileFromClass (String className)
- gets a file for a class name.
|
public URI |
-
getFileFromSource (String sourceName)
- gets a file from a source name.
|
public boolean |
-
getLogging (String loggingSet)
- determines whether the specified logging set is turned on, or off.
|
public String [] |
-
getLoggingOptions ()
- returns the list of logging options supported by this DebugClient.
|
public DebugSvc.ISourcePathElement [] |
-
getSourcePaths ()
- returns all the SourcePathElements we should look through
to resolve a file.
|
public List |
-
getViewInfosForType (IDebugExpression expression, boolean includeDefault)
- Searches all registered IDebugExpressionViews for ones that match
the value type.
|
public void |
-
go (IProject proj)
- passes through a call to
IDebugData.go on the supplied proj
argument.
|
public boolean |
-
hasBreakPoint (IDocument file, int line)
- Determines whether a document has a breakpoint on a specific line.
|
public void |
-
pause (IProject proj)
- Passes through a call to
IDebugData.pause on the supplied proj
argument.
|
public void |
-
removeBreakPoint (IDebugBreakPoint breakPointToRemove)
- Removes a breakpoint from the VM and the file it is in.
|
public void |
-
removeBreakpointListener (DebugSvc.IBreakpointListener bpl)
- removes a breakpoint listener that was added from addBreakpointListener(IBreakpointListener bpl).
|
public void |
-
removeBreakpointListener (URI uri, DebugSvc.IBreakpointListener bpl)
- removes a breakpoint listener that was added from addBreakpointListener(URI uri, IBreakpointListener bpl).
|
public void |
-
removedDebugListener (DebugSvc.IDebugListener dbl)
- removes a debug listener.
|
public void |
-
removePropertyChangeListener (String name, PropertyChangeListener listener)
- Removes a PropertyChangeListener for a specific property, that was added via
DebugSvc.I.addPropertyChangeListener(String, PropertyChangeListener) .
|
public void |
-
removePropertyChangeListener (PropertyChangeListener listener)
- Removes a PropertyChangeListener from the listener list.
|
public void |
-
setCurrentDebugData (IDebugData debugData)
- Sets the DebugData that is actively being debugged, null if no debugging
sessions are currently active.
|
public boolean |
-
setLogging (String loggingSet, boolean value)
- turns various logging options on and off.
|
public void |
-
start (IProject proj)
- Passes through a call to
IDebugData.start on the supplied proj
argument.
|
public void |
-
stepInto (IProject proj)
- Passes through a call to
IDebugData.stepInto on the supplied proj
argument.
|
public void |
-
stepOut (IProject proj)
- Passes through a call to
IDebugData.stepOut on the supplied proj
argument.
|
public void |
-
stepOver (IProject proj)
- Passes through a call to
IDebugData.stepOver on the supplied proj
argument.
|
public void |
-
stop (IProject proj)
- Passes through a call to
IDebugData.stop on the supplied proj
argument.
|
public void |
-
toggleBreakPoint (IDocument file, int line)
- Toggles a breakpoint on the current line.
|
public void |
-
toggleBreakPoint (IDocument file, IDocumentView view, Point pt)
- Toggles a breakpoint in a design view.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods from interface com.bea.ide.debug.DebugSvc.I |
addBreakPoint , addBreakpointListener , addBreakpointListener , addDebugListener , addPropertyChangeListener , addPropertyChangeListener , breakpointHasChanged , browseToSource , clearAllBreakpoints , disableAllBreakpoints , disableBreakpoint , getBreakpoint , getBreakpoint , getBreakpointCount , getBreakPointList , getBreakPointsForURI , getDebugData , getEnabledBreakpointCount , getExtensions , getFile , getFileFromClass , getFileFromSource , getLogging , getLoggingOptions , getSourcePaths , getViewInfosForType , go , hasBreakPoint , pause , removeBreakPoint , removeBreakpointListener , removeBreakpointListener , removedDebugListener , removePropertyChangeListener , removePropertyChangeListener , setCurrentDebugData , setLogging , start , stepInto , stepOut , stepOver , stop , toggleBreakPoint , toggleBreakPoint
|
DebugSvc.NullDebugSvc
public DebugSvc.NullDebugSvc()
addBreakPoint(IDebugBreakPoint) Method
public void addBreakPoint(IDebugBreakPoint
breakPoint)
Description copied from DebugSvc.I.addBreakPoint(IDebugBreakPoint)
Adds a breakpoint to the IDebugClient
. This will add the breakpoint
to the DebugClient's internal collections, set the breakpoint in the VM, and add a glyph to
the file the breakpoint is in.
Parameters
-
breakPoint
- - the breakpoint you want to add.
addBreakpointListener(DebugSvc.IBreakpointListener) Method
public void addBreakpointListener(DebugSvc.IBreakpointListener
bpl)
Description copied from DebugSvc.I.addBreakpointListener(DebugSvc.IBreakpointListener)
adds a breakpoint listener to a listen to all breakpoint changes. This will fire the appropriate
event when any breakpoint is enable/disabled/added/removed
Parameters
-
bpl
- - the listener to recieve breakpoint events.
addBreakpointListener(URI, DebugSvc.IBreakpointListener) Method
public void addBreakpointListener(URI
uri,
DebugSvc.IBreakpointListener
bpl)
Description copied from DebugSvc.I.addBreakpointListener(URI, DebugSvc.IBreakpointListener)
adds a breakpoint listener to a given document. This will fire the appropriate
event when any breakpoint within the specified document is enable/disabled/added/removed
Parameters
-
uri
- - the uri of the file to listen to.
-
bpl
- - the listener to recieve breakpoint events.
addDebugListener(DebugSvc.IDebugListener) Method
public void addDebugListener(DebugSvc.IDebugListener
dbl)
Description copied from DebugSvc.I.addDebugListener(DebugSvc.IDebugListener)
adds a debug listener. This listener will be notified whenever the debug state changes.
Parameters
-
dbl
- the listener to be notified.
addPropertyChangeListener(String, PropertyChangeListener) Method
public void addPropertyChangeListener(String
name,
PropertyChangeListener
listener)
Description copied from DebugSvc.I.addPropertyChangeListener(String, PropertyChangeListener)
Adds a PropertyChangeListener for a specific property.
Parameters
-
name
- the name of the property to listen on.
-
listener
- the object that gets notified when the property changes.
addPropertyChangeListener(PropertyChangeListener) Method
public void addPropertyChangeListener(PropertyChangeListener
listener)
Description copied from DebugSvc.I.addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.
Parameters
-
listener
- the object that will get notified when any property changes.
breakpointHasChanged(IDebugBreakPoint) Method
public void breakpointHasChanged(IDebugBreakPoint
bp)
Description copied from DebugSvc.I.breakpointHasChanged(IDebugBreakPoint)
notifies all people listening on breakpoint events, that this breakpoint
has changed in some way.
Parameters
-
bp
- - the breakpoint that has chagned.
browseToSource(String) Method
public URI
browseToSource(String
className)
Description copied from DebugSvc.I.browseToSource(String)
Prompts the user to browse to the source for the given classname.
Assuming the file's directory structure matches the class' package,
this will also ask the user if the root should be added to the application's
debug sourcepath
Parameters
-
className
- name of the class to find source for
Returns
- null if the user cancels
clearAllBreakpoints() Method
public void clearAllBreakpoints()
Description copied from DebugSvc.I.clearAllBreakpoints()
Removes all the breakpoints the DebugClient knows about. Each breakpoint will be removed from all VMs as well
as from all the files they are in.
disableAllBreakpoints(boolean) Method
public void disableAllBreakpoints(boolean fDisable)
Description copied from DebugSvc.I.disableAllBreakpoints(boolean)
disables or enables all breakpoints. Disabling breakpoints will cause them to still exist in the
file and in the DebugClient's breakpoint collections, but the breakpoint will be removed from the VM. Enabling
the breakpoint will re-add the breakpoint to the VM.
Parameters
-
fDisable
- - if true, this will disable all breakpoints
if false, this will enable all breakpoints
disableBreakpoint(IDebugBreakPoint, boolean) Method
public void disableBreakpoint(IDebugBreakPoint
bp,
boolean fDisable)
Description copied from DebugSvc.I.disableBreakpoint(IDebugBreakPoint, boolean)
disables or enables the specified breakpoint. Disabling the breakpoint will cause it to still exist in the
file and in the DebugClient's breakpoint collections, but the breakpoint will be removed from the VM. Enabling
the breakpoint will re-add the breakpoint to the VM.
Parameters
-
bp
- - the breakpoint to enable or disable.
-
fDisable
- - if true, this will take an enabled breakpoint and disable it
if false, this will take a disabled breakpoint and enable it.
getBreakpoint(int) Method
public IDebugBreakPoint
getBreakpoint(int id)
Description copied from DebugSvc.I.getBreakpoint(int)
Gets a breakpoint specified by its unique id.
Parameters
-
id
- - the unique id of the breakpoint you are looking for.
Returns
- the breakpoint corresponding to this id, or null if no such breakpoint exists.
getBreakpoint(IDocument, int) Method
public ISourceBreakPoint
getBreakpoint(IDocument
file,
int line)
Description copied from DebugSvc.I.getBreakpoint(IDocument, int)
Gets a breakpoint specified by a file and line number.
Parameters
-
file
- - the file to look for the breakpoint in.
-
line
- - the line in the file to look for the breakpoint on.
Returns
- the breakpoint on the line, or null if no such breakpoint exists.
getBreakpointCount() Method
public int getBreakpointCount()
Description copied from DebugSvc.I.getBreakpointCount()
gets the count of all the breakpoints the DebugClient knows about.
Returns
- the number of breakpoints the DebugClient knows about.
getBreakPointList(List) Method
public List
getBreakPointList(List
startList)
Description copied from DebugSvc.I.getBreakPointList(List)
Gets a list of all the breakpoints set in the current application. If a startList
is passed in, this will
add the breakpoints to the list and return it. Otherwise this will create a new list to populate.
Parameters
-
startList
- - the list in which to put the breakpoints. If this is null, a new list will be created that
will then be used to return the breakpoints.
Returns
- a list filled with
IDebugBreakpoint
objects refering to each breakpoint.
getBreakPointsForURI(URI, List) Method
public List
getBreakPointsForURI(URI
uri,
List
startList)
Description copied from DebugSvc.I.getBreakPointsForURI(URI, List)
Gets a list of all the breakpoints for a specified URI. If a startList
is passed in, this will
add the breakpoints to the list and return it. Otherwise this will return a readonly copy of the internal breakpoint list.
Parameters
-
uri
- - the uri to return breakpoints for.
-
startList
- - the list to return the breakpoints in. If this is null, a new list will be created that
will then be used to return the breakpoints.
Returns
- a list filled with
IDebugBreakpoint
objects refering to each breakpoint.
getDebugData(IProject) Method
public IDebugData
getDebugData(IProject
proj)
Description copied from DebugSvc.I.getDebugData(IProject)
Gets the IDebugData
associated with project, proj
.
Parameters
-
proj
- - this is the project to execute the command against. If this is null, the active project will
be used.
Returns
- the
IDebugData
interface assiciated with the project.
getEnabledBreakpointCount() Method
public int getEnabledBreakpointCount()
Description copied from DebugSvc.I.getEnabledBreakpointCount()
gets the count of all the enabled breakpoints the DebugClient knows about. This means any breakpoints
that are disabled will not be counted in this number.
Returns
- the number of breakpoints the DebugClient knows about.
getExtensions() Method
public String
[] getExtensions()
Description copied from DebugSvc.I.getExtensions()
gets the list of extensions that we know about for debugging. The IDE
will be able to load files with any type of extension, but this is useful for cases
where we need to narrow some searches.
Returns
- the list of File extensions
getFile(String, String) Method
public URI
getFile(String
className,
String
sourceName)
Description copied from DebugSvc.I.getFile(String, String)
does an exhaustive search to try to find a file. You can give it
both a className and a sourceName, in which case it will try to find the
source file you specified, and if it can't find that will try to find the
most appropriate file that could have created the class specified.
Parameters
-
className
- - the name of a Java class
-
sourceName
- - the name of a source file
Returns
- the URI to the file that defines the source code.
getFileFromClass(String) Method
public URI
getFileFromClass(String
className)
Description copied from DebugSvc.I.getFileFromClass(String)
gets a file for a class name. This will walk through all the normal file lookup
code to find an actual file in the same manner we do when a breakpoint gets hit.
Parameters
-
className
- - the name of a Java class
Returns
- the URI to the file that defines the source code.
getFileFromSource(String) Method
public URI
getFileFromSource(String
sourceName)
Description copied from DebugSvc.I.getFileFromSource(String)
gets a file from a source name. This will walk through all the normal file lookup
code to find an actual file in the same manner we do when a breakpoint gets hit.
Parameters
-
sourceName
- - the name of a source file. This will be the name in the .class file.
Returns
- the URI to the file that defines the source code.
getLogging(String) Method
public boolean getLogging(String
loggingSet)
Description copied from DebugSvc.I.getLogging(String)
determines whether the specified logging set is turned on, or off. The currently supported logging options
are all returned from getLoggingOptions.
Parameters
-
loggingSet
- name of the logging set to query a value for.
Returns
- true if the DebugData knows about the loggingSet and was able to turn it on or off;
false if the DebugData does not know about the loggingSet.
getLoggingOptions() Method
public String
[] getLoggingOptions()
Description copied from DebugSvc.I.getLoggingOptions()
returns the list of logging options supported by this DebugClient.
Returns
- an array of options that get/setLogging will support.
getSourcePaths() Method
public DebugSvc.ISourcePathElement
[] getSourcePaths()
Description copied from DebugSvc.I.getSourcePaths()
returns all the SourcePathElements we should look through
to resolve a file. These are defined in the *.work file.
Returns
- an array of ISourcePathElements in the order they should be searched in.
getViewInfosForType(IDebugExpression, boolean) Method
public List
getViewInfosForType(IDebugExpression
expression,
boolean includeDefault)
Description copied from DebugSvc.I.getViewInfosForType(IDebugExpression, boolean)
Searches all registered IDebugExpressionViews for ones that match
the value type. Matches are then sorted and returned in priority order.
All elements in list are instances of IDebugExpressionView.ViewInfo.
Parameters
-
expression
- the debug expression to look for.
-
includeDefault
- whether to look at the default views.
Returns
- a
List
of IDebugExpressionView.ViewInfo
.
go(IProject) Method
public void go(IProject
proj)
Description copied from DebugSvc.I.go(IProject)
passes through a call to IDebugData.go
on the supplied proj
argument. If proj is null, this will be called on the current project.
Parameters
-
proj
- - this is the project to execute the command against. If this is null, the active project will
be used.
hasBreakPoint(IDocument, int) Method
public boolean hasBreakPoint(IDocument
file,
int line)
Description copied from DebugSvc.I.hasBreakPoint(IDocument, int)
Determines whether a document has a breakpoint on a specific line. Since breakpoints are global
this will not verify that the file
is in the current project.
Parameters
-
file
- - the file the breakpoint is associated with.
-
line
- - the line the breakpoint is associated with.
Returns
- true if a breakpoint exists on the specified line in the specified file.
false if there is no breakpoint on the specified line in the specified file, or if the specified file
does not support
IDebugDriver
as a driver.
pause(IProject) Method
public void pause(IProject
proj)
Description copied from DebugSvc.I.pause(IProject)
Passes through a call to IDebugData.pause
on the supplied proj
argument. If proj is null, this will be called on the current project.
Parameters
-
proj
- - this is the project to execute the command against. If this is null, the active project will
be used.
removeBreakPoint(IDebugBreakPoint) Method
public void removeBreakPoint(IDebugBreakPoint
breakPointToRemove)
Description copied from DebugSvc.I.removeBreakPoint(IDebugBreakPoint)
Removes a breakpoint from the VM and the file it is in. This will make sure that
each of the projects that has this breakpoint set will unset the breakpoint, the glyph will disappear,
and the breakpoint will be taken out of the breakpoint collections.
Parameters
-
breakPointToRemove
- - the breakpoint to remove.
removeBreakpointListener(DebugSvc.IBreakpointListener) Method
public void removeBreakpointListener(DebugSvc.IBreakpointListener
bpl)
Description copied from DebugSvc.I.removeBreakpointListener(DebugSvc.IBreakpointListener)
removes a breakpoint listener that was added from addBreakpointListener(IBreakpointListener bpl).
Parameters
-
bpl
- - the listener to remove.
removeBreakpointListener(URI, DebugSvc.IBreakpointListener) Method
public void removeBreakpointListener(URI
uri,
DebugSvc.IBreakpointListener
bpl)
Description copied from DebugSvc.I.removeBreakpointListener(URI, DebugSvc.IBreakpointListener)
removes a breakpoint listener that was added from addBreakpointListener(URI uri, IBreakpointListener bpl).
Parameters
-
uri
- - the uri of the file to remove from.
-
bpl
- - the listener to remove.
removedDebugListener(DebugSvc.IDebugListener) Method
public void removedDebugListener(DebugSvc.IDebugListener
dbl)
Description copied from DebugSvc.I.removedDebugListener(DebugSvc.IDebugListener)
removes a debug listener. This will remove a listener that was added via
DebugSvc.I.addDebugListener(DebugSvc.IDebugListener)
.
Parameters
-
dbl
- the listener to remove.
removePropertyChangeListener(String, PropertyChangeListener) Method
public void removePropertyChangeListener(String
name,
PropertyChangeListener
listener)
Description copied from DebugSvc.I.removePropertyChangeListener(String, PropertyChangeListener)
Removes a PropertyChangeListener for a specific property, that was added via
DebugSvc.I.addPropertyChangeListener(String, PropertyChangeListener)
.
Parameters
-
name
- the name of the property to remove the listener from
-
listener
- the listener object to remove
removePropertyChangeListener(PropertyChangeListener) Method
public void removePropertyChangeListener(PropertyChangeListener
listener)
Description copied from DebugSvc.I.removePropertyChangeListener(PropertyChangeListener)
Removes a PropertyChangeListener from the listener list.
This removes a PropertyChangeListener that was registered for all properties, via
the DebugSvc.I.addPropertyChangeListener(PropertyChangeListener)
Parameters
-
listener
- the listener object to remove.
setCurrentDebugData(IDebugData) Method
public void setCurrentDebugData(IDebugData
debugData)
Description copied from DebugSvc.I.setCurrentDebugData(IDebugData)
Sets the DebugData that is actively being debugged, null if no debugging
sessions are currently active. Currently, only one debugging session
at a time is allowed.
Parameters
-
debugData
- the DebugData that is currently being debugged
setLogging(String, boolean) Method
public boolean setLogging(String
loggingSet,
boolean value)
Description copied from DebugSvc.I.setLogging(String, boolean)
turns various logging options on and off. The currently supported logging options
are all returned from getLoggingOptions.
Parameters
-
loggingSet
- name of the logging set to turn on or off.
-
value
- true/false depending on whether logging should be turned on or off.
Returns
- true if the DebugData knows about the loggingSet and was able to turn it on or off;
false if the DebugData does not know about the loggingSet.
start(IProject) Method
public void start(IProject
proj)
Description copied from DebugSvc.I.start(IProject)
Passes through a call to IDebugData.start
on the supplied proj
argument. If proj is null, this will be called on the current project.
Parameters
-
proj
- - this is the project to execute the command against. If this is null, the active project will
be used.
stepInto(IProject) Method
public void stepInto(IProject
proj)
Description copied from DebugSvc.I.stepInto(IProject)
Passes through a call to IDebugData.stepInto
on the supplied proj
argument. If proj is null, this will be called on the current project.
Parameters
-
proj
- - this is the project to execute the command against. If this is null, the active project will
be used.
stepOut(IProject) Method
public void stepOut(IProject
proj)
Description copied from DebugSvc.I.stepOut(IProject)
Passes through a call to IDebugData.stepOut
on the supplied proj
argument. If proj is null, this will be called on the current project.
Parameters
-
proj
- - this is the project to execute the command against. If this is null, the active project will
be used.
stepOver(IProject) Method
public void stepOver(IProject
proj)
Description copied from DebugSvc.I.stepOver(IProject)
Passes through a call to IDebugData.stepOver
on the supplied proj
argument. If proj is null, this will be called on the current project.
Parameters
-
proj
- - this is the project to execute the command against. If this is null, the active project will
be used.
stop(IProject) Method
public void stop(IProject
proj)
Description copied from DebugSvc.I.stop(IProject)
Passes through a call to IDebugData.stop
on the supplied proj
argument. If proj is null, this will be called on the current project.
Parameters
-
proj
- - this is the project to execute the command against. If this is null, the active project will
be used.
toggleBreakPoint(IDocument, int) Method
public void toggleBreakPoint(IDocument
file,
int line)
Description copied from DebugSvc.I.toggleBreakPoint(IDocument, int)
Toggles a breakpoint on the current line. If a breakpoint is already on that line, it will be removed.
If there is no breakpoint on that line, one will be added. In order to call this function on an
IDocument
it needs to support the IDebugDriver
driver.
This call will not only add the breakpoint glyph to the file
it will also set the breakpoint in
any active debugging sessions.
Parameters
-
file
- - the file the breakpoint is associated with.
-
line
- - the line the breakpoint is associated with.
toggleBreakPoint(IDocument, IDocumentView, Point) Method
public void toggleBreakPoint(IDocument
file,
IDocumentView
view,
Point
pt)
Description copied from DebugSvc.I.toggleBreakPoint(IDocument, IDocumentView, Point)
Toggles a breakpoint in a design view. When setting a breakpoing in a sourceview
the version of this function with source/line information should be used.
This call will not only add the breakpoint glyph to the file
it will also set the breakpoint in
any active debugging sessions.
Parameters
-
file
- - the file the breakpoint is associated with.
-
view
- - the Document view this is being set on
-
pt
- - the point on the view this is being set on. If this is null
the breakpoint should be set on the currently selected area.