Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #11784 is a reply to message #11782] Tue, 25 September 2007 20:02 Go to previous messageGo to previous message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
luzr wrote on Tue, 25 September 2007 18:22


Bacgkground processing really is not possible, I have shown you before. You do not know when it is supposed to stop. You cannot get a list of macros from preprocessor so that you can continue.



Why ? Doing it in background you don't have to stop. You can (if you want) keep parsing the file and includes in background and switch from 2 contexts on the fly... All you can notice with this way is an outdated context between 2 parse cycles but, if you don't type (and think) at light speed, that would be unnoticeable.

Just an example of what can happen :
1) you start with this file :

#include <stdio.h>

int dosomething(int a, int b)
{
return a*b;
}

main()
{
dosomething( <-- CODE COMPLETION HERE)

}

After the first (background) scan, that works. Now, let add an include file 'inc.h' :

#define dosomething(x) (x)+2

So, you add an include in your file :

#include <stdio.h>

int dosomething(int a, int b)
{
return a*b;
}

#include "inc.h"

main()
{
dosomething( <-- CODE COMPLETION HERE)

}

There are 2 possibilities :

a- when you're typing 'dosomething(' you've got the old context, because the new one is not ready, so you get the wrong completion. But parse times should be matter of 2-3 seconds, so it's a rare event! the time you change add the include line and move the cursor, parser usually does ts work.

b- the new parsed context is ready, the ide switches to it, and you'll get the correct completion.

I really don't see what can be wrong.... you don't have to cache macros, don't have to worry about changes of macros in includes... All you need is to continue parsing the source (and its includes) in background.

The only pitfall is to double the memory to keep 2 contexts and some cpu time lost on background parses but, for an ide those are minor problems.

ah, if you meant that you can't use CPP, you're right, I was wrong, you can't use it for macros.

Quote:


That is already there, ctrl+,



..... I keep learning new stuffs each day... Smile
Thanx for the hint!

Ciao

Max
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Escaped backslash in string confuse editor [bug]
Next Topic: Strange behaviour of the query option of TheIDE
Goto Forum:
  


Current Time: Tue May 21 17:12:06 CEST 2024

Total time taken to generate the page: 0.02665 seconds