Interesting hack. How about just using the built-in file system view?

Ciao,
Mathias

Am 18.01.2017 um 13:02 schrieb Alexander Drozdov:
Hi,

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
<https://github.com/qtproject/qt-creator/commit/f1456d3fd408183cd0cbd9a559ce7e1018e014bc>
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
properties...

*Solution:*
https://gist.github.com/h4tr3d/0b610a507ed42faeb3c32e2700fabb13#file-qtc-scan-all-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:*
https://htrd.su/wiki/_media/zhurnal/2017/01/18/qtc-all-files-wa.png

It can be extended to allow passing exclude globbing expression.

--
WBR, Alexander Drozdov
http://htrd.su


_______________________________________________
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator

_______________________________________________
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to