[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Class Variables autocompletion
From:       Andras Mantia <amantia () kde ! org>
Date:       2007-02-06 11:04:09
Message-ID: 200702061304.09989.amantia () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Sunday 04 February 2007, Andras Mantia wrote:
> I will give up some details, but I also have to look at the source
> first. ;-)

Here is the information (line numbers are referring to the current svn 
version from the 3.5 branch):

- the member autocompletion is done in Document::getTagCompletions if 
the current line contains the "MemberAutoCompleteAfter" regexp right 
before the cursor. In PHP, this regexp is (?:\.|->)$, matchin "." 
or  "->".
- the interesting part of the code starts from document.cpp, line 1229, 
when we are sure that the above regular expression comes after a text 
which denotes an "usage of a class". Below we find the name of the 
class. This will go to the "classStr" variable. You may safely ignore 
the mechanism how this name is determined.
- line 1318 is where the member functions are added to the completion 
list. This happens if the current "tag" (a structure used to store 
information about a XML tag, an entity, a class, a function or a 
variable) belongs to a class with the name we found (tag->className == 
classStr) or to a class derived from this "classStr" class.

So as it can be seen, the important thing is to add the 
correct "className" to all the variables which are declared inside the 
class, but not inside the member functions of a class.

The variables are found in the parser, namely in the SAGroupParser 
(special area group parser: Special Area = non-XML area. Group = 
variables, links, functions, classes, objects or so. They are defined 
in the description.rc).

Everything interesting regarding the class members is done between lines 
203-220 of sagroupparser.cpp. This is what needs to be modified so the 
className is corectly set.

Patch is welcome.

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic