GSOC weekly report week 2

Gergő Mocsi gmocsi91 at
Sun Jun 23 10:29:38 PDT 2013

Hi all,
here's my weekly report of GSOC activity. This week, I've managed to hook
into the BASIC compiler, and use it for code completition. The reason is
simple: it recognizes everything (eg. variables, ..), and stores them in
the symbol table. After the parsing, I extract the data from the symbol
table. This work is done by a function
called GetCodeCompleteDataFromParse() created in SbModule, and returns a
vector of CodeCompleteData, which is a simple struct to hold variable name,
it's parent(the function where it was created, in case of global variable
nothing) and also it's type, when it's an object
(like The parsing+extracting the data
is trigerred by inserting/deleting/changing text in the ide, and is
implemented in the funtion EditorWindow::Notify. Here, I should update a
cache, but now, it simply reassigns a variable named aCodeCompleteCache
(type std::vector< CodeCompleteData > ) beacuse now the parses parses the
whole file (which may sound nasty, but it was simple to do something
working, and it may change later, as the cache). Code completition is
trigerred by pressing key "." (the dot :) ), and this is implemented in
function EditorWindow::KeyInput: when the user presses teh dot key, it
extracts the string before the dot(to the first space), and if is can be
found in aCodeCompleteCache (beacuse it was delared as a valid object),
it's methods are printed out on terminal (with SAL_WARN this time), these
method will go to a LisBox/ComboBox, which will display them, and allow the
user to select one from them. At the moment, I'm stuck witch ListBox, it
gets created, but not displaying(and Show() function is called :) ).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the LibreOffice mailing list