Commit Graph

32 Commits

Author SHA1 Message Date
Tobias Hunger
18f38ff18e Project: Make Project::files return a FileNameList
Change-Id: I75ceb22ac65b8288d824f229d44089cba6fc8ea3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-08 09:09:59 +00:00
Christian Stenger
4514208af2 Nim: Fix debugger start of nim projects
Task-number: QTCREATORBUG-19414
Change-Id: Ia93863a6127f4b670113cf6d9159defa4adb6ec4
Reviewed-by: hjk <hjk@qt.io>
2017-12-06 10:02:02 +00:00
Leena Miettinen
3cd6910315 Nim: Add period to the end of error message
Change-Id: I6ba6ca4f1e551329784cb44a3a2c48eef65c3b47
Reviewed-by: hjk <hjk@qt.io>
2017-10-20 13:16:46 +00:00
Tobias Hunger
09b127f9f1 Project: Move signalling of parsing state into Project
Get rid of duplicated code to do such signaling in derived Project types.

Change-Id: I26914a1d751d72ee65c15a7943e0e7f34978f042
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-26 09:29:21 +00:00
Tobias Hunger
bc22de5f0a ProjectExplorer: Do not use version manager cache in threads
Do not use VcsManager's cache of version control systems from different
threads.

Iterate over all IVersionControls instead of getting the specific version
control for a directory. This is less exact, but will probably not hurt users.

Task-number: QTCREATORBUG-18258
Change-Id: Iae2be5735a0d7ecc8d774904f6681963fca1d114
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-20 14:24:02 +00:00
Tobias Hunger
0a3409112b ProjectNodes: add listInProject() to Node
Add a setter/getter for listInProject to Node and make the project
list all nodes with this property set in Project::files.

Task-number: QTCREATORBUG-18132
Change-Id: I334e627856d1bc0d033e13c5d629f6657d8d7fee
Reviewed-by: hjk <hjk@qt.io>
2017-05-04 09:16:56 +00:00
Tobias Hunger
0951589420 Project: Unify handling of displayName
Unify the handling of displayName with a proper changed signal across
all projects.

Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-04-07 14:49:51 +00:00
Leena Miettinen
c749ec507c Nim: Fix product name capitalization and writing style in UI text
Change-Id: I277c10f87e9645a09bd7a6910fb9d5182417c9c9
Reviewed-by: hjk <hjk@qt.io>
2017-04-05 12:26:49 +00:00
Tobias Hunger
b0c7bb0f7b Project: Move ProjectDocument setup into Project class
Change-Id: I5c0ec79ddf066e37660fb9a6b24f9d882355d511
Reviewed-by: hjk <hjk@qt.io>
2017-03-29 11:53:24 +00:00
Tobias Hunger
348aa12eaa ProjectExplorer: Provide ProjectDocument and use it in all projects
Change-Id: I6e054ebf1043bd1f6748f1567f35c68394bd6528
Reviewed-by: hjk <hjk@qt.io>
2017-03-29 11:03:34 +00:00
Tobias Hunger
fc5ce1e710 ProjectExplorer: Handle project file list globally
Handle the generation of the list of files in a project globally, based
on the project tree.

Creator now has the concept of TreeManagers which can enrich the project
tree with additional data (e.g. the files found in a resource file), which
the project does not necessarily know about. So use that tree to find
the files that belong to a project instead of implementing similar features
in each project.

Change-Id: Ia375a914a1f2c0adaa427f9eda834eec2db07f68
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-27 15:32:13 +00:00
hjk
4d8352a6c1 ProjectExplorer: Add a FolderNode::addNestedNode() function
Also, rename buildTree() to addNestedNodes(), it's really
adding things, not recompletely (re-)building the subtree.

Use it whenever possible to avoid intermediate lists of items
to insert.

Change-Id: I5fde41e5b164a8a292410bd381a85f5efadf3471
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-14 12:26:22 +00:00
Tobias Hunger
49fef0ae24 ProjectExplorer: Create initial project tree
Create an initial project tree with a ProjectNode and a FileNode for
the project file itself.

Fix the Projects to not implement their own tree before they have
better data.

Change-Id: I147ccd5603d22d1d60880a97f30fd8c271eac88c
Reviewed-by: hjk <hjk@qt.io>
2017-03-10 16:22:31 +00:00
Tobias Hunger
2fde3fffa9 Make all projects generate a fresh project tree
Do not update the existing project tree anymore: Start a fresh one
and throw the old one away.

Change-Id: Ifabe293b6ca668b0672516a6d81acd5346d98fe5
Reviewed-by: hjk <hjk@qt.io>
2017-03-10 16:22:26 +00:00
hjk
c1bfc5d8ec ProjectExplorer: Follow up on too-much-magic in IProjectManager
Use a ProjectManager::registerProjectType<Project>(MimeType) function,
removing cryptic IProjectManager object ownership.

Change-Id: I212cd25bd4ee757022a8cb0decb4b8de3a112d12
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-09 10:41:33 +00:00
hjk
4d3d2d0dfb ProjectExplorer: Remove Project manager parameter from some constructors
Can be done generically when creating projects. The only wart is
the use from BaseQmakeProjectWizardDialog::writeUserFile.

Change-Id: Ie98c9f88ec142e82443e204a0075e3ae9e163752
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-28 14:56:21 +00:00
Tobias Hunger
9e8b427a70 ProjectExplorer: Nodes: Do not makeEmpty() as part of buildTree()
Do not call makeEmpty() as part of buildTree(). That makes it
impossible to combine buildTree with manual tree setup.

Change-Id: If0a0d9432fe39870917a6ba31594e8dcd6d31868
Reviewed-by: hjk <hjk@qt.io>
2017-02-24 08:40:04 +00:00
hjk
70a7f80dba Nim: Adapt file collecting code to new infrastructure
Change-Id: Iaeb931cb93a6020ef40f071fe1b3b51d411d2790
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2017-02-23 15:39:15 +00:00
Filippo Cucchetto
28d9c305ad Nim: Added support for the Nim compiler inside Kits
Change-Id: I6f9761aac0b0fc02a6974b284a7d600c1ece5b8b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-30 09:06:49 +00:00
Filippo Cucchetto
2b159ac9c9 Nim: Fixed missing update of project files on add and remove
Change-Id: Iadbd5b9b04dcb16f53a16263f94f8f44835e5793
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-20 17:04:38 +00:00
Tobias Hunger
119222fb79 Nimproject: Fix memory leak
Change-Id: I5093b7028cd7e8c7e405358041704c6442009339
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-16 11:51:14 +00:00
Filippo Cucchetto
41f6bedce3 Nim: Schedule a project rescan when new files are added or removed
Change-Id: I2b5a769e0d5e77ce2dd72e0637c0cbcd8f14875e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-13 21:22:09 +00:00
Filippo Cucchetto
3d8f42097b Nim: Simplified project scan by removing QFutureInterface
Change-Id: I60a0d3354083215661def0acd4c26c1ece00dea7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-12-13 21:21:52 +00:00
Filippo Cucchetto
ad771f9750 Nim: Removed unused FileSystemWatcher
Change-Id: I093b1536a10e5914fbfb14fc2e954c3f07907371
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-12-04 16:21:36 +00:00
Tobias Hunger
67e011ba5f ProjectExplorer: Make naming of methods on Nodes more consistent
Change-Id: I5050a020f0fc0ef4556db1d2020afeadfcd51585
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-10 15:24:02 +00:00
Tobias Hunger
ce3e586198 ProjectExplorer: Shorten space needed to store a FileType
Use class enum to shorten the FileType to quint16. This frees up a couple
of bytes per FileNode and we can have many of those.

Change-Id: I3a9ae25059690fefa15305a4268269647d6dc1c9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-03 15:55:39 +00:00
Eike Ziller
30f71eddf8 Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I245212bd45104636b1c9737b36d3db3e4af23092
2016-11-01 09:30:49 +01:00
Nikolai Kosjar
6e6d5b5309 ClangStaticAnalyzer: Tests: Rely on projects telling when they finished parsing
We relied on the CppModelManager to tell us whether a project was reparsed
after a kit change. While this worked, it was not guaranteed that the project
is really finished (and ready for e.g. building) after pushing new ProjectInfos
to the CppModelManager.

Rely on the projects telling when they are finished with parsing. This is more
accurate and future-proof.

The introduced signals in Project and SessionManager are (at the moment)
only for tests.

Change-Id: I1b368ec4585ffa8755eb28fac6d187cce31243ee
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-31 15:09:01 +00:00
Tobias Hunger
e0ee142f8d Nim: Collect project data asynchronously
... and provide a progress bar.

Change-Id: I9d57c0dd1d26325eb9e6f15c8fada9e1fc398d9f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-25 13:39:25 +00:00
Tobias Hunger
e2fef2d37b Nim: Use helpers from FolderNode
Clean up a bit.

Change-Id: Icff71c84ab23dba96b572cad00362bffcbec3270
Reviewed-by: hjk <hjk@qt.io>
2016-10-05 15:43:08 +00:00
Orgad Shaneh
c74a366df3 Nim: Cleanup includes and qbs dependencies
Change-Id: I1b6ef9d875a2b0c440e52148340337a3e3c25477
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-15 07:58:51 +00:00
Filippo Cucchetto
94fdd4d900 Added plugin for supporting the Nim programming language
The plugin support:
- basic syntax highlighting
- indentation
- project management
- run and build configuration
- debugging
- code style

Change-Id: Idfbb02a11ed570c90149a54b726beb956712e2bd
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-07 07:17:55 +00:00