mirror of
https://github.com/siemens-mobile-hacks/llvm-c166.git
synced 2026-11-27 01:57:10 +00:00
This patch improves `scripting extension list` in three ways.
First, it groups the output by `ScriptedExtension`: instead of one row
per registered plugin instance, one entry per extension is printed with
a combined `Language` field.
Second, it colorizes and visually separates the output. Each entry is
preceded by a dimmed dashed separator; field labels are printed in bold
green, the extension name value in bold cyan as a mini-heading, and
`None` usage values are dimmed, all via the same
`ansi::FormatAnsiTerminalCodes(..., use_color)` idiom
`Breakpoint::GetDescription` uses elsewhere, gracefully no-op when color
is disabled or unsupported. `ScriptedInterfaceUsages::Dump` takes an
optional `use_color` parameter so its own `API Usages:` / `Command
Interpreter Usages:` labels can match.
Third, it adds `-j`/`--json` to emit a JSON array of `{name,
description, languages, api_usages, command_interpreter_usages}` per
extension, mirroring `plugin list`'s existing `-j`. `DoExecute` now
computes the extension grouping once and branches into
`OutputJsonFormat` or `OutputTextFormat`, sharing a
`GetLanguagesForExtension` helper. It also accepts optional positional
`<extension-name>` arguments to filter the listing to specific
extensions (matched via the same case-insensitive
`ScriptInterpreter::StringToExtension` used by `scripting extension
generate`), with completion wired up via `eScriptedExtensionCompletion`.
Also fix a latent lifetime bug in the shared language-collection helper
so it owns its `std::string` values instead of holding `StringRef`s to
temporaries; the JSON path made it observable.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
|
||
|---|---|---|
| .. | ||
| Address.cpp | ||
| AddressRange.cpp | ||
| AddressRangeListImpl.cpp | ||
| AddressResolver.cpp | ||
| AddressResolverFileLine.cpp | ||
| CMakeLists.txt | ||
| Communication.cpp | ||
| CoreProperties.td | ||
| DataFileCache.cpp | ||
| Debugger.cpp | ||
| DebuggerEvents.cpp | ||
| Declaration.cpp | ||
| DemangledNameInfo.cpp | ||
| Diagnostics.cpp | ||
| Disassembler.cpp | ||
| DumpDataExtractor.cpp | ||
| DumpRegisterInfo.cpp | ||
| DumpRegisterValue.cpp | ||
| DynamicLoader.cpp | ||
| EmulateInstruction.cpp | ||
| FileLineResolver.cpp | ||
| FormatEntity.cpp | ||
| Highlighter.cpp | ||
| IOHandler.cpp | ||
| IOHandlerCursesGUI.cpp | ||
| Mangled.cpp | ||
| Module.cpp | ||
| ModuleChild.cpp | ||
| ModuleList.cpp | ||
| Opcode.cpp | ||
| PluginManager.cpp | ||
| Progress.cpp | ||
| ProtocolServer.cpp | ||
| RichManglingContext.cpp | ||
| SafeAutoloadPaths.inc.in | ||
| SearchFilter.cpp | ||
| Section.cpp | ||
| SourceLocationSpec.cpp | ||
| SourceManager.cpp | ||
| Statusline.cpp | ||
| StreamAsynchronousIO.cpp | ||
| Telemetry.cpp | ||
| ThreadedCommunication.cpp | ||
| UserSettingsController.cpp | ||
| Value.cpp | ||