Commit Graph

259 Commits

Author SHA1 Message Date
Thorbjørn Lindeijer
a456164631 Simplify finding the best match for switching to definition
Also make sure it searches for the best match in all files that define
potential matching definitions.
2010-03-09 17:38:56 +01:00
Alexander Anokhin
a72042ab6a Fixed switch from declaration to definition
Added compatibility scores to functions - candidates to switch to

Merge-request: 121
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2010-03-09 17:38:56 +01:00
Erik Verbruggen
417a1c9f28 Fixed QTCREATORBUG-745.
Fixed crash in FindUsages on a dirty file in a large project, which is saved
while the FindUsages is still running.
2010-03-09 17:38:02 +01:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Christian Kamm
ced28c7090 Use the fully qualified name when registering the SemanticInfos.
Both for CppEditor::Internal::SemanticInfo and QmlJSEditor::Internal::
SemanticInfo.
2010-02-16 15:29:21 +01:00
Erik Verbruggen
4df9b37542 Fixed local usage highlighting for ObjC message parameters. 2010-02-11 10:02:00 +01:00
Erik Verbruggen
b58cb740e5 Changed ObjC message arguments to have SimpleName for the name part. 2010-02-08 09:34:51 +01:00
Jeffrey Baumes
fa5f9246c2 Adding indented braces option.
Merge-request: 1949
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2010-02-05 16:25:22 +01:00
Erik Verbruggen
62705df65f Moved indentation utility method from CPPEditor into BaseTextEditor.
Reviewed-by: Roberto Raggi
2010-02-03 16:50:21 +01:00
Roberto Raggi
7c88796002 Changed BaseTextEditor::Link to use a pair of offsets (begin, end) instead of position and length.
Done with: Thorbjorn.
2010-02-01 16:18:27 +01:00
Oswald Buddenhagen
75b42f18d8 Merge remote branch 'origin/1.3'
Trailing whitespace removal re-applied manually.
2010-01-29 22:50:23 +01:00
Oswald Buddenhagen
a6ca348636 remove trailing whitespace
doing it in 1.3 as well to avoid possible later conflicts
2010-01-29 21:33:57 +01:00
Roberto Raggi
92ed2daa6f Generalized the auto complete of braces. 2010-01-12 13:32:19 +01:00
con
a24738ffab Fixes: Diff editors don't get correct name.
They were no longer showing e.g. the file name of the diffed file.
Also separate editor id and editor context a bit.
2010-01-11 16:54:30 +01:00
Thorbjørn Lindeijer
79bf418305 Fixed logic for whether to skip or insert a closing brace
Due to wrongly checking whether findPreviousBlockOpenParenthesis and
findNextBlockOpenParenthesis actually found anything, the wrong range
was counted when a code block start or end was not found.

Reviewed-by: mae
2010-01-11 16:17:28 +01:00
Tobias Hunger
b95c86db23 Remove duplicate inclusions of headers
Reviewed-by: thorbjorn
2010-01-11 10:26:12 +01:00
Tobias Hunger
a6ad773722 Make method naming more consistent.
* Use id() for methods returning a string used to represent
    some type of object.
  * Use displayName() for strings that are meant to be user
    visible.
  * Quieten some warnings while touching the files anyway.
  * Move Factories to their products in the plugins where that
    was not done before.

Reviewed-by: dt
2010-01-07 18:17:24 +01:00
Erik Verbruggen
5723682b21 Fixes for highlighting locals in Objective-C methods. 2010-01-06 17:39:35 +01:00
Thorbjørn Lindeijer
2ab738cd7a Small indentation fix 2010-01-06 14:34:36 +01:00
Christian Kamm
f90f9e4879 Find macro uses.
Reviewed-by: Erik Verbruggen
2009-12-21 14:57:05 +01:00
Christian Kamm
c3cc7cf4d8 Enhance data stored for macros and macro uses.
In preparation for finding macro uses.

* Macro: add offset and length
* MacroUse: add line
* Document: add convenience functions for finding a macro definition, use
  or undefined use at a given location.

Reviewed-by: Erik Verbruggen
2009-12-21 14:57:05 +01:00
Erik Verbruggen
f229a7618a Added highlighting for locals in ObjC methods. 2009-12-18 17:26:07 +01:00
Roberto Raggi
51de95c497 Use the text editor revision to ignore outdated parse results. 2009-12-15 15:52:55 +01:00
Thorbjørn Lindeijer
d20cdc64e3 Merge remote branch 'origin/1.3' 2009-12-08 11:26:05 +01:00
Thorbjørn Lindeijer
9839dea6bc Fixed autoindent when using tabs instead of spaces
Several special cases that are handled by the CPPEditor did not take
into account code that was using tab characters.

Task-number: QTCREATORBUG-292
Reviewed-by: Roberto Raggi
2009-12-08 11:09:11 +01:00
Roberto Raggi
14376c3c32 Initial work on the new CPlusPlus::Snapshot.
Encapsulate the details.
2009-12-07 10:54:27 +01:00
mae
58b009d3db fix a small "flicker" issue when aborting or accepting renaming 2009-12-03 19:23:29 +01:00
mae
c1120587a8 Merge commit 'origin/1.3'
Conflicts:
	src/plugins/cppeditor/cppeditor.cpp
2009-12-03 18:41:21 +01:00
mae
480c9a5bf4 refactor rename selections
the new approach makes it possible to use more edit features
inside the rename selection like cut/copy/paste. Furthermore
it compresses rename operations better on the undo stack.
2009-12-03 18:35:36 +01:00
Thorbjørn Lindeijer
5fa8baf47c Fixed in-place renaming when text is selected
This handles the case with the selection inside the name correctly, and
aborts when part of the selection is outside of the name. Previously, a
selection could cause the text to get inserted backwards.

Task-number: QTCREATORBUG-302
Reviewed-by: Roberto Raggi
2009-12-03 15:57:35 +01:00
Roberto Raggi
7c7ce13ac0 Use const names. 2009-12-01 12:46:23 +01:00
Roberto Raggi
fade61a8a9 Use const literals. 2009-12-01 11:46:36 +01:00
mae
32d0bc1ff2 some tuning of the layer extra selections
Remove overlap. Add extra selection tooltips for the cpp hover handler.
2009-11-30 17:24:06 +01:00
Roberto Raggi
527a9bd526 Inital support for Q_D/Q_Q declarations. 2009-11-30 17:07:22 +01:00
Roberto Raggi
756a67854a Highlight unused symbols. 2009-11-30 15:21:48 +01:00
Roberto Raggi
62a15e04ee Disabled the highliting of unused symbols.
We need to port the code to use the new overloay system.
2009-11-26 12:35:34 +01:00
Roberto Raggi
5bcd46b6be Preview the quickfix operation 2009-11-26 12:21:00 +01:00
Roberto Raggi
bab8c94f13 Show the quickfixes in the context menu. 2009-11-23 16:55:25 +01:00
Roberto Raggi
a579f2f27e Removed unused code. 2009-11-23 16:55:24 +01:00
Roberto Raggi
8fd0777ab0 Ensure the document is updated before invoking a quickfix. 2009-11-18 15:15:00 +01:00
Roberto Raggi
ecf40d2426 Get rid off QPair<FullySpecifiedType, Symbol *>. Use LookupItem intead. 2009-11-17 14:24:09 +01:00
Roberto Raggi
5d7def6d2a Refactored the AST visitors.
Now, the ASTVisitor constructor takes a valid reference to a TranslationUnit.
2009-11-17 13:30:39 +01:00
Roberto Raggi
c13b8697d2 Introduced the quick fix engine 2009-11-13 16:14:38 +01:00
Roberto Raggi
0ae2d96a9b Fixed the AST field names. 2009-11-10 16:47:16 +01:00
Roberto Raggi
e5eb88a31f Ported the accept methods. 2009-11-10 16:20:13 +01:00
Roberto Raggi
380bce4527 Cleanup nested name specifiers 2009-11-10 16:20:12 +01:00
Roberto Raggi
a7219736b6 Cleanup Postfix operators. 2009-11-10 16:20:12 +01:00
Roberto Raggi
8efb73f5d2 Removed TemplateArgumentListAST
Done with Erik Verbruggen
2009-11-10 16:20:10 +01:00
Roberto Raggi
66a353067d Don't show the warning message (about the dangerous world of code refactoring) if the user pressed the "Yes, I know I am doing" button. 2009-11-05 16:52:56 +01:00
Robert Loehning
e68753b48b Fixed index out of range.
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2009-11-02 19:14:40 +01:00