Added the InsertionPointLocator.

For answers to questions about where to insert a snippet/chunk of C++ code. Ok,
currently it will only find the One And Only place to insert method
declarations in classes, and it will need some tuning.
This commit is contained in:
Erik Verbruggen
2010-07-27 15:29:16 +02:00
parent 51d6b09efc
commit b2659950e2
8 changed files with 376 additions and 98 deletions

View File

@@ -159,7 +159,7 @@ QStringList RefactoringChanges::apply()
BaseTextEditor *editor = editorForFile(m_fileNameToShow);
editorManager->activateEditor(editor->editableInterface());
if (m_lineToShow != -1)
editor->gotoLine(m_lineToShow + 1, m_columnToShow + 1);
editor->gotoLine(m_lineToShow + 1, m_columnToShow);
}
return changed.toList();
@@ -205,6 +205,11 @@ BaseTextEditor *RefactoringChanges::editorForNewFile(const QString &fileName)
return editorForFile(fileName, true);
}
/**
* \param fileName the file to open
* \param line the line to focus on, 0-based
* \param column the column to focus on, 0-based
*/
void RefactoringChanges::openEditor(const QString &fileName, int line, int column)
{
m_fileNameToShow = fileName;