[Qt-creator] Show all project files in stocked CMake plugin in Hackers way
adrozdoff at gmail.com
Fri Jan 20 04:09:04 CET 2017
1) Tree view more comfortable for project navigation. File system view not
2) Right globbing pattern can be used for tree filtering as end-user want.
File system view allows only hidden files ignoring.
3) This files will be shown in Locator search using filter "Files in
Current Project". "Files in File System" good filter too, but you must
strongly known where needed file located.
1) UI freeze on a big projects (LLVM one of them) for a 2-10 sec when cmake
completed and project tree rebuilded.
2) Using this solution all files will be passed to the code model too. And
it can be broken. https://bugreports.qt.io/browse/QTCREATORBUG-17607 should
help (but it should help in most other cases too).
3) File system view simple to keep synchronized with FS using
FileSystemWatcher. This solution requires cmake restart.
2017-01-19 17:15 GMT+10:00 Mathias Hasselmann <mathias at taschenorakel.de>:
> Interesting hack. How about just using the built-in file system view?
> Am 18.01.2017 um 13:02 schrieb Alexander Drozdov:
>> Not a question, just a life-hack :-)
>> Changes, that allows showing all project files in project view is
>> discarded <https://codereview.qt-project.org/#/c/180827/>. Clarification
>> that Project View is not a Project View but Build System View is added
>> to the documentation. So, now there is no way to propagate
>> CMakeProjectManager2 <https://github.com/h4tr3d/cmakeprojectmanager2>
>> changes to the upstream at all.
>> But we can still display all files using stock plugin and existing
>> functionality. Just hack it using fake CMAKE_TOOLCHAIN_FILE...
>> *Idea: *
>> - using `file(GLOB_RECURSE ...)` scan project tree for files
>> - create fake target ALL_PROJECT_FILES with this files
>> - put it to the fake toolchain file to avoid modification of the
>> original CMakeLists.txt
>> - pass fake toolchain file to the cmake executable via Kit CMake
>> Solution allows to configure globbing expression for scanner per build
>> configuration. Via Kit CMake configuration it can be configured per-kit.
>> Look into Gist for complete instruction.
>> *Screen shot:*
>> It can be extended to allow passing exclude globbing expression.
>> WBR, Alexander Drozdov
>> Qt-creator mailing list
>> Qt-creator at qt-project.org
> Qt-creator mailing list
> Qt-creator at qt-project.org
WBR, Alexander Drozdov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator