| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Data Category | Element Type | Potential Source(s) (Key Files, Classes, Tools, Docs) | How to Access? | Target Fields in new cache structure? | PoC/ Experiment | Persistence Strategy (for Static Cache) File Format? Update Freq? | Design Time? Challenges | MSO VBA Equiv/Help Snippet | |||||||||||||||||
2 | BASIC Structure | |||||||||||||||||||||||||
3 | A. Libraries | Library Name & Scope (App, Doc, User, Scripts) | BasicManagerRepository, BasicManager, ScriptDocument, SvtPathOptions (basmgr/, basctl/, unotools/?) | ScriptDocument methods (use BasicManager) BasicManager::maLibs -> BasicLibInfo::GetLibName() SvtPathOptions().GetBasicPath() | sName, eKind=LIBRARY, eScope, sOriginLocation | |||||||||||||||||||||
4 | B. Modules | Module Name & Type (Normal, Class) | StarBASIC, SbModule (classes/sb.cxx, sbxmod.cxx) | StarBASIC::GetModules() SbModule::GetModuleType() SbxVariable::SbxObject::GetName() | sName, eKind=(MODULE/CLASS_MODULE), sOriginLibrary | |||||||||||||||||||||
5 | Module Source Code | SbModule (classes/sbxmod.cxx) | SbModule::GetSource32() ? | Raw source text (primary input for Master Analyzer?) | ||||||||||||||||||||||
6 | ||||||||||||||||||||||||||
7 | BASIC Symbol | |||||||||||||||||||||||||
8 | A. Procedures | Public/ Private Sub/Func (Name, Basic Type, Params from Complied state) | sbmod.hxx (SbModule), sbmeth.hxx (SbMethod), sbx.hxx (SbxInfo), sbxobj.hxx (SbxObject base for SbModule, provides pMethods SbxArrayRef) | Iterate SbModule::GetMethods() Call SbMethod getters SbxInfo for params Then check pMeth->IsSet/SetFlag(SbxFlagBits::Private) for scope? (filter/source/msfilter/msvbahelper.cxx, basic/source/comp/codegen.cxx) SbxInfo* pInfo = pMeth->GetInfo() SbxParamInfo* pParam = pInfo->GetParam() SbxParamInfo::aName, ::eType, ::nUserData include/basic/sbx.hxx pMeth->GetLineRange() basic/source/comp/codegen.cxx | sName, eKind, sReturnTypeName (from SbMethod::GetType()), basic aParameters (types from SbxParamInfo::eType, some flags from nUserData), eScope (MODULE_PUBLIC if !IsSet(SbxFlagBits::Private), else MODULE_PRIVATE), nSourceLine. | |||||||||||||||||||||
9 | Parameter Info (from source) | SbiParser, SbiProcDef, SbiSymDef (basic/source/comp/) | Master Analyzer to parse source Info from SbiProcDef::aParams SbiProcDef (as SbiSymDef) holds SbxFlagBits::Private pMeth->SetFlag( SbxFlagBits::Private (include/basic/sbxdef.hxx) | Rich aParameters (name, type, SbiSymDef::IsByVal(), IsOptional(), default). eScope from SbiProcDef flags? | ||||||||||||||||||||||
10 | B. Variables and Constants | Module-Level Pub/Priv Variable/Constant | SbModule::GetObjects() -> SbxVariable. (sbxobj.hxx) SbiConstDef (compile-time) SbiParser, SbiSymPool, SbiSymDef, SbiConstDef. | Iterate SbxObject::SbModule::GetObjects() filter non-method/prop SbxVariable | sName, eKind, sTypeName, eScope, bIsArray, aArrayDimensions, osConstantValue | |||||||||||||||||||||
11 | Procedure Level (Local) | SbiParser -> SbiProcDef::GetPool() basic/source/inc/symtbl.hxx | Master Analyzer to parse procedure body | sName, eKind=VARIABLE, sTypeName, eScope=(PROCEDURE_LOCAL/STATIC_PROCEDURE_LOCAL) | ||||||||||||||||||||||
12 | C. Defined Types | UDT/ Enum (from Compiled Image) | Parser: SbiParser (Type..End Type, Enum..End Enum) Compiled: SbiImage::rTypes, ::rEnums (classes/image.cxx) | Source: Master Analyzer to parse Compiled: Access SbModule::pImage -> SbiImage. | sName, eKind=(UDT/ENUM), mapMembers | |||||||||||||||||||||
13 | ||||||||||||||||||||||||||
14 | Uno APIs | |||||||||||||||||||||||||
15 | A. Canonical Definitions (Static/Offline Cache) | All UNO Entities and Docs | 1. IDL Files (*.idl) Primary. 2. regview tool output: (Reads .rdb files from workdir/Rdb/ or install). 3. Doxygen comments in IDL? 4. idlc/cppumaker intermediate output? | Parse IDL Text + Doxygen comments Parse regview output? Research idlc dump options? https://docs.libreoffice.org/codemaker.html | sQualifiedName, eKind, mapMembers (recursive for complex types), aParameters (name, fully qualified type, mode in/out/inout), sReturnTypeName, inheritance hierarchy (base interfaces/services) | DONE. We successfully implemented the InitializeUnoTree logic which uses a variation of this (getAvailableServiceNames) to build the tree. We can refine it to use XTypeDescriptionEnumerationAccess for even more completeness. | Definitive Plan: Generate a cache file (SQLite/Binary) during the LO build process using our InitializeUnoTree logic. The IDE loads this file on first run. | The sheer volume of APIs (~20,000+ types). Reconstructing the hierarchy from a flat list. | The entire API surface available in the VBA Object Browser. | |||||||||||||||||
16 | B. Runtime Reflection (Dynamic/Live Info) | Live UNO Object Members and Type Info | SbUnoObject (sbunoobj.cxx), XIntrospectionAccess, reflection::XIdlClass. (Data from .rdb). Tools > Development Tools (IDE UI) https://docs.libreoffice.org/stoc.html workdir/UnoApiHeadersTarget/udkapi/bootstrap/com/sun/star/reflection/XIdlClass.hpp | SbUnoObject::doIntrospection() theCoreReflection->forName(...) DevTools UI uses these on live objects. regview on .rdb files? | Member sName, eKind, types, params. Hierarchy | DONE. Our PoC #2 successfully used theCoreReflection to get detailed member info. Our GetMembers implementation in the Object Browser now uses this live. | Live query. This is an "on-demand" operation for a single selected type. | Performance is a concern, but our IdeTimer shows that single introspection calls are very fast. The main challenge is ensuring robust error handling (e.g., for generic types). | The result of inspecting a live oSheet object in VBA's debugger/watch window. | |||||||||||||||||
17 | C. Doxygen Output (Documentation) | Human readable API Docs | api.libreoffice.org (Generated from IDL comments & source) https://wiki.documentfoundation.org/Development/Doxygen | Web Browsing? | osBriefDescription | |||||||||||||||||||||
18 | D. SDK | Curated API set, Tools, Examples | LibreOffice SDK package (idl/, bin/ for regview, idlc, cppumaker). workdir/UnoApiHeadersTarget/ shows C++ headers made by cppumaker | SDK IDLs are a source. Tools (regview, idlc) are for investigation. cppumaker generated C++ headers? | From SDK IDLs (Similar to A?) | |||||||||||||||||||||
19 | ||||||||||||||||||||||||||
20 | IDE related Context | |||||||||||||||||||||||||
21 | A. Editor State | Cursor Position, Line Content, Trigger Word/Char | EditorWindow, TextView, TextEngine (basctl/baside2b.cxx, vcl/text*.hxx) | EditorWindow::GetEditView() ->GetSelection(), (svx/source/dialog/weldeditview.cxx) GetEditEngine()->GetText() GetWordAtCursor(), KeyInput event for char. | Input for IdeCompletionContext | |||||||||||||||||||||
22 | B. Logical Scope | Current Module, Procedure (at cursor) | Determined by Master Analyzer by parsing upwards from cursor | Analyzer parses from cursor to identify containers | sCurrentLibrary, sCurrentModule, sCurrentProcedure for IdeCompletionContext. | |||||||||||||||||||||
23 | ||||||||||||||||||||||||||
24 | ||||||||||||||||||||||||||
25 | ||||||||||||||||||||||||||
26 | ||||||||||||||||||||||||||
27 | ||||||||||||||||||||||||||
28 | ||||||||||||||||||||||||||
29 | ||||||||||||||||||||||||||
30 | ||||||||||||||||||||||||||
31 | ||||||||||||||||||||||||||
32 | ||||||||||||||||||||||||||
33 | ||||||||||||||||||||||||||
34 | ||||||||||||||||||||||||||
35 | ||||||||||||||||||||||||||
36 | ||||||||||||||||||||||||||
37 | ||||||||||||||||||||||||||
38 | ||||||||||||||||||||||||||
39 | ||||||||||||||||||||||||||
40 | ||||||||||||||||||||||||||
41 | ||||||||||||||||||||||||||
42 | ||||||||||||||||||||||||||
43 | ||||||||||||||||||||||||||
44 | ||||||||||||||||||||||||||
45 | ||||||||||||||||||||||||||
46 | ||||||||||||||||||||||||||
47 | ||||||||||||||||||||||||||
48 | ||||||||||||||||||||||||||
49 | ||||||||||||||||||||||||||
50 | ||||||||||||||||||||||||||
51 | ||||||||||||||||||||||||||
52 | ||||||||||||||||||||||||||
53 | ||||||||||||||||||||||||||
54 | ||||||||||||||||||||||||||
55 | ||||||||||||||||||||||||||
56 | ||||||||||||||||||||||||||
57 | ||||||||||||||||||||||||||
58 | ||||||||||||||||||||||||||
59 | ||||||||||||||||||||||||||
60 | ||||||||||||||||||||||||||
61 | ||||||||||||||||||||||||||
62 | ||||||||||||||||||||||||||
63 | ||||||||||||||||||||||||||
64 | ||||||||||||||||||||||||||
65 | ||||||||||||||||||||||||||
66 | ||||||||||||||||||||||||||
67 | ||||||||||||||||||||||||||
68 | ||||||||||||||||||||||||||
69 | ||||||||||||||||||||||||||
70 | ||||||||||||||||||||||||||
71 | ||||||||||||||||||||||||||
72 | ||||||||||||||||||||||||||
73 | ||||||||||||||||||||||||||
74 | ||||||||||||||||||||||||||
75 | ||||||||||||||||||||||||||
76 | ||||||||||||||||||||||||||
77 | ||||||||||||||||||||||||||
78 | ||||||||||||||||||||||||||
79 | ||||||||||||||||||||||||||
80 | ||||||||||||||||||||||||||
81 | ||||||||||||||||||||||||||
82 | ||||||||||||||||||||||||||
83 | ||||||||||||||||||||||||||
84 | ||||||||||||||||||||||||||
85 | ||||||||||||||||||||||||||
86 | ||||||||||||||||||||||||||
87 | ||||||||||||||||||||||||||
88 | ||||||||||||||||||||||||||
89 | ||||||||||||||||||||||||||
90 | ||||||||||||||||||||||||||
91 | ||||||||||||||||||||||||||
92 | ||||||||||||||||||||||||||
93 | ||||||||||||||||||||||||||
94 | ||||||||||||||||||||||||||
95 | ||||||||||||||||||||||||||
96 | ||||||||||||||||||||||||||
97 | ||||||||||||||||||||||||||
98 | ||||||||||||||||||||||||||
99 | ||||||||||||||||||||||||||
100 |