コード例 #1
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('source', shared.Source),
         Field('line', int),
         Field.START_OPTIONAL,
         Field('column', int),
     ]
コード例 #2
0
ファイル: shared.py プロジェクト: zooba/ptvsd
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'),
    ]
コード例 #3
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
class Thread(FieldsNamespace):
    """A thread."""

    FIELDS = [
        Field('id', int),
        Field('name'),
    ]
コード例 #4
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('threadId', int),
         Field.START_OPTIONAL,
         Field('startFrame', int),
         Field('levels', int),
         Field('format', datatypes.StackFrameFormat),
     ]
コード例 #5
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('source', shared.Source),
         Field.START_OPTIONAL,
         Field('breakpoints', [datatypes.SourceBreakpoint]),
         Field('lines', [int]),
         Field('sourceModified', bool),
     ]
コード例 #6
0
 class BODY(FieldsNamespace):
     FIELDS = [
         Field('exceptionId'),
         Field('description', optional=True),
         Field('breakMode', datatypes.ExceptionBreakMode),
         Field.START_OPTIONAL,
         Field('details', datatypes.ExceptionDetails),
     ]
コード例 #7
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('frameId', int, optional=True),
         Field('text'),
         Field('column', int),
         Field.START_OPTIONAL,
         Field('line', int),
     ]
コード例 #8
0
 class ARGUMENTS(FieldsNamespace):
     FIELDS = [
         Field('variablesReference', int),
         Field('name'),
         Field('value'),
         Field.START_OPTIONAL,
         Field('format', datatypes.ValueFormat),
     ]
コード例 #9
0
ファイル: shared.py プロジェクト: zooba/ptvsd
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'),
    ]
コード例 #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),
     ]
コード例 #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
     ]
コード例 #12
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
class ExceptionOptions(FieldsNamespace):
    """
    An ExceptionOptions assigns configuration options to a set of exceptions.
    """

    FIELDS = [
        Field('path', [ExceptionPathSegment], optional=True),
        Field('breakMode', ExceptionBreakMode),
    ]
コード例 #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),
     ]
コード例 #14
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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'),
    ]
コード例 #15
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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'),
    ]
コード例 #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}}),
     ]
コード例 #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),
     ]
コード例 #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),
     ]
コード例 #19
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
class FunctionBreakpoint(FieldsNamespace):
    """
    Properties of a breakpoint passed to the setFunctionBreakpoints request.
    """

    FIELDS = [
        Field('name'),
        Field.START_OPTIONAL,
        Field('condition'),
        Field('hitCondition'),
    ]
コード例 #20
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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),
    ]
コード例 #21
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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]),
    ]
コード例 #22
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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),
    ]
コード例 #23
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
class ValueFormat(FieldsNamespace):
    """Provides formatting information for a value."""

    FIELDS = [
        Field.START_OPTIONAL,
        Field('hex', bool),
    ]
コード例 #24
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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),
    ]
コード例 #25
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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),
    ]
コード例 #26
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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),
    ]
コード例 #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),
     ]
コード例 #28
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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]),
    ]
コード例 #29
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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),
    ]
コード例 #30
0
ファイル: _requests.py プロジェクト: ishaanv/ptvsd
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'),
    ]