forked from qt-creator/qt-creator
Make the QuickFixOperation interface more useful.
* Rename cursor(unsigned/AST*) to selectToken and selectNode. These return a cursor that has the given token or AST node selected. * Rename getTokenStart/EndPosition to tokenStart/EndPosition. Instead of returning line and column numbers, return a position usable with text cursors. * Remove moveAtStart/EndOfToken. Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -70,16 +70,11 @@ public:
|
||||
|
||||
protected:
|
||||
const CPlusPlus::Token &tokenAt(unsigned index) const;
|
||||
void getTokenStartPosition(unsigned index, unsigned *line,
|
||||
unsigned *column) const;
|
||||
void getTokenEndPosition(unsigned index, unsigned *line,
|
||||
unsigned *column) const;
|
||||
int tokenStartPosition(unsigned index) const;
|
||||
int tokenEndPosition(unsigned index) const;
|
||||
|
||||
QTextCursor cursor(unsigned index) const;
|
||||
QTextCursor cursor(CPlusPlus::AST *ast) const;
|
||||
|
||||
QTextCursor moveAtStartOfToken(unsigned index) const;
|
||||
QTextCursor moveAtEndOfToken(unsigned index) const;
|
||||
QTextCursor selectToken(unsigned index) const;
|
||||
QTextCursor selectNode(CPlusPlus::AST *ast) const;
|
||||
|
||||
private:
|
||||
CPlusPlus::Document::Ptr _doc;
|
||||
|
||||
Reference in New Issue
Block a user