Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Very first impressions and.... [FEATURE REQUESTS]
Re: Very first impressions and.... [FEATURE REQUESTS] [message #11458 is a reply to message #11457] |
Thu, 13 September 2007 20:49   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
luzr wrote on Thu, 13 September 2007 19:37 |
Once again, preprocessing in background, using "cpp", does not work. There is no result that can be used for anything useful (because the file has changed meanwhile).
|
Here I don't agree. The cpp is not useful because it makes macro substitution, so you can't use macro names in code completion, that's right.
But saying that a user is so fast typing code that he notices that the backgriund preprocess/parse has still old data, IMHO is wrong.
Quote: |
Aha! You are starting to have a clue about the problem 
So you will soon see that really the simplest solution is to do it right:) (Which +/- means caching the results of preprocessing at the end of each header).
|
No, I don't think so... why make things complicated ? Why try to make it real time stuff, very difficult task, when you can make it a background stuff sparing time and resources ?
More, if you cache the file at the end of an header you can fall n the problem we spoke about some posts ago :
test.h
#define amacro(x) x*x
test.cpp
#include "test.h"
int main()
{
int z = amacro(.... <here you should get completion right.
but then :
test2.h
#undef amacro
#define amacro(x, y) x * y
test.cpp
#include "test.h"
#include "test2.h" <--- ADDED LINE
int main()
{
int z = amacro(.... <what do you get here ?
In my example, if you want right completion, you should repreprocess/reparse file while typing, or at least detect the inclusion of test2.h and reparse the file. Long task. If you set the reparse to manual ("rescan file" button) you have the wrong completion if you don't hit the button.
And whorse, if you use the "hit the button" method, user must wait 1-4 seconds that the process is finished.
As you said before, you can't cache the results on a 'per header' basis, as results for an header may depend on previous ones.
Last but not least, you must cache a lot of data anyway. So I don't see the point of keeping it all in foreground.
again : whouldn't be better to have in memory a double buffered parse three, and swap on a timed basis with the one from the background job ?
Using background tasks have another advantage : you must have in memory ONLY the current file (and includes); when you switch to another source code, simply discard all data and start another background process. The user will maybe notice that he has no code completion for 3-4 seconds, at most.
Ciao
Max
hemm... I've another question, about layouts, but I'll start a new topic
[Updated on: Thu, 13 September 2007 20:50] Report message to a moderator
|
|
|
 |
|
Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Wed, 12 September 2007 00:50
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: unodgs on Wed, 12 September 2007 09:07
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Wed, 12 September 2007 12:26
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Wed, 12 September 2007 14:46
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Wed, 12 September 2007 16:18
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Wed, 12 September 2007 17:48
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Wed, 12 September 2007 18:12
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Wed, 12 September 2007 18:40
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Wed, 12 September 2007 20:59
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Wed, 12 September 2007 21:52
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Thu, 13 September 2007 00:15
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Thu, 13 September 2007 14:31
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Thu, 13 September 2007 16:13
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Thu, 13 September 2007 19:37
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Thu, 13 September 2007 20:49
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Fri, 14 September 2007 09:40
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Fri, 14 September 2007 12:44
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Fri, 14 September 2007 15:45
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Fri, 14 September 2007 19:46
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Tue, 25 September 2007 14:22
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Tue, 25 September 2007 16:42
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Tue, 25 September 2007 18:22
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Tue, 25 September 2007 20:02
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Tue, 25 September 2007 23:01
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Tue, 25 September 2007 23:59
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Wed, 26 September 2007 00:24
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Wed, 26 September 2007 10:17
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Wed, 26 September 2007 14:30
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mdelfede on Wed, 26 September 2007 16:59
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Fri, 14 September 2007 09:43
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Wed, 12 September 2007 11:03
|
 |
|
Re: Very first impressions and.... [FEATURE REQUESTS]
By: mirek on Wed, 12 September 2007 14:40
|
Goto Forum:
Current Time: Mon Aug 04 15:53:01 CEST 2025
Total time taken to generate the page: 0.08459 seconds
|