Review Request: When declaration not found, look at the similar ones

David Nolden zwabel+reviewboard at gmail.com
Sun Apr 19 22:10:38 UTC 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/613/#review969
-----------------------------------------------------------


That's a very good idea. But I think it completely needs to go into a background thread, since the UI is quite slow already. :-) And then should be integrated with the existing code-completion logic, so it does not only work on member functions, but also on global ones, on classes, etc. etc.(It just needs to get the list of completion items for the position of the missing use, and then do that levenshtein distance calculaten on every declaration item in that list)

- David


On 2009-04-18 20:13:08, Aleix Pol wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/613/
> -----------------------------------------------------------
> 
> (Updated 2009-04-18 20:13:08)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> Haven't you ever mistyped a class member and got an error message for that?
> Well, this patch tries to help the user by searching similar names and giving a hint.
> 
> It also works for variables.
> 
> Hope you like it :)
> 
> The code used to get the difference was got from the wikipedia (was pseudocode i translated it into c++).
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdevelop/languages/cpp/cppduchain/missingdeclarationassistant.cpp 955802 
> 
> Diff: http://reviewboard.kde.org/r/613/diff
> 
> 
> Testing
> -------
> 
> class MyClass
> {
> 	public:
> 		void aaa();
> };
> 
> int main()
> {
> 	MyClass c;
> 	c.aab(); //Here aaa is proposed
> 	
> 	int xxx;
> 	int k=xxy; //Here xxx is proposed
> 
> 	return 0;
> }
> 
> 
> Thanks,
> 
> Aleix
> 
>





More information about the KDevelop-devel mailing list