Source Insight的Rebuild project功能

Source Insight的Rebuild project功能

当使用Source Insight时,有可能会出现有些定义的macro或function找不到(显示为黑),原因通常是source insight的数据库文件被破坏了,这时可以用“Rebuild Project”这个选项去重新生成数据库文件:选择“project->Rebuild Project->Re-Create the whole project from scratch”。

Rebuild Project

The Rebuild Project command rebuilds the project database files.

You may want to rebuild the project to get all the files re-parsed after a large change, or if you suspect the project data is not correct.

A project may become corrupted if Source Insight was abnormally aborted without closing the project.

The Rebuild Project dialog box also lists some statistics about your project. The number of symbol database records, symbol index entries, and files is displayed. This information is also output by the Project Report command.

There are three methods of rebuilding the project. The last method is recommended.

Re-Parse all source files

This simply scans all the files in the project, and re-parses them to update the symbol database. This is the slowest method. However, if you cancel the operation, the symbol database will be left intact, although it may be slightly out of date. If you cancel, you can continue to edit normally and the re-parsing will continue in the background. The symbol database will be at least as current as it was when you began the rebuild process.

Fix database file corruption, if any

This option scans the databases and ensures that the databases are in a legal, self-consistent state. However, some files or symbols may be missing from the databases after the rebuild is complete if you recently added or removed files from your project. This is the fast method. You should use this command if you suspect that your project is corrupted. Normally, Source Insight can detect if a project was not closed properly when it tries to open the project. If Source Insight detects that the project is corrupt, it will ask you if you want to rebuild the project. Source Insight will not knowingly allow you to open a corrupted project.

Re-Create the whole project from scratch (recommended)

This is the most thorough method of rebuilding the project, and it is the recommended method. This deletes all symbolic information about the project, and rescans all the source files to regenerate the symbol database from scratch. It may take more time than the Fix database file corruption method. If you cancel it, the symbol database will be only partly complete. Source Insight will only have knowledge of symbols in the files that have been scanned. The background synchronization will complete the parsing. Alternatively, you can complete the process by using the Project > Synchronize Files command.

重建项目

重建项目命令重建项目数据库文件。

您可能希望重新构建项目,以便在进行较大更改后重新解析所有文件,或者如果您怀疑项目数据不正确的话。

如果在不关闭项目的情况下异常中止了源代码洞察,则项目可能会损坏

“重建项目”对话框还列出了有关项目的一些统计信息。将显示符号数据库记录、符号索引项和文件的数量。此信息也由Project Report命令输出。

重建工程有三种方法。建议使用最后一种方法。

重新解析所有源文件

这只是扫描项目中的所有文件,并重新解析它们来更新符号数据库。这是最慢的方法。但是,如果取消操作,符号数据库将保持不变,尽管它可能稍微有些过时。如果取消,则可以继续正常编辑,重新解析将在后台继续。符号数据库至少与您开始重新构建过程时一样最新。

修复数据库文件损坏(如果有的话)

此选项扫描数据库并确保数据库处于合法的、自洽的状态。但是,如果最近从项目中添加或删除了文件,则在重新构建完成后,数据库中可能会丢失一些文件或符号。这是最快的方法。如果您怀疑您的项目已损坏,应该使用此命令。通常,Source Insight可以在试图打开项目时检测项目是否没有正确关闭。如果Source Insight检测到项目已损坏,它将询问您是否要重新构建项目。Source Insight不会故意允许您打开已损坏的项目。

从头创建整个项目(推荐)

这是重建项目最彻底的方法,也是推荐的方法。这将删除关于项目的所有符号信息,并重新扫描所有源文件以从头生成符号数据库。它可能比Fix数据库文件损坏方法花费更多的时间。如果您取消它,符号数据库将只完成部分。Source Insight只知道已扫描文件中的符号。后台同步将完成解析。或者,您可以使用Project > Synchronize Files命令完成该过程。

免责声明:本网信息来自于互联网,目的在于传递更多信息,并不代表本网赞同其观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,并请自行核实相关内容。本站不承担此类作品侵权行为的直接责任及连带责任。如若本网有任何内容侵犯您的权益,请及时联系我们,本站将会在24小时内处理完毕。
相关文章
返回顶部