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 » Developing U++ » U++ Developers corner » Assist for include files
Re: Assist for include files [message #31075 is a reply to message #31074] Thu, 03 February 2011 21:58 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

raxvan wrote on Thu, 03 February 2011 19:50

When the include assist uses quotes ('"') the current file is taken (theide->editfile) and a search is performed. I can see that 'editfile' variable holds the entire path to the current edited file , therefore i extract the path from that and i perform a search based on that path. This will give only "local" files/folders.
I guess it is more of a philosophical question Smile Or matter of taste. My point of view is this: If I wan't to include something from other packages, I should include them first (so I don't forget to do it later Smile ). Secondly, if I wan't to include something from other package, I will always use <pkg/file.h> for a simple reason that another user might have different setup of assemblies (e.g. two nest from non-neighboring directories) and then "pkg/file.h" might not make sense. From this follows that a) only local package files can be shown when '"' is pressed and b) only files from loaded packages can be suggested. Both of these cases save you scanning disk, since those files are already accessible through ide.IdeWorkspace(). So the only thing that is IMHO really needed to be looked up on disk are the system headers from include directories and those doesn't change very often, so it might be even possible to cache the list in a single file to have it ready at start and check if it is up to date later (e.g. when the application is idle). That way you wouldn't even have to worry about speed. But that is all just my opinion, if you think you will need more files suggested or something else, you are free to do it Wink

raxvan wrote on Thu, 03 February 2011 19:50

I can't test CoWork anywhere because i have no single core machines Sad . CoWork is very simple to use (just Do(THISBACK(...)), and don't care how the function will run.) and i never encountered problems with this system. There will be more extensive testing later.
Using this required me to modify the current build configuration for the Ide to be multithreaded.
The "Loading..." message is there for a very short amount of time (~0.1 seconds or less) but i will keep it there in case of some existing heavy disk operations.
You can test by instructing the process to use only single core using Task manager (there should be Set Affinity in context menu for each process on Processes tab) but if it is under 1 second it is probably OK even if it was executed in serial.

Honza
 
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
Read Message
Read Message
Read Message
Previous Topic: Possible issue in Controls4U::Meter
Next Topic: external GIT clones differ in HASH --> problem when merging
Goto Forum:
  


Current Time: Wed May 15 09:04:43 CEST 2024

Total time taken to generate the page: 0.02507 seconds