Class: DSP::Source
Overview
interface Source {
/** The short name of the source. Every source returned from the debug adapter has a name.
When sending a source to the debug adapter this name is optional.
*/
name?: string;
/** The path of the source to be shown in the UI.
It is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0).
*/
path?: string;
/** If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified).
A sourceReference is only valid for a session, so it must not be used to persist a source.
The value should be less than or equal to 2147483647 (2^31 - 1).
*/
sourceReference?: number;
/** An optional hint for how to present the source in the UI.
A value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.
*/
presentationHint?: 'normal' | 'emphasize' | 'deemphasize';
/** The (optional) origin of this source: possible values 'internal module', 'inlined content from source map', etc. */
origin?: string;
/** An optional list of sources that are related to this source. These may be the source that generated this source. */
sources?: Source[];
/** Optional data that a debug adapter might want to loop through the client.
The client should leave the data intact and persist it across sessions. The client should not interpret the data.
*/
adapterData?: any;
/** The checksums associated with this file. */
checksums?: Checksum[];
}
Instance Attribute Summary collapse
-
#adapterData ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[].
-
#checksums ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[].
-
#name ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[].
-
#origin ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[].
-
#path ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[].
-
#presentationHint ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[].
-
#sourceReference ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[].
-
#sources ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[].
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ Source
constructor
A new instance of Source.
Methods inherited from DSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ Source
Returns a new instance of Source.
3908 3909 3910 3911 |
# File 'lib/dsp/dsp_protocol.rb', line 3908 def initialize(initial_hash = nil) super @optional_method_names = %i[name path sourceReference presentationHint origin sources adapterData checksums] end |
Instance Attribute Details
#adapterData ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[]
3906 3907 3908 |
# File 'lib/dsp/dsp_protocol.rb', line 3906 def adapterData @adapterData end |
#checksums ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[]
3906 3907 3908 |
# File 'lib/dsp/dsp_protocol.rb', line 3906 def checksums @checksums end |
#name ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[]
3906 3907 3908 |
# File 'lib/dsp/dsp_protocol.rb', line 3906 def name @name end |
#origin ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[]
3906 3907 3908 |
# File 'lib/dsp/dsp_protocol.rb', line 3906 def origin @origin end |
#path ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[]
3906 3907 3908 |
# File 'lib/dsp/dsp_protocol.rb', line 3906 def path @path end |
#presentationHint ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[]
3906 3907 3908 |
# File 'lib/dsp/dsp_protocol.rb', line 3906 def presentationHint @presentationHint end |
#sourceReference ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[]
3906 3907 3908 |
# File 'lib/dsp/dsp_protocol.rb', line 3906 def sourceReference @sourceReference end |
#sources ⇒ Object
type: string # type: string # type: number # type: string with value ‘normal’ | ‘emphasize’ | ‘deemphasize’ # type: string # type: Source[] # type: any # type: Checksum[]
3906 3907 3908 |
# File 'lib/dsp/dsp_protocol.rb', line 3906 def sources @sources end |
Instance Method Details
#from_h!(value) ⇒ Object
3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 |
# File 'lib/dsp/dsp_protocol.rb', line 3913 def from_h!(value) value = {} if value.nil? self.name = value['name'] self.path = value['path'] self.sourceReference = value['sourceReference'] self.presentationHint = value['presentationHint'] # Unknown type self.origin = value['origin'] self.sources = to_typed_aray(value['sources'], Source) self.adapterData = value['adapterData'] self.checksums = to_typed_aray(value['checksums'], Checksum) self end |