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

List:       quanta-devel
Subject:    Re: [quanta-devel] [Quanta] Class Variables autocompletion
From:       Andras Mantia <amantia () kde ! org>
Date:       2007-02-07 11:28:05
Message-ID: 200702071328.06041.amantia () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Moved here from the user list...

> Thanks,
> I started to play with the code, and, without making any changes,
> except those to the description.rc file you suggested, it works!

Works, but has some bugs. ;-)

> Variables and functions are now listed (functions first, variables
> second....).
> The "wrong" variables (class function variables) are filtered as
> well!

Partly. Try to add an argument to a function and you will see that those 
are listed as well.

> The only real problem is when you select the autocomplete entry it
> appends the function open bracket "(" to the variables as well. I
> figure this is in the auto-complete section in document.cpp, rather
> then the sagroupparser.cpp file?

Hm, partly yes, I think. The problem is that with the modification in 
description.rc, variables are treated just like functions. In 
Document::slotFilterCompletion you can see that 
the "completionDTD->attrAutoCompleteAfter" is appended after the string 
if the type of the completion is "script". And in 
Document::getTagCompletions of course in case of PHP the type is set 
to "script". The easiest way might be to add a hint in to the qTag 
similar to className about the fact if it is a "function" 
or "variable". Than in the filtering code, 
the "completionDTD->attrAutoCompleteAfter" would be appended only for 
functions. This would also make it possible to sort the completion list 
(e.g variables first and methods later).

 Regarding the filtering, I see two solutions:

1) add a field in description.rc for the variables about how they are 
declared when they are member variables.
2) ignore variables that are inside ( ). If this is generic enough, I'd 
say it is better.

So from what I see, it is rather simple to do this. Will you do it? :-)

> I might look into reading doxygen/javadoc/PHPDoc, etc style comments
> and displaying them? any recomendations for how to implement?

What would you implement there? Sorry, I did not understood it.

BTW, something other to think about is support for PHP superglobals. I 
don't think it is too hard, somehow the .tag files have to describe the 
globals and they should be treated just like variables (members of the 
Variables group). 

> I will warn you, I am very rusty in my c++ :-)

Practicing will surely help. ;-)

Andras	

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

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

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


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

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