Commit 589d9c77 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Rename "Update Code Model" to "Reparse Externally Changed Files"

It was not clear what "Update Code Model" did.

Change-Id: I245307039f8770047b80c7234481099edfe60bc9
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent a2615c61
......@@ -170,12 +170,10 @@
If you change the default behavior, the shortcuts for opening link targets
in the next split are used to open them in the current split.
\section1 Using Update Code Model
To refresh the internal information in \QC pertaining to your code,
select \gui{Tools} > \gui{C++} > \gui{Update Code Model}.
\note In \QC indexing updates the code automatically. Use
\gui{Update Code Model} only as an emergency command.
\section1 Reparsing Externally Changed Files
If source files are modified from outside \QC, the opened files will be
reparsed automatically. For all other files, you can use \gui{Tools} >
\gui{C++} > \gui{Reparse Externally Changed Files} to update the code
model.
*/
......@@ -102,7 +102,7 @@ CppEditorPlugin::CppEditorPlugin() :
m_sortedOutline(false),
m_renameSymbolUnderCursorAction(0),
m_findUsagesAction(0),
m_updateCodeModelAction(0),
m_reparseExternallyChangedFiles(0),
m_openTypeHierarchyAction(0),
m_openIncludeHierarchyAction(0),
m_quickFixProvider(0)
......@@ -272,10 +272,10 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
// Update context in global context
cppToolsMenu->addSeparator(globalContext);
m_updateCodeModelAction = new QAction(tr("Update Code Model"), this);
cmd = ActionManager::registerAction(m_updateCodeModelAction, Constants::UPDATE_CODEMODEL, globalContext);
m_reparseExternallyChangedFiles = new QAction(tr("Reparse Externally Changed Files"), this);
cmd = ActionManager::registerAction(m_reparseExternallyChangedFiles, Constants::UPDATE_CODEMODEL, globalContext);
CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance();
connect(m_updateCodeModelAction, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles()));
connect(m_reparseExternallyChangedFiles, SIGNAL(triggered()), cppModelManager, SLOT(updateModifiedSourceFiles()));
cppToolsMenu->addAction(cmd);
m_actionHandler = new TextEditor::TextEditorActionHandler(CppEditor::Constants::C_CPPEDITOR,
......@@ -359,7 +359,7 @@ void CppEditorPlugin::onTaskStarted(Core::Id type)
if (type == CppTools::Constants::TASK_INDEX) {
m_renameSymbolUnderCursorAction->setEnabled(false);
m_findUsagesAction->setEnabled(false);
m_updateCodeModelAction->setEnabled(false);
m_reparseExternallyChangedFiles->setEnabled(false);
m_openTypeHierarchyAction->setEnabled(false);
m_openIncludeHierarchyAction->setEnabled(false);
}
......@@ -370,7 +370,7 @@ void CppEditorPlugin::onAllTasksFinished(Core::Id type)
if (type == CppTools::Constants::TASK_INDEX) {
m_renameSymbolUnderCursorAction->setEnabled(true);
m_findUsagesAction->setEnabled(true);
m_updateCodeModelAction->setEnabled(true);
m_reparseExternallyChangedFiles->setEnabled(true);
m_openTypeHierarchyAction->setEnabled(true);
m_openIncludeHierarchyAction->setEnabled(true);
}
......
......@@ -312,7 +312,7 @@ private:
bool m_sortedOutline;
QAction *m_renameSymbolUnderCursorAction;
QAction *m_findUsagesAction;
QAction *m_updateCodeModelAction;
QAction *m_reparseExternallyChangedFiles;
QAction *m_openTypeHierarchyAction;
QAction *m_openIncludeHierarchyAction;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment