Commit Graph

156 Commits

Author SHA1 Message Date
Roberto Raggi
53b8df8155 Introduced a new kind of extra selection that we can use to mark undefined symbols. 2010-05-25 17:15:21 +02:00
mae
e07c34017e Rework code folding
The new and cleaner foldingIndent in the block user data will
make it easier to support other kinds of indentation for various
other programming languages (like Python).
2010-05-20 15:11:31 +02:00
con
1fd12ab63b Merge remote branch 'origin/2.0'
Conflicts:
	src/plugins/cpptools/cppcodecompletion.cpp
2010-05-12 17:25:40 +02:00
Thorbjørn Lindeijer
7767786cc8 Disable bracket matching when automatic insertion is disabled
When automatic insertion of brackets is disabled in the completion
settings, it is reasonable to expect the automatic matching of brackets
is also disabled.

Task-number: QTCREATORBUG-454
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
2010-05-11 15:11:12 +02:00
con
3922be1b2e Merge remote branch 'origin/2.0'
Conflicts:
	src/plugins/texteditor/texteditoractionhandler.cpp
2010-05-11 13:39:21 +02:00
mae
87b3755b6f Missing actions in keyboard options
Task-number: QTCREATORBUG-61
2010-05-07 15:40:07 +02:00
André Fillipe
32ab9878fe Added Insert Line Above/Below actions to BaseTextEditor
The actions perform exactly like their counterparts in Eclipse: a new,
indented line is inserted above or below the current line and the text
cursor is moved to the start of the new line. The line where the cursor
was before the action was triggered remains unchanged.

The shortcuts are also like in Eclipse: "Ctrl+Shift+Return" inserts a
line above the current, "Shift+Return" inserts a line below the current.

Merge-request: 140
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2010-05-03 17:03:11 +02:00
Thorbjørn Lindeijer
41ab8fbbf1 Moved TextEditDocumentLayout and related classes to their own file
The Parentheses, TextBlockUserData and TextEditDocumentLayout classes
and their member function implementations were spread around the
BaseTextEditor class. Moving them to their own file to make the code a
bit better organized.

Reviewed-by: mae
2010-04-26 14:42:11 +02:00
con
b169ff5800 Guard against use of editable interface before it's created.
Reviewed-by: Thorbjørn Lindeijer
Task-number: QTCREATORBUG-1261
2010-04-23 14:33:22 +02:00
mae
d633ec2094 Fix find scope expanding
We now use two cursors, with the first one being positioned at the
character before the find scope starts. This makes it possible
to extend the scope when typing at the beginning or the end of
it. This is more what the user expects. The effect is noticable
with find&replace of words at the beginning or end of the scope.
2010-04-13 12:07:43 +02:00
mae
bf28a3db54 Restrict find & replace to vertical block selection 2010-04-12 20:50:09 +02:00
Thorbjørn Lindeijer
cba9730802 Rename method to match signal name
Signal is called contentsChangedBecauseOfUndo
2010-04-08 16:28:04 +02:00
mae
91dac9385e Re-enable snippets
Fixed colors to use the same as refactoring rename, and a few
fixes for undo and document changes outside the tab areas.

Reviewed-by: Roberto Raggi
2010-03-29 16:45:41 +02:00
mae
17579bb97f Make completion box hide on an editor undo operation 2010-03-29 16:45:41 +02:00
hjk
944b6dad7d texteditor: return information on whether openEditor actually created an
editor or re-used an existing one
2010-03-10 13:46:45 +01:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Lasse Holmstedt
df7a19de9e Design mode integration
Moved Qt Designer to open from Design Mode. Also, Design mode is now global,
and created in coreplugin. Other plugins can register themselves to it.
2010-02-26 11:17:02 +01:00
Thorbjørn Lindeijer
6d9e3c8a8e Dropping files into the editor shouldn't insert file:///...
On some desktop environments, dragging and dropping a file gives us
the url to the file in multiple mime types, including text/plain. This
causes the url to be inserted as text by default.

Work around this issue by explicitly ignoring drop events for the text
editor when they also come with urls.

Task-number: QTCREATORBUG-728
Reviewed-by: Friedemann Kleint
2010-02-19 11:50:21 +01:00
con
7391ba388c Fix navigation history issues.
Separating navigation history logic from updating of highlights.
2010-02-08 16:55:07 +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
Thorbjørn Lindeijer
808198c41c Removed the "Join Lines Up" action
It was a bit confusing, since it reversed the order of the lines. When
this would be fixed, the added value of this action is very small, since
you can then also simply move your cursor one up before joining the
lines.
2010-01-21 15:18:06 +01:00
Falco Hirschenberger
ec2b738d61 Add join-line up/down feature to text editor
Merge-request: 1823
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Task-number: QTCREATORBUG-510
2010-01-21 15:18:06 +01:00
Roberto Raggi
51a33a9f0a Create completion items for the builtin snippets 2010-01-19 16:36:48 +01:00
mae
4959230cc5 beginnings of fancy snippet editing support 2010-01-19 12:29:13 +01:00
Roberto Raggi
92ed2daa6f Generalized the auto complete of braces. 2010-01-12 13:32:19 +01:00
Tobias Hunger
592e494d1a Fix typos
Reviewed-by: thorbjorn
2010-01-11 10:26:13 +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
Martin Aumüller
46abe329f4 make isElectricCharacter public
the fakevim plugin needs access to this method for automatic indenting as the implementation
differs across the different types of editors

Merge-request: 98
Reviewed-by: hjk <qtc-committer@nokia.com>
2010-01-06 15:21:17 +01:00
Thorbjørn Lindeijer
05914458f0 Made it possible to turn off scroll wheel zooming
It activates too easily for some people.

Task-number: QTCREATORBUG-406
2009-12-09 16:31:09 +01:00
Thorbjørn Lindeijer
a248406644 A bit of include cleanup 2009-12-08 18:22:52 +01:00
Thorbjørn Lindeijer
3d2d122472 Moved the mouse navigation option to the Behaviour settings page
It used to be hidden on the Display settings page.

Task-number: QTCREATORBUG-135
2009-12-08 18:22:52 +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
mae
18b9bdd413 some tuning of the overlay search result selection 2009-12-01 19:44:31 +01:00
mae
dc713d0684 added "auto-fold first comment"-option to the editor
Convenient when you don't want to see all the big license headers.
2009-12-01 18:08:47 +01:00
mae
b7635dda19 tune editor mouse cursor behaviour
the fix makes the mouse cursor visible when the editor loses focus.
This fixes an issue with the completion box, where on mac and windows
no mouse cursor would be visible (it worked on X11 due to the way
X11 does mouse grabbing for popup windows).
2009-11-30 19:14:48 +01:00
mae
d6e4a787d5 separate font zoom from font size
Introduce "Reset Font Size" action, bound to Ctrl+0
2009-11-30 19:01:04 +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
756a67854a Highlight unused symbols. 2009-11-30 15:21:48 +01:00
Roberto Raggi
32f67652df Added getter/setters for the ChangeSet. 2009-11-26 12:20:13 +01:00
mae
53a3071580 first steps for a refactoring overlay system.
As side effect we can now play a bit with visualizing extra selections
2009-11-25 15:56:30 +01:00
Roberto Raggi
8fd0777ab0 Ensure the document is updated before invoking a quickfix. 2009-11-18 15:15:00 +01:00
Thorbjørn Lindeijer
2c115e934f Make accidentally activating the link navigation more difficult
Only checking Ctrl and link availability on mouse release was triggering
the navigation too easily.

Now you have to press and release the mouse on the same link, having
Ctrl pressed all the time. In addition, when changing the text selection
the link is also cleared.

Task-number: QTCREATORBUG-134
Reviewed-by: con
2009-11-03 17:52:37 +01:00
mae
c035290602 add standard cut/copy/paste actions (if available) to the cpp editor's context menu
at a later stage we will look into harmonizing context menu among different editors.
The cpp editor had the biggest need, because its context menu features all sorts of
extra refactoring operations, thus the standard Qt context menu became too large.
2009-11-02 14:03:38 +01:00
mae
3c96e840d8 Fix (un)collapse all
In combination with ifdef'ed out blocks (un)collapse all would
possibly never expand the blocks again.
2009-10-05 18:49:10 +02:00
Friedemann Kleint
5948e284bb Rename namespace Core::Utils into Utils
Also move Designer::Internal::FormWindowEditor ->
Designer::FormWindowEditor.
2009-10-05 11:06:05 +02:00
Friedemann Kleint
74a3828f19 Purge out include files in exported headers 2009-10-01 16:38:08 +02:00
mae
0ed9043c34 tune auto-indentation of pasted text
auto-indentation of pasted text now only happens when complete
lines including a trailing paragraph separator are copied and pasted.

In addition, the reindent() functions ensures that the relative indentation
within the pasted block is preserved. This mechanism is now also used for
moving lines up/down.

Done with thorbjorn
2009-09-29 12:46:04 +02:00
mae
36fb96b69d fix auto braces with preprocessor directives
We now exclude brace in ifdefed out sections when calculating,
whether or not the braces match. This requires adjust the brace
levels whenever sections get ifdef'd out or ifdef'd in again.
2009-09-25 17:23:14 +02:00
Erik Verbruggen
91a492a562 Reverted a change which introduced a duplicate action for
(re-)formatting.
2009-09-25 10:47:04 +02:00