Exemple #1
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('source', shared.Source),
         Field('line', int),
         Field.START_OPTIONAL,
         Field('column', int),
     ]
Exemple #2
0
class Module(FieldsNamespace):
    """A Module object represents a row in the modules view.

    Two attributes are mandatory: an id identifies a module in the
    modules view and is used in a ModuleEvent for identifying a module
    for adding, updating or deleting.  The name is used to minimally
    render the module in the UI.

    Additional attributes can be added to the module. They will show up
    in the module View if they have a corresponding ColumnDescriptor.

    To avoid an unnecessary proliferation of additional attributes with
    similar semantics but different names we recommend to re-use
    attributes from the 'recommended' list below first, and only
    introduce new attributes if nothing appropriate could be found.
    """

    FIELDS = [
        Field('id', {int, str}),
        Field('name'),
        Field.START_OPTIONAL,
        Field('path'),
        Field('isOptimized', bool),
        Field('isUserCode', bool),
        Field('version'),
        Field('symbolStatus'),
        Field('symbolFilePath'),
        Field('dateTimeStamp'),
        Field('addressRange'),
    ]
Exemple #3
0
class Thread(FieldsNamespace):
    """A thread."""

    FIELDS = [
        Field('id', int),
        Field('name'),
    ]
Exemple #4
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('threadId', int),
         Field.START_OPTIONAL,
         Field('startFrame', int),
         Field('levels', int),
         Field('format', datatypes.StackFrameFormat),
     ]
Exemple #5
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('source', shared.Source),
         Field.START_OPTIONAL,
         Field('breakpoints', [datatypes.SourceBreakpoint]),
         Field('lines', [int]),
         Field('sourceModified', bool),
     ]
Exemple #6
0
 class BODY(FieldsNamespace):
     FIELDS = [
         Field('exceptionId'),
         Field('description', optional=True),
         Field('breakMode', datatypes.ExceptionBreakMode),
         Field.START_OPTIONAL,
         Field('details', datatypes.ExceptionDetails),
     ]
Exemple #7
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('frameId', int, optional=True),
         Field('text'),
         Field('column', int),
         Field.START_OPTIONAL,
         Field('line', int),
     ]
Exemple #8
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('variablesReference', int),
         Field('name'),
         Field('value'),
         Field.START_OPTIONAL,
         Field('format', datatypes.ValueFormat),
     ]
Exemple #9
0
class Checksum(FieldsNamespace):
    """The checksum of an item calculated by the specified algorithm."""

    ALGORITHMS = {'MD5', 'SHA1', 'SHA256', 'timestamp'}

    FIELDS = [
        Field('algorithm', enum=ALGORITHMS),
        Field('checksum'),
    ]
Exemple #10
0
 class BODY(FieldsNamespace):
     START_METHODS = {'launch', 'attach', 'attachForSuspendedLaunch'}
     FIELDS = [
         Field('name'),
         Field.START_OPTIONAL,
         Field('systemProcessId', int),
         Field('isLocalProcess', bool),
         Field('startMethod', enum=START_METHODS),
     ]
Exemple #11
0
 class BODY(FieldsNamespace):
     FIELDS = [
         Field('value'),
         Field.START_OPTIONAL,
         Field('type'),
         Field('variablesReference', int),  # number
         Field('namedVariables', int),  # number
         Field('indexedVariables', int),  # number
     ]
Exemple #12
0
class ExceptionOptions(FieldsNamespace):
    """
    An ExceptionOptions assigns configuration options to a set of exceptions.
    """

    FIELDS = [
        Field('path', [ExceptionPathSegment], optional=True),
        Field('breakMode', ExceptionBreakMode),
    ]
Exemple #13
0
 class ARGUMENTS(FieldsNamespace):
     CONTEXTS = {'watch', 'repl', 'hover'}
     FIELDS = [
         Field('expression'),
         Field.START_OPTIONAL,
         Field('frameId', int),
         Field('context', enum=CONTEXTS),
         Field('format', datatypes.ValueFormat),
     ]
Exemple #14
0
class SourceBreakpoint(FieldsNamespace):
    """Properties of a breakpoint passed to the setBreakpoints request."""

    FIELDS = [
        Field('line', int),
        Field.START_OPTIONAL,
        Field('column', int),
        Field('condition'),
        Field('hitCondition'),
    ]
Exemple #15
0
class StepInTarget(FieldsNamespace):
    """
    A StepInTarget can be used in the 'stepIn' request and determines
    into which single target the stepIn request should step.
    """

    FIELDS = [
        Field('id', int),
        Field('label'),
    ]
Exemple #16
0
 class ARGUMENTS(FieldsNamespace):
     KINDS = {'integrated', 'external'}
     FIELDS = [
         Field('kind', enum=KINDS, optional=True),
         Field('title', optional=True),
         Field('cwd'),
         Field('args', [str]),
         Field.START_OPTIONAL,
         Field('env', {str: {str, None}}),
     ]
Exemple #17
0
 class BODY(FieldsNamespace):
     REASONS = {'step', 'breakpoint', 'exception', 'pause', 'entry'}
     FIELDS = [
         Field('reason', enum=REASONS),
         Field.START_OPTIONAL,
         Field('description'),
         Field('threadId', int),
         Field('text'),
         Field('allThreadsStopped', bool),
     ]
Exemple #18
0
 class ARGUMENTS(FieldsNamespace):
     FILTERS = {'indexed', 'named'}
     FIELDS = [
         Field('variablesReference', int),
         Field.START_OPTIONAL,
         Field('filter', enum=FILTERS),
         Field('start', int),
         Field('count', int),
         Field('format', datatypes.ValueFormat),
     ]
Exemple #19
0
class FunctionBreakpoint(FieldsNamespace):
    """
    Properties of a breakpoint passed to the setFunctionBreakpoints request.
    """

    FIELDS = [
        Field('name'),
        Field.START_OPTIONAL,
        Field('condition'),
        Field('hitCondition'),
    ]
Exemple #20
0
class ExceptionBreakpointsFilter(FieldsNamespace):
    """
    An ExceptionBreakpointsFilter is shown in the UI as an option for
    configuring how exceptions are dealt with.
    """

    FIELDS = [
        Field('filter'),
        Field('label'),
        Field.START_OPTIONAL,
        Field('default', bool),
    ]
Exemple #21
0
class ExceptionPathSegment(FieldsNamespace):
    """
    An ExceptionPathSegment represents a segment in a path that is used
    to match leafs or nodes in a tree of exceptions. If a segment
    consists of more than one name, it matches the names provided if
    'negate' is false or missing or it matches anything except the names
    provided if 'negate' is true.
    """

    FIELDS = [
        Field('negate', bool, optional=True),
        Field('names', [str]),
    ]
Exemple #22
0
class Variable(FieldsNamespace):
    """A Variable is a name/value pair.

    Optionally a variable can have a 'type' that is shown if space
    permits or when hovering over the variable's name.  An optional
    'kind' is used to render additional properties of the variable,
    e.g. different icons can be used to indicate that a variable is
    public or private.  If the value is structured (has children), a
    handle is provided to retrieve the children with the
    VariablesRequest.  If the number of named or indexed children is
    large, the numbers should be returned via the optional
    'namedVariables' and 'indexedVariables' attributes.  The client can
    use this optional information to present the children in a paged UI
    and fetch them in chunks.
    """

    FIELDS = [
        Field('name'),
        Field('value'),
        Field.START_OPTIONAL,
        Field('type'),
        Field('presentationHint', VariablePresentationHint),
        Field('evaluateName'),
        Field('variablesReference', int, optional=False),
        Field('namedVariables', int),
        Field('indexedVariables', int),
    ]
Exemple #23
0
class ValueFormat(FieldsNamespace):
    """Provides formatting information for a value."""

    FIELDS = [
        Field.START_OPTIONAL,
        Field('hex', bool),
    ]
Exemple #24
0
class ColumnDescriptor(FieldsNamespace):
    """
    A ColumnDescriptor specifies what module attribute to show in a
    column of the ModulesView, how to format it, and what the column's
    label should be.  It is only used if the underlying UI actually
    supports this level of customization.
    """

    TYPES = {"string", "number", "boolean", "unixTimestampUTC"}
    FIELDS = [
        Field('attributeName'),
        Field('label'),
        Field.START_OPTIONAL,
        Field('format'),
        Field('type'),
        Field('width', int),
    ]
Exemple #25
0
class CompletionItem(FieldsNamespace):
    """
    CompletionItems are the suggestions returned from the CompletionsRequest.
    """

    TYPES = {"method", "function", "constructor", "field", "variable",
             "class", "interface", "module", "property", "unit", "value",
             "enum", "keyword", "snippet", "text", "color", "file",
             "reference", "customcolor"}
    FIELDS = [
        Field('label'),
        Field.START_OPTIONAL,
        Field('text'),
        Field('type'),
        Field('start', int),
        Field('length', int),
    ]
Exemple #26
0
class VariablePresentationHint(FieldsNamespace):
    """
    Optional properties of a variable that can be used to determine
    how to render the variable in the UI.
    """

    KINDS = {"property", "method", "class", "data", "event", "baseClass",
             "innerClass", "interface", "mostDerivedClass", "virtual"}
    ATTRIBUTES = {"static", "constant", "readOnly", "rawString",
                  "hasObjectId", "canHaveObjectId", "hasSideEffects"}
    VISIBILITIES = {"public", "private", "protected", "internal", "final"}
    FIELDS = [
        Field.START_OPTIONAL,
        Field('kind', enum=KINDS),
        Field('attributes', [Enum(str, ATTRIBUTES)]),
        Field('visibility', enum=VISIBILITIES),
    ]
Exemple #27
0
 class ARGUMENTS(FieldsNamespace):
     PATH_FORMATS = {'path', 'uri'}
     FIELDS = [
         Field('clientID', optional=True),
         Field('adapterID'),
         Field.START_OPTIONAL,
         Field('locale'),
         Field('linesStartAt1', bool),
         Field('columnsStartAt1', bool),
         Field('pathFormat', enum=PATH_FORMATS),
         Field('supportsVariableType', bool),
         Field('supportsVariablePaging', bool),
         Field('supportsRunInTerminalRequest', bool),
     ]
Exemple #28
0
class ModulesViewDescriptor(FieldsNamespace):
    """
    The ModulesViewDescriptor is the container for all declarative
    configuration options of a ModuleView.  For now it only specifies
    the columns to be shown in the modules view.
    """

    FIELDS = [
        Field('columns', [ColumnDescriptor]),
    ]
Exemple #29
0
class Scope(FieldsNamespace):
    """
    A Scope is a named container for variables.  Optionally a scope
    can map to a source or a range within a source.
    """

    FIELDS = [
        Field('name'),
        Field('variablesReference', int),
        Field('namedVariables', int, optional=True),
        Field('indexedVariables', int, optional=True),
        Field('expensive', bool),
        Field.START_OPTIONAL,
        Field('source', Source),
        Field('line', int),
        Field('column', int),
        Field('endLine', int),
        Field('endColumn', int),
    ]
Exemple #30
0
class StackFrame(FieldsNamespace):
    """A Stackframe contains the source location."""

    PRESENTATION_HINTS = {"normal", "label", "subtle"}
    FIELDS = [
        Field('id', int),
        Field('name'),
        Field('source', Source, optional=True),
        Field('line', int),
        Field('column', int),
        Field.START_OPTIONAL,
        Field('endLine', int),
        Field('endColumn', int),
        Field("moduleId", {int, str}),
        Field('presentationHint'),
    ]