Commit Graph

241 Commits

Author SHA1 Message Date
Leandro Melo
fb46c31934 Plain text editor: Make sure user setting about folding markers is used
It was being reset based on the highlighter definitions.

Consider some refactoring with the related options as well to avoid
overriding user's settings.

Done-with: Thorbjorn Lindeijer
2010-11-10 16:05:10 +01:00
mae
b14e54b458 Extend camel-case cursor movement
We now have different actions to bind to (saves us an explicit option).
Small fixes to state machines.

Done-with: Erik Verbruggen
2010-11-10 12:54:06 +01:00
mae
87d8adb1c3 Support camel-case for word-wise movement
This was DevDay's 3rd most requested feature

Done-with: Erik Verbruggen
2010-11-10 10:56:32 +01:00
Leandro Melo
c8a53a66ad Editors: Continue refactoring indenters out of the editors.
This is pretty much a complement of commit 3a684586fa,
which is an attempt to make editors and indenters a bit more decoupled.

Reviewed-by: Thorbjorn Lindeijer
2010-11-09 11:01:48 +01:00
Leandro Melo
36fa1de4c6 Editors: Refactor auto-complete code out of the editors for better reusability.
Reviewed-by: Thorbjorn Lindeijer
2010-11-09 11:01:47 +01:00
Leandro Melo
3a684586fa Editors: Refactor indenters out of the editors for better reusability.
Reviewed-by: ckamm
2010-11-05 14:28:38 +01:00
Friedemann Kleint
6063fb84c2 Fix exported headers in Core and TextEditor.
- Unexport Core::Internal::MainWindow and remove its includes.
- Move RssFetcher from Core::Internal to Core.
- Unexport CopyTaskHandler.
- Move TextEditor's completion support and Refactor Overlay
  helper classes from TextEditor::Internal to TextEditor as they
  are exported.
- Move internal BaseTextBlockSelection into private header.
- Unexport TextEditorOverlay as they are not used.
2010-11-01 16:29:45 +01:00
Leandro Melo
2d50925071 Create a reusable item delegate wich supports "annotations".
Currently used by the QML outline and C++ type hierarchy.

Reviewed-by: kkoehne
Task-number: QTCREATORBUG-2583
2010-10-06 15:40:01 +02:00
Erik Verbruggen
5ad1b35a76 Editor: cleanup special cases for snippets. 2010-09-24 13:02:44 +02:00
Erik Verbruggen
f6a99f6163 Editor: don't leave snippet mode when user pasts/completes. 2010-09-24 11:35:53 +02:00
hjk
fb05c7a9e2 basetexteditor: make block selection accessible 2010-09-14 17:18:44 +02:00
Friedemann Kleint
763b59aa73 Debugger: Fix debugger switching to edit mode.
... on clicking stack frames or disassembler/
memory views.

Introduce flags to openEditorAt, pass
EditorManager::NoModeSwitch where applicable.

Task-number: QTCREATORBUG-2278
2010-09-07 09:51:20 +02:00
Leandro Melo
f79187ca97 Create type hierarchy widget; Refactor code from C++ hover into a simple reusable model.
Hierarchy information removed from tooltips now.
2010-08-13 16:44:59 +02:00
Tobias Hunger
6fed7c662e Replace some struct with classes
* Fixes warnings about struct/class mixup in windows

Reviewed-by: thorbjorn
2010-08-13 13:10:32 +02:00
mae
29b073e92e Refactor block selection
Block selection was "broken" when using tabs, or rather
incomplete: It treated tabs as normal characters, which
has shown to be unexpected by people using tabs in code.

The new implementation has a vastly improved find scope
as well. In addition, creating a blog selection with
mouse or keyboard feels a lot more solid now, as the
actual selection is detached from possible valid cursor
positions.

Task-number: QTCREATORBUG-1541
2010-08-05 15:26:58 +02:00
Thomas Hartmann
9c70e87715 QmlJSEditor: using RefactorMarker for Qt Quick ToolBar
* Proper implementation using a timer

* We also do a revision check now

* The RefactorMarker is only shown for types that we support
2010-08-05 10:51:31 +02:00
Roberto Raggi
a0faf279d5 Delay the automatic completion. 2010-07-19 14:06:19 +02:00
con
cecf9ac25a Move find flags from IFindSupport to more accessible place.
For later use in IFindFilter.
2010-07-15 16:42:31 +02:00
mae
72bb7c5c11 Convert semantic highlighter to use additional formats
instead of extra selections. This requires a recent
version of Qt 4.7, the beta 2 will not do.

Done-with: Roberto Raggi
2010-07-13 14:37:48 +02:00
Friedemann Kleint
36f5545f5a VCS[git]: Limit text size to be displayed.
in VCSBaseEditor  and BaseTextEditor::createNew to the size
used for limiting file size.

Reviewed-by: Robert Loehning <robert.loehning@nokia.com>
Task-number: QTCREATORBUG-1847
2010-07-12 14:15:38 +02:00
Thomas Hartmann
208b3746a6 BaseTextEditor: adding translatedLineRegion()
this function returns the bound region for the text in
lineStart to lineEnd

We use this to position the context pane
2010-07-09 16:10:12 +02:00
Christian Kamm
e086c67e8e C++ editor: Use the new indenter to make indenting selections fast. 2010-07-06 14:53:54 +02:00
Christian Kamm
c514884207 C++ editor: Drop extra selections before large editing operations.
Updating the text cursors that the extra selections are based on can
get quite slow if there are changes in a lot of positions - like when
reindenting a file.

Dropping some text cursors can increase performance significantly in
these cases.

Done-with: mae
2010-07-06 12:36:20 +02:00
Friedemann Kleint
df6fcd363a Compile fix Windows. 2010-07-02 14:36:18 +02:00
mae
6ef602d121 add basic support to show refactor markers
See BaseTextEditor::setRefactorMarkers(...). The markers support
a clicked signal via BaseTextEditor and tooltips. They feature
a cursor, but are always positioned at the end of the line (not block!).

As special gimmick they do extend the document width when they
are positioned outside the document area.
2010-07-02 13:48:57 +02:00
mae
6f67360efe Fix long freeze when reloading files
The semantic highlighting and all the extra selections create
many cursors, this does cost time in setText().
Solution: remove all extra selections on reload.

Reviewed-by: Oswald Buddenhagen
Task-number: QTCREATORBUG-1720
2010-06-24 20:15:25 +02:00
Erik Verbruggen
bb4b88c868 Made setMimeType virtual.
Subclasses can override this method to do things when the mime-type is set/changed.
2010-06-18 12:34:09 +02:00
Thorbjørn Lindeijer
173cdff56c Merge branch '2.0'
Conflicts:
	src/plugins/cppeditor/cppquickfix.cpp
	src/plugins/mercurial/mercurialjobrunner.cpp
	src/plugins/subversion/subversionplugin.cpp
2010-06-15 13:22:33 +02:00
Thorbjørn Lindeijer
83dba068ce Avoid triggering indent for electric characters in comments and strings
In comments and strings, electric characters have no syntactical
significance and the unnecessary automatic reindent can be annoying.

Reviewed-by: Erik Verbruggen
2010-06-15 12:25:01 +02:00
Erik Verbruggen
05639e4688 Merge branch 'origin/2.0' (early part) 2010-06-15 11:30:51 +02:00
Thorbjørn Lindeijer
6875a50d27 Don't pass QChar as const & since it's just a unsigned short
Reviewed-by: ogoffart
2010-06-14 16:10:35 +02:00
hjk
f759fd6b65 basetexteditor: make a few functions public for use in fakevim 2010-06-03 13:29:17 +02:00
hjk
5806009d29 Merge remote branch 'origin/2.0'
Conflicts:
	doc/qtcreator.qdoc
	src/plugins/debugger/debuggermanager.cpp
	src/plugins/texteditor/basetexteditor.cpp
2010-06-02 09:57:23 +02:00
Thorbjørn Lindeijer
8ffc25bbad Fixed the collapsed block popup to draw on top of cursor/highlights
The various text editor overlays and the text cursor were being painted
on top of the collapsed block popup.

Reviewed-by: mae
2010-06-01 12:01:23 +02:00
Roberto Raggi
b68a16f1b5 Highlight user defined types. 2010-05-25 17:15:22 +02:00
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