Christian Kamm
7a5df3c39d
QuickFix: Move helpers from QuickFixData to RefactoringFile.
...
Makes them easy to use everywhere. Also when calling
QuickFixData::textOf and friends, it wasn't really clear which file
they would run on.
2010-08-13 12:51:22 +02:00
Christian Kamm
bbe64796a0
QuickFix: Introduce CppRefactoringFile.
2010-08-13 12:51:22 +02:00
Christian Kamm
0355e37e53
QuickFix: Migrate to a nicer API for cross-file quick fixes.
2010-08-12 14:21:35 +02:00
Erik Verbruggen
6bbc732a29
Sprinkled a bit of doxymentation over various classes.
2010-07-28 17:34:00 +02:00
Erik Verbruggen
b2659950e2
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.
2010-07-27 15:32:40 +02:00
Erik Verbruggen
d980e37e24
Reworked the QuickFix infrastructure.
2010-07-26 13:07:19 +02:00
Roberto Raggi
1702543d80
Added a simple quickfix to declare local variable.
2010-07-19 19:12:24 +02:00
Roberto Raggi
e78380fdf2
Share the LookupContext.
2010-07-19 18:27:11 +02:00
Roberto Raggi
23aa0af883
Introduced IQuickFixFactory.
2010-06-22 15:59:21 +02:00
Roberto Raggi
3e7c7296d1
Move using declarations.
2010-06-22 15:59:21 +02:00
Roberto Raggi
eb749ec3a2
Generalized the changeset operations.
2010-06-22 12:13:30 +02:00
Roberto Raggi
b13d6ae362
Removed CppQuickFixOperation::cppRefactoringChanges().
2010-06-22 12:13:30 +02:00
Roberto Raggi
91eff02007
Moved CppRefactoringChanges.
2010-06-22 12:13:30 +02:00
Erik Verbruggen
f3faf34db9
Removed implicit change set and related utility methods.
2010-06-14 17:16:45 +02:00
Erik Verbruggen
297b281ced
Added infrastructure to change multiple files at once.
2010-06-14 15:03:10 +02:00
Roberto Raggi
f5dae8bc9f
Refactored the quickfix engine.
2010-06-07 12:16:45 +02:00
Roberto Raggi
bcf50a0a49
Generalized the quickfix collector.
2010-06-03 15:15:11 +02:00
Roberto Raggi
3d81ae8574
Reduced the usage of CppQuickFixOperation.
2010-06-03 14:45:55 +02:00
Roberto Raggi
a40349c09b
Reimplemented the C++ quick fix operations using TextEditor::QuickFixOperation.
2010-06-03 14:24:12 +02:00
Roberto Raggi
b39d48fcc9
Removed unused code.
2010-05-26 15:39:19 +02:00
Roberto Raggi
49c75444bd
Removed obsolete code.
2010-05-26 13:55:10 +02:00
Roberto Raggi
32a84df5c0
Deprecated the current LookupContext.
2010-05-05 16:36:44 +02:00
hjk
9595504bda
Long live the king!
2010-03-05 11:28:13 +01:00
Roberto Raggi
1ba889a1bf
Generalized the filtering of completion items.
2010-01-26 11:44:45 +01:00
Erik Verbruggen
c50172e201
Changed string-wrapping quickfix to handle @"strings".
2010-01-06 17:39:35 +01:00
Christian Kamm
f463f3ab07
Quickfix: Use a LookupContext instead of TypeOfExpression to get type.
...
There's no need to reparse something we already got the AST of.
2009-12-23 14:54:02 +01:00
Christian Kamm
0daf22c7a0
Quickfix: Add a typeOf helper to conveniently get the type of an expr.
...
Reviewed-by: Erik Verbruggen
2009-12-23 12:56:51 +01:00
Christian Kamm
4c427aec82
Quickfix: Be more efficient when looking up token start/end positions.
2009-11-26 15:00:54 +01:00
Christian Kamm
43129a2928
Quickfix: Add flip helpers.
2009-11-26 14:48:53 +01:00
Christian Kamm
36913baf94
Quickfix: Rewrite existing code to use the new edit operations.
2009-11-26 14:01:08 +01:00
Roberto Raggi
efdd8ceaa0
Rename applyChangeSet() to apply()
2009-11-25 12:28:22 +01:00
Roberto Raggi
83b5f43198
Reorder members of CppQuickFixOp
2009-11-25 12:25:53 +01:00
Roberto Raggi
3e93c5eff7
Some more cleanup
2009-11-25 12:22:55 +01:00
Roberto Raggi
8545851927
Split create/apply change set.
2009-11-24 12:48:36 +01:00
Roberto Raggi
6594f7a267
Added getters
2009-11-24 12:39:34 +01:00
Roberto Raggi
4abd0aeff3
Removed the extra QTextCursor formal argument from QuickFixOperator::match().
2009-11-24 11:49:56 +01:00
Roberto Raggi
e43bd82afb
Renamed TextWriter to ChangeSet
2009-11-24 11:30:26 +01:00
Roberto Raggi
bab8c94f13
Show the quickfixes in the context menu.
2009-11-23 16:55:25 +01:00
Christian Kamm
67e2ecb663
QuickFix: rename contains->isCursorOn, remove selectNode,selectToken
...
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2009-11-23 16:18:34 +01:00
Christian Kamm
bc92b63ee1
QuickFix: Add braces to a single-line if statement.
2009-11-20 15:24:46 +01:00
Roberto Raggi
ea40dfbf7e
Cleanup
2009-11-20 13:08:27 +01:00
Roberto Raggi
9903b0aedb
Added quickfix operation to split simple-declarations. E.g. int a, b; will be replaced with int a; int b;.
2009-11-20 10:47:19 +01:00
Roberto Raggi
eec54d4089
Improve if condition splitting.
...
Done-with: ckamm
2009-11-19 17:07:20 +01:00
Christian Kamm
8e16ea717a
Make more QuickFixOperation helpers available.
...
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2009-11-18 14:53:35 +01:00
Christian Kamm
e2ef1d8298
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 >
2009-11-18 11:28:06 +01:00
Christian Kamm
fd17d2f98f
QuickFixOperation: don't pass the text cursor in constructor and apply
...
Instead, reintroduce setTextCursor and let CPPQuickFixCollector
call it just before invoking apply.
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com >
2009-11-18 11:10:50 +01:00
Roberto Raggi
576a1ee31f
Build the list of the visible AST nodes (aka AST path).
2009-11-16 16:18:08 +01:00
Roberto Raggi
0b277f2fbe
Show how to use the quick fix engine.
2009-11-13 16:43:26 +01:00
Roberto Raggi
c13b8697d2
Introduced the quick fix engine
2009-11-13 16:14:38 +01:00