Skip to content

Commit b681616

Browse files
authored
Merge pull request #3189 from mdavidsaver/show-pref-names
doc: show full preference names
2 parents 8559774 + 5739328 commit b681616

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

app/databrowser-json/src/main/resources/archive_reader_json_preferences.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# ---------------------------------------
2+
# Package org.phoebus.archive.reader.json
3+
# ---------------------------------------
4+
15
# Shall a precision of zero for a floating-point value result in this value
26
# using a number format without fractional digits (true) or shall it be treated
37
# as an indication that the value should be rendered with a default number of

docs/source/conf.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,31 @@ def createPreferenceAppendix(root):
340340
341341
""")
342342
for pack in sorted(pref_files.keys()):
343+
pkgname = None
343344
pref_file = pref_files[pack]
344345
out.write("\n")
345346
out.write(pack + "\n")
346347
out.write(("-" * len(pack)) + "\n")
347348
out.write("\n")
348349
out.write("File " + pref_file + "::\n\n")
350+
print('processing', pref_file)
349351
with open(pref_file) as prefs:
350352
for line in prefs:
353+
# expect lines like:
354+
# 1) Special comment with package id.
355+
# '# Package org.phoebus.applications.alarm\n'
356+
# 2) ignore...
357+
# '--------------\n'
358+
# '# ... ignore ...\n'
359+
# ' \n'
360+
# 4) preference
361+
# 'key = value'
351362
line = line.strip()
363+
if line.startswith('# Package'):
364+
pkgname = line.split(' ')[2]
365+
elif line[:1] not in ('', '#', '-'):
366+
assert pkgname is not None, pref_file # preference file missing "# Package ..." name line
367+
line = '%s/%s'%(pkgname, line)
352368
out.write(" " + line + "\n")
353369
out.write("\n")
354370

0 commit comments

Comments
 (0)