Sat, 23 Dec 2023 15:48:47 +0100
Updated copyright for 2024.
10
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
40
c187d961ee3a
Updated copyright for 2024.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
27
diff
changeset
|
3 | # Copyright (c) 2017 - 2024 Detlev Offenbach <detlev@die-offenbachs.de> |
10
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Parse a ProtoBuf protocol file and retrieve messages, enums, services and |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | rpc methods. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
10 | It is based on the Python class browser found in this package. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
11 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
12 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | import os |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | import re |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | from eric7 import Utilities |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | from eric7.Utilities.ClassBrowsers import ClbrBaseClasses |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | _getnext = re.compile( |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | r""" |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | (?P<String> |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | " [^"\\\n]* (?: \\. [^"\\\n]*)* " |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | | (?P<Comment> |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | ^ [ \t]* // .*? $ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | ^ [ \t]* /\* .*? \*/ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | | (?P<Message> |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | ^ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | (?P<MessageIndent> [ \t]* ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | message [ \t]+ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
35 | (?P<MessageName> [a-zA-Z_] [a-zA-Z0-9_]* ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
36 | [ \t]* { |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
38 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
39 | | (?P<Enum> |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
40 | ^ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
41 | (?P<EnumIndent> [ \t]* ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
42 | enum [ \t]+ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | (?P<EnumName> [a-zA-Z_] [a-zA-Z0-9_]* ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
44 | [ \t]* { |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
45 | ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
46 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
47 | | (?P<Service> |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | ^ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | (?P<ServiceIndent> [ \t]* ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
50 | service [ \t]+ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
51 | (?P<ServiceName> [a-zA-Z_] [a-zA-Z0-9_]* ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
52 | [ \t]* { |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
53 | ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
54 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
55 | | (?P<Method> |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
56 | ^ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
57 | (?P<MethodIndent> [ \t]* ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
58 | rpc [ \t]+ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
59 | (?P<MethodName> [a-zA-Z_] [a-zA-Z0-9_]* ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
60 | [ \t]* |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
61 | \( |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
62 | (?P<MethodSignature> [^)]+? ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
63 | \) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
64 | [ \t]+ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
65 | returns |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
66 | [ \t]* |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
67 | \( |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
68 | (?P<MethodReturn> [^)]+? ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
69 | \) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
70 | [ \t]* |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
71 | ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
72 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
73 | | (?P<Begin> |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
74 | [ \t]* { |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
75 | ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
76 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
77 | | (?P<End> |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
78 | [ \t]* } [ \t]* ;? |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
79 | )""", |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
80 | re.VERBOSE | re.DOTALL | re.MULTILINE, |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
81 | ).search |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
82 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
83 | # function to replace comments |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
84 | _commentsub = re.compile(r"""//[^\n]*\n|//[^\n]*$""").sub |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
85 | # function to normalize whitespace |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
86 | _normalize = re.compile(r"""[ \t]{2,}""").sub |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
87 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
88 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
89 | class VisibilityMixin(ClbrBaseClasses.ClbrVisibilityMixinBase): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
90 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
91 | Mixin class implementing the notion of visibility. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
92 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
93 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
94 | def __init__(self): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
95 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
96 | Constructor |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
97 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
98 | self.setPublic() |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
99 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
100 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
101 | class Message(ClbrBaseClasses.Module, VisibilityMixin): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
102 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
103 | Class to represent a ProtoBuf Message. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
104 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
105 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
106 | def __init__(self, module, name, file, lineno): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
107 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
108 | Constructor |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
109 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
110 | @param module name of the module containing this message |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
111 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
112 | @param name name of this message |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
113 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
114 | @param file filename containing this message |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
115 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
116 | @param lineno linenumber of the message definition |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
117 | @type int |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
118 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
119 | ClbrBaseClasses.Module.__init__(self, module, name, file, lineno) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
120 | VisibilityMixin.__init__(self) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
121 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
122 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
123 | class Enum(ClbrBaseClasses.Enum, VisibilityMixin): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
124 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
125 | Class to represent a ProtoBuf Enum. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
126 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
127 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
128 | def __init__(self, module, name, file, lineno): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
129 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
130 | Constructor |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
131 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
132 | @param module name of the module containing this enum |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
133 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
134 | @param name name of this enum |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
135 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
136 | @param file filename containing this enum |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
137 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
138 | @param lineno linenumber of the message enum |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
139 | @type int |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
140 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
141 | ClbrBaseClasses.Enum.__init__(self, module, name, file, lineno) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
142 | VisibilityMixin.__init__(self) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
143 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
144 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
145 | class Service(ClbrBaseClasses.Class, VisibilityMixin): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
146 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
147 | Class to represent a ProtoBuf Service. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
148 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
149 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
150 | def __init__(self, module, name, file, lineno): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
151 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
152 | Constructor |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
153 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
154 | @param module name of the module containing this service |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
155 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
156 | @param name name of this service |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
157 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
158 | @param file filename containing this service |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
159 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
160 | @param lineno linenumber of the service definition |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
161 | @type int |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
162 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
163 | ClbrBaseClasses.Class.__init__(self, module, name, None, file, lineno) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
164 | VisibilityMixin.__init__(self) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
165 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
166 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
167 | class ServiceMethod(ClbrBaseClasses.Function, VisibilityMixin): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
168 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
169 | Class to represent a ProtoBuf Service Method. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
170 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
171 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
172 | def __init__(self, name, file, lineno, signature, returns): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
173 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
174 | Constructor |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
175 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
176 | @param name name of this service method |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
177 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
178 | @param file filename containing this service method |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
179 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
180 | @param lineno linenumber of the service method definition |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
181 | @type int |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
182 | @param signature parameter list of the service method |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
183 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
184 | @param returns return type of the service method |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
185 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
186 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
187 | ClbrBaseClasses.Function.__init__( |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
188 | self, |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
189 | None, |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
190 | name, |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
191 | file, |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
192 | lineno, |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
193 | signature, |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
194 | annotation="-> {0}".format(returns), |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
195 | ) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
196 | VisibilityMixin.__init__(self) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
197 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
198 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
199 | def readmodule_ex(module, path=None): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
200 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
201 | Read a ProtoBuf protocol file and return a dictionary of messages, enums, |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
202 | services and rpc methods. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
203 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
204 | @param module name of the ProtoBuf protocol file |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
205 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
206 | @param path path the file should be searched in |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
207 | @type list of str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
208 | @return the resulting dictionary |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
209 | @rtype dict |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
210 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
211 | path = [] if path is None else path[:] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
212 | for p in path: # search in path |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
213 | pathname = os.path.join(p, module) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
214 | if os.path.exists(pathname): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
215 | filename = pathname |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
216 | try: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
217 | src = Utilities.readEncodedFile(filename)[0] |
27
5e9a61e7d7d0
Added the context menu action "New protocol file..." to give a more concise way to create a new protocol file.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
22
diff
changeset
|
218 | except (OSError, UnicodeError): |
10
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
219 | # can't do anything with this module |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
220 | return {} |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
221 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
222 | return scan(src, filename, module) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
223 | return {} |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
224 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
225 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
226 | def scan(src, file, module): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
227 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
228 | Public method to scan the given source text. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
229 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
230 | @param src source text to be scanned |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
231 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
232 | @param file file name associated with the source text |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
233 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
234 | @param module module name associated with the source text |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
235 | @type str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
236 | @return dictionary containing the extracted data |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
237 | @rtype dict |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
238 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
239 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
240 | def calculateEndline(lineno, lines): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
241 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
242 | Function to calculate the end line. |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
243 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
244 | @param lineno line number to start at (one based) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
245 | @type int |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
246 | @param lines list of source lines |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
247 | @type list of str |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
248 | @return end line (one based) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
249 | @rtype int |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
250 | """ |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
251 | # convert lineno to be zero based |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
252 | lineno -= 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
253 | # 1. search for opening brace '{' |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
254 | while lineno < len(lines) and "{" not in lines[lineno]: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
255 | lineno += 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
256 | depth = lines[lineno].count("{") - lines[lineno].count("}") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
257 | # 2. search for ending line, i.e. matching closing brace '}' |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
258 | while depth > 0 and lineno < len(lines) - 1: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
259 | lineno += 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
260 | depth += lines[lineno].count("{") - lines[lineno].count("}") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
261 | if depth == 0: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
262 | # found a matching brace |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
263 | return lineno + 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
264 | else: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
265 | # nothing found |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
266 | return -1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
267 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
268 | # convert eol markers the Python style |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
269 | src = src.replace("\r\n", "\n").replace("\r", "\n") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
270 | srcLines = src.splitlines() |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
271 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
272 | dictionary = {} |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
273 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
274 | classstack = [] # stack of (class, indent) pairs |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
275 | indent = 0 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
276 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
277 | lineno, last_lineno_pos = 1, 0 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
278 | i = 0 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
279 | while True: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
280 | m = _getnext(src, i) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
281 | if not m: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
282 | break |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
283 | start, i = m.span() |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
284 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
285 | if m.start("Method") >= 0: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
286 | # found a method definition or function |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
287 | thisindent = indent |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
288 | meth_name = m.group("MethodName") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
289 | meth_sig = m.group("MethodSignature") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
290 | meth_sig = meth_sig and meth_sig.replace("\\\n", "") or "" |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
291 | meth_sig = _commentsub("", meth_sig) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
292 | meth_sig = _normalize(" ", meth_sig) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
293 | meth_return = m.group("MethodReturn") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
294 | meth_return = meth_return and meth_return.replace("\\\n", "") or "" |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
295 | meth_return = _commentsub("", meth_return) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
296 | meth_return = _normalize(" ", meth_return) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
297 | lineno += src.count("\n", last_lineno_pos, start) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
298 | last_lineno_pos = start |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
299 | # close all interfaces/modules indented at least as much |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
300 | while classstack and classstack[-1][1] >= thisindent: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
301 | del classstack[-1] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
302 | if classstack: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
303 | # it's an interface/module method |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
304 | cur_class = classstack[-1][0] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
305 | if isinstance(cur_class, Service): |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
306 | # it's a method |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
307 | f = ServiceMethod(meth_name, file, lineno, meth_sig, meth_return) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
308 | cur_class._addmethod(meth_name, f) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
309 | # else it's a nested def |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
310 | else: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
311 | f = None |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
312 | else: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
313 | # the file is incorrect, ignore the entry |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
314 | continue |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
315 | if f: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
316 | endline = calculateEndline(lineno, srcLines) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
317 | f.setEndLine(endline) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
318 | classstack.append((f, thisindent)) # Marker for nested fns |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
319 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
320 | elif m.start("String") >= 0 or m.start("Comment") >= 0: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
321 | pass |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
322 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
323 | elif m.start("Message") >= 0: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
324 | # we found a message definition |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
325 | thisindent = indent |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
326 | indent += 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
327 | lineno += src.count("\n", last_lineno_pos, start) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
328 | last_lineno_pos = start |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
329 | message_name = m.group("MessageName") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
330 | # close all messages/services indented at least as much |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
331 | while classstack and classstack[-1][1] >= thisindent: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
332 | del classstack[-1] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
333 | # remember this message |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
334 | cur_class = Message(module, message_name, file, lineno) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
335 | endline = calculateEndline(lineno, srcLines) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
336 | cur_class.setEndLine(endline) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
337 | if not classstack: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
338 | dictionary[message_name] = cur_class |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
339 | else: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
340 | msg = classstack[-1][0] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
341 | msg._addclass(message_name, cur_class) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
342 | classstack.append((cur_class, thisindent)) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
343 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
344 | elif m.start("Enum") >= 0: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
345 | # we found a message definition |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
346 | thisindent = indent |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
347 | indent += 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
348 | # close all messages/services indented at least as much |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
349 | while classstack and classstack[-1][1] >= thisindent: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
350 | del classstack[-1] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
351 | lineno += src.count("\n", last_lineno_pos, start) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
352 | last_lineno_pos = start |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
353 | enum_name = m.group("EnumName") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
354 | # remember this Enum |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
355 | cur_class = Enum(module, enum_name, file, lineno) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
356 | endline = calculateEndline(lineno, srcLines) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
357 | cur_class.setEndLine(endline) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
358 | if not classstack: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
359 | dictionary[enum_name] = cur_class |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
360 | else: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
361 | enum = classstack[-1][0] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
362 | enum._addclass(enum_name, cur_class) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
363 | classstack.append((cur_class, thisindent)) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
364 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
365 | elif m.start("Service") >= 0: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
366 | # we found a message definition |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
367 | thisindent = indent |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
368 | indent += 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
369 | # close all messages/services indented at least as much |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
370 | while classstack and classstack[-1][1] >= thisindent: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
371 | del classstack[-1] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
372 | lineno += src.count("\n", last_lineno_pos, start) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
373 | last_lineno_pos = start |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
374 | service_name = m.group("ServiceName") |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
375 | # remember this Service |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
376 | cur_class = Service(module, service_name, file, lineno) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
377 | endline = calculateEndline(lineno, srcLines) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
378 | cur_class.setEndLine(endline) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
379 | if not classstack: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
380 | dictionary[service_name] = cur_class |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
381 | else: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
382 | service = classstack[-1][0] |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
383 | service._addclass(service_name, cur_class) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
384 | classstack.append((cur_class, thisindent)) |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
385 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
386 | elif m.start("Begin") >= 0: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
387 | # a begin of a block we are not interested in |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
388 | indent += 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
389 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
390 | elif m.start("End") >= 0: |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
391 | # an end of a block |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
392 | indent -= 1 |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
393 | |
362689624e2d
Moved the Protobuf class browser to this plugin.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
394 | return dictionary |