Commit Graph

87 Commits

Author SHA1 Message Date
Thorbjørn Lindeijer
b11d3606c2 Fixed behaviour of Home and End while renaming
Also allow starting to rename with the cursor at the end of the name.
2009-07-02 12:27:11 +02:00
Roberto Raggi
ee6d2df072 Removed unused code. 2009-07-02 11:16:14 +02:00
Thorbjørn Lindeijer
c55eb917e4 Abort rename when text is changed due to unsupported actions
Done with Roberto Raggi and mae.
2009-07-02 10:48:03 +02:00
Thorbjørn Lindeijer
d9c8f945a5 Added in-place renaming
Done with Roberto Raggi
2009-07-02 10:48:02 +02:00
Roberto Raggi
0a610c3b66 Improved the use highlighter. 2009-06-26 09:48:40 +02:00
Roberto Raggi
8433ba2d32 Store the NameAST* 2009-06-26 09:22:30 +02:00
Roberto Raggi
cdc7f03267 Visit the new expressions when search for uses. 2009-06-25 16:18:05 +02:00
Roberto Raggi
c6968d956e Mark the externals 2009-06-25 16:11:46 +02:00
Roberto Raggi
b95926c8ee typo 2009-06-25 15:18:19 +02:00
Roberto Raggi
b98fbf68c5 Use the hardcoded lightGray background for marking the uses of a local name. 2009-06-25 14:15:37 +02:00
Roberto Raggi
27f92695cf Initial work on smart highlight of local symbols. For-statements and symbols genarated from a macro expansion are not yet highlighted. 2009-06-25 12:48:55 +02:00
Roberto Raggi
0481176ea7 Highlight the locals. 2009-06-24 16:40:52 +02:00
Jason McDonald
884b7af769 Update license headers and sales contact details.
Reviewed-by: Trust Me
2009-06-17 00:01:27 +10:00
con
4f4f767b2b Merge commit 'origin/1.2' 2009-06-16 14:58:28 +02:00
Thorbjørn Lindeijer
aa2836f1dc Fixed the alignment of the line/column number label
This depended on a stretch that was removed. Instead, make the stretch
factor of the stretch 0 and make sure that the method boxes used by the
CppEditor and ScriptEditor take all its space.

Reviewed-by: con
2009-06-16 14:29:23 +02:00
Roberto Raggi
e2a0a4d7c5 Keep the original encoded text around while preprocessing. 2009-06-15 15:39:20 +02:00
Roberto Raggi
752dd880e0 Show how to simplify declarations. e.g.
static int i, *ptr = &i;

will be replaced with

static int i;
static int *ptr = &i;

using the editor's context menu > Simplify Declarations
2009-06-05 14:30:18 +02:00
Thorbjørn Lindeijer
e54bf750d9 The reformat document action isn't useful yet, removed for 1.2 2009-06-04 11:57:58 +02:00
Lorn Potter
55e7f65533 Fixes: make method combo take up more space on the toolbar, so long
class and method names can be seen.

Task:     <task number>
Details:  <additional information>
2009-05-29 04:49:31 +10:00
Thorbjørn Lindeijer
b450fa17b3 Removed colon again from the electric characters
It broke indentation for global scope operator, and when that was fixed
it broke for the class initializer lists. I'm not sure how to fix that
at the moment, so better have it not do anything rather than being in
the way.
2009-05-28 12:31:26 +02:00
Roberto Raggi
bdf6c3d0be Store the encoded file name in a QString. 2009-05-27 15:34:13 +02:00
Thorbjørn Lindeijer
7534732d3b Integrate merge-request #444 into branch 'master'
Joel Nordell (1):
      add ':' to electric keys for C++ indenting, and check for electric
         keys anywhere on line, not just at beginning

Request-url: http://gitorious.org/qt-creator/qt-creator/merge_requests/444
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2009-05-25 16:31:56 +02:00
Joel Nordell
4c07de50b2 add ':' to electric keys for C++ indenting, and check for electric keys anywhere on line, not just at beginning 2009-05-18 14:38:22 -05:00
Roberto Raggi
6195035bbf Moved unCommentSelection() in creator/libs/util so we can use it for other C-like languages (e.g QML and JS). 2009-05-14 16:37:17 +02:00
Thorbjørn Lindeijer
cf44cbf58e Added an option to disable the mouse navigation
It's conflicting too much with pasting for some, so better have the
option to just turn it off.
2009-05-13 16:07:43 +02:00
Thorbjørn Lindeijer
581dca0ad9 Rewrote PrettyPrinter to output the document exactly as it was before
This means at the moment the PrettyPrinter isn't doing anything useful,
but the idea is that from here we can improve it to adapt the code to
a certain style.

Reviewed-by: Roberto Raggi
2009-05-11 17:03:51 +02:00
Thorbjørn Lindeijer
092d8ca964 Restored changes to the overview combo that accidentally got reverted
Accidentally reverted in commit 713105ad85.
Thanks to Christian Hönig for notifying.
2009-04-27 17:27:36 +02:00
Thorbjørn Lindeijer
b6d7fecf80 Fixed navigation with F2 when at the start of a word
Reviewed-by: con
2009-04-21 15:58:48 +02:00
Thorbjørn Lindeijer
30c357b218 Removed unused method from CPPEditor 2009-04-08 15:13:17 +02:00
Thorbjørn Lindeijer
14eb3f6f26 Fixed jumping to macro definitions 2009-04-07 16:31:09 +02:00
Thorbjørn Lindeijer
bbf284bb6d Only highlight the filename of an include as link
Previously the whole line turned into a link. I think it looks a bit
nicer now.
2009-04-07 10:48:28 +02:00
Thorbjørn Lindeijer
494f0764dc Fix the navigation links on Ctrl-hover
Link position had the wrong offset. Also took out a redundant check on
token kind.
2009-04-06 15:30:14 +02:00
Roberto Raggi
68d8d83093 Simplified the code that looks for the identifier under the cursor. 2009-03-30 15:33:14 +02:00
Thorbjørn Lindeijer
222b4faba8 Don't try to jump to unresolved included files
It popped up an error saying the file couldn't be found. Better not show
a link at all.
2009-03-26 18:21:11 +01:00
Roberto Raggi
573b33d79e Jump at the matching class declaration. 2009-03-25 14:47:34 +01:00
Thorbjørn Lindeijer
8088ca2c43 Stop fighting over which mouse cursor to show on text editor
The BaseTextEditor was unconditionally setting the mouse cursor on each
mouse move event, after which the CPPEditor would set it as well when
the mouse was above a link. This caused some mouse cursor flickering, so
now the cursor is only set when it's supposed to change.

Also fixed an issue where the link wasn't removed when leaving the text
editor with the mouse while Ctrl was pressed.
2009-03-25 12:10:56 +01:00
Thorbjørn Lindeijer
9654563283 Make links to functions much more responsive
By avoiding searching for the definition when it isn't necessary.
2009-03-24 17:06:01 +01:00
Thorbjørn Lindeijer
f36ea6785c Allow configuring the color for the hover links
Cause blue doesn't fit nicely in all color schemes.
2009-03-24 17:06:01 +01:00
Thorbjørn Lindeijer
de6166fc91 Don't try to resolve plain literals or comments
There's no place to jump to in these cases.
2009-03-24 14:54:52 +01:00
Thorbjørn Lindeijer
ed9df58ae9 Don't forget to call up to the superclass 2009-03-24 14:54:52 +01:00
Thorbjørn Lindeijer
1682a41869 Include position information in the link
Allowed customizing the link for includes and macro uses and fix it for
highlighting the name.
2009-03-24 11:24:11 +01:00
Thorbjørn Lindeijer
eebe9e2fc8 Clear link emulation when Ctrl is released 2009-03-24 11:24:11 +01:00
Thorbjørn Lindeijer
c08405fed4 Turn code into links when holding Ctrl
Allows navigating the code using the mouse when pressing Ctrl. Suggested
a few times and also seen in other IDEs.
2009-03-24 11:24:11 +01:00
con
f84c651428 Refactor navigation history again, put last edit position in history
Task:     240811
2009-03-19 16:37:05 +01:00
mae
71fe3435f2 when jumping to methods in the same file, stay in the same editor (split corner case) 2009-03-18 19:20:28 +01:00
Thorbjørn Lindeijer
70d5649428 Don't show code folding margin when it isn't supported
Introduce setCodeFoldingSupported to the BaseTextEditor, and only
enabled it for the C++ and QtScript editors. This removes the useless
margin meant for code folding markers from the plain text editor and
.pro file editor.
2009-03-17 18:25:44 +01:00
Thorbjørn Lindeijer
1f3908e0a5 Avoid adding navigation history twice
This code is already in TextEditor::BaseTextEditor::openEditorAt.
2009-03-05 17:14:37 +01:00
Thorbjørn Lindeijer
166a4086c9 --warnings
Small bugfix for column to jump to.
2009-03-05 17:14:37 +01:00
Roberto Raggi
1e7d6a01e6 ignore blocks. 2009-03-04 15:50:35 +01:00
Roberto Raggi
1389287028 Jump to the symbol's declarator. 2009-03-04 15:47:26 +01:00