Interface DebugOptions
DebugTrace instance for
 a bundle to use for dynamic tracing.- Since:
- 3.1
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe service property (named "listener.symbolic.name") which specifies the bundle symbolic name of aDebugOptionsListenerservice.
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetBooleanOption(String option, boolean defaultValue) Returns the identified option as a boolean value.getFile()Returns the trace file if it is set, otherwisenullis returned.intgetIntegerOption(String option, int defaultValue) Returns the identified option as an int value.Returns the identified option.Returns the identified option.Returns a snapshot of the current options.booleanReturns true if debugging/tracing is currently enabled.newDebugTrace(String bundleSymbolicName) Creates a newDebugTraceinstance for the specified bundle symbolic name.newDebugTrace(String bundleSymbolicName, Class<?> traceEntryClass) Create a newDebugTraceinstance for the specified bundle symbolic name.voidremoveOption(String option) Removes the identified option.voidsetDebugEnabled(boolean value) Enables or disables debugging/tracing.voidSets the current file used to trace messages to.voidSets the identified option to the identified value.voidsetOptions(Map<String, String> options) Sets the current option key/value pairs to the specified options.
- 
Field Details- 
LISTENER_SYMBOLICNAMEThe service property (named "listener.symbolic.name") which specifies the bundle symbolic name of aDebugOptionsListenerservice.- Since:
- 3.5
- See Also:
 
 
- 
- 
Method Details- 
getBooleanOptionReturns the identified option as a boolean value. The specified defaultValue is returned if no such option is found or if debug is not enabled.Options are specified in the general form <Bundle-SymbolicName>/<option-path>. For example, org.eclipse.core.runtime/debug- Parameters:
- option- the name of the option to lookup
- defaultValue- the value to return if no such option is found
- Returns:
- the value of the requested debug option or the defaultValue if no such option is found.
 
- 
getOptionReturns the identified option. Anullvalue is returned if no such option is found or if debug is not enabled.Options are specified in the general form <Bundle-SymbolicName>/<option-path>. For example, org.eclipse.core.runtime/debug- Parameters:
- option- the name of the option to lookup
- Returns:
- the value of the requested debug option or null
 
- 
getOptionReturns the identified option. The specified defaultValue is returned if no such option is found or if debug is not enabled.Options are specified in the general form <Bundle-SymbolicName>/<option-path>. For example, org.eclipse.core.runtime/debug- Parameters:
- option- the name of the option to lookup
- defaultValue- the value to return if no such option is found
- Returns:
- the value of the requested debug option or the defaultValue if no such option is found.
 
- 
getIntegerOptionReturns the identified option as an int value. The specified defaultValue is returned if no such option is found or if a NumberFormatException is thrown while converting the option value to an integer or if debug is not enabled.Options are specified in the general form <Bundle-SymbolicName>/<option-path>. For example, org.eclipse.core.runtime/debug- Parameters:
- option- the name of the option to lookup
- defaultValue- the value to return if no such option is found
- Returns:
- the value of the requested debug option or the defaultValue if no such option is found.
 
- 
getOptionsReturns a snapshot of the current options. All keys and values are of typeString. If no options are set then an empty map is returned.If debug is not enabled then the snapshot of the current disabled values is returned. See setDebugEnabled(boolean).- Returns:
- a snapshot of the current options.
- Since:
- 3.6
 
- 
setOptionSets the identified option to the identified value. If debug is not enabled then the specified option is not changed.- Parameters:
- option- the name of the option to set
- value- the value of the option to set
 
- 
setOptionsSets the current option key/value pairs to the specified options. The specified map replaces all keys and values of the current debug options. AnIllegalArgumentExceptionis thrown if any key or value in the specified map is not of typeString.If debug is not enabled then the specified options are saved as the disabled values and no notifications will be sent. See setDebugEnabled(boolean). If debug is enabled then notifications will be sent to the listeners which have options that have been changed, added or removed.- Parameters:
- options- the new set of options
- Since:
- 3.6
 
- 
removeOptionRemoves the identified option. If debug is not enabled then the specified option is not removed.- Parameters:
- option- the name of the option to remove
- Since:
- 3.5
 
- 
isDebugEnabledboolean isDebugEnabled()Returns true if debugging/tracing is currently enabled.- Returns:
- true if debugging/tracing is currently enabled; Otherwise false is returned.
- Since:
- 3.5
 
- 
setDebugEnabledvoid setDebugEnabled(boolean value) Enables or disables debugging/tracing.When debug is disabled all debug options are unset. When disabling debug the current debug option values are stored in memory as disabled values. If debug is re-enabled the disabled values will be set back and enabled. The disabled values are only stored in memory and if the framework is restarted then the disabled option values will be lost. - Parameters:
- value- If- true, debug is enabled, otherwise debug is disabled.
- Since:
- 3.5
 
- 
setFileSets the current file used to trace messages to. Anullvalue is allowed which indicates thatSystem.outwill be used for trace messages.- Parameters:
- newFile- The file to be used for tracing messages. A- nullvalue is allowed.
- Since:
- 3.5
 
- 
getFileFile getFile()Returns the trace file if it is set, otherwisenullis returned. Anullvalue indicates thatSystem.outis used for trace messages.- Returns:
- the trace file if it is set, otherwise nullis returned.
- Since:
- 3.5
 
- 
newDebugTraceCreates a newDebugTraceinstance for the specified bundle symbolic name. If aDebugTraceobject has already been created for the specified symbolic name then the existingDebugTraceobject will be returned. The class name, method name, and line number of any callers to theDebugTraceAPI will automatically be determined by parsing the stack trace of the executing thread. These attributes will be set based on the first caller of this API.- Parameters:
- bundleSymbolicName- The symbolic name of the bundle that is requesting a new instance of a- DebugTrace.
- Returns:
- A new or existing DebugTraceobject for the specified plug-in ID
- Since:
- 3.5
 
- 
newDebugTraceCreate a newDebugTraceinstance for the specified bundle symbolic name. If aDebugTraceobject has already been created for the specified symbolic name then the existingDebugTraceobject will be returned. The class name, method name, and line number of any callers to theDebugTraceAPI will automatically be determined by parsing the stack trace of the executing thread. The values of these attributes will be based on the last invocation to the specified traceEntryClass found in the parsed stack trace.- Parameters:
- bundleSymbolicName- The symbolic name of the bundle that is requesting a new instance of a- DebugTrace.
- traceEntryClass- The class that is being used to abstract tracing calls for a bundle.
- Returns:
- A new or existing DebugTraceobject for the specified plug-in ID
- Since:
- 3.5
 
 
-