Feature #126

Improve "import directory tree"

Added by Miroslav Fidler almost 8 years ago. Updated almost 8 years ago.

Status:ApprovedStart date:10/14/2011
Priority:UrgentDue date:
Assignee:Miroslav Fidler% Done:

100%

Category:IDESpent time:-
Target version:-

uppsrc.diff Magnifier - The diff file to apply for uppsrc directory (3.82 KB) Sender Ghost, 10/19/2011 10:55 AM

126_uppsrc2.diff Magnifier - The diff file to apply for uppsrc directory (second version) (5.17 KB) Sender Ghost, 11/08/2011 09:35 AM

History

#1 Updated by Miroslav Fidler almost 8 years ago

  • Category set to IDE

#2 Updated by Sender Ghost almost 8 years ago

  • File uppsrc.patch added
  • Status changed from New to Patch ready
  • % Done changed from 0 to 100

I created a patch for this feature, which adds "Preserve directories" option to "Special -> Import directory tree sources.." dialog.

#3 Updated by Sender Ghost almost 8 years ago

  • File deleted (uppsrc.patch)

#4 Updated by Sender Ghost almost 8 years ago

More correct patch version.

#5 Updated by Sender Ghost almost 8 years ago

  • File uppsrc2.diff added
  • Assignee set to Miroslav Fidler
I did following changes for second version of the patch:
  • Refactored previous changes.
  • Changed "Preserve directories" to "Including tree structure" option name.
  • Added meaningful text for error messages.
  • Used the same API between DoImport and DoImportTree functions, with some wrappers around them.

#6 Updated by Miroslav Fidler almost 8 years ago

  • Priority changed from Normal to Urgent

#7 Updated by Miroslav Fidler almost 8 years ago

  • Assignee changed from Miroslav Fidler to Sender Ghost

Why is there #ifdef PLATFORM_WIN32

uppsrc/ide/UppWspc.cpp 508

#ifndef PLATFORM_WIN32
    Sort(files);
    Sort(dirs);
#endif

now?

#8 Updated by Sender Ghost almost 8 years ago

Why is there #ifdef PLATFORM_WIN32 now?
Because on Windows (with NTFS file system, in my case) the files and directories sorted by their order (case insensitive).
But for PLATFORM_LINUX, PLATFORM_BSD, etc. this is needed, because of unsorted inodes.
If you want identical results on all platforms, this defines could be removed.

#9 Updated by Sender Ghost almost 8 years ago

  • Assignee changed from Sender Ghost to Miroslav Fidler

#10 Updated by Sender Ghost almost 8 years ago

  • File deleted (uppsrc2.diff)

#11 Updated by Sender Ghost almost 8 years ago

Ok, I think, this is much better version.
Directories and files are sorted by GetLanguageInfo.

#12 Updated by Sender Ghost almost 8 years ago

This will lead to following results for uppsrc/CppBase import:
Before:

Base.cpp
CppBase.h
Parser.cpp
Pre.cpp
Qualify.cpp
Scopefo.cpp
cpplex.cpp

After:
Base.cpp
CppBase.h
cpplex.cpp
Parser.cpp
Pre.cpp
Qualify.cpp
Scopefo.cpp

At least, on Windows operating system.

#13 Updated by Miroslav Fidler almost 8 years ago

  • Status changed from Patch ready to Approved

...no, LanguageInfo IMO is not a good choice, we are dealing here with C/C++ sources, not some armenian novel...

Changed to stricmp..

Also available in: Atom PDF