Commit Graph

514 Commits

Author SHA1 Message Date
Thomas Hartmann
874a185f53 crash fix
the block might be invalid
2010-07-14 10:42:24 +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
mae
ab8a8c018d Fix brace states
The lexer needs its own lexerState, before it was using
the syntax highlighter user state. This breaks the brace
depth calculation of the highlighter.

Reviewed-by: Roberto Raggi
2010-07-12 11:18:31 +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
Roberto Raggi
8acde74d79 Forked QSyntaxHighlighter from Qt 4.7.
We need our very own syntax highlighter in Qt Creator.
2010-07-09 14:47:18 +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
con
e1b74a647e Cut off the forward navigation history to avoid messing it up.
There are cases like when editing, or when jumping to a line, where we
shouldn't cut it though (so we don't).

Task-number: QTCREATORBUG-1535
2010-07-06 12:21:24 +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
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
con
7f733b1545 Merge remote branch 'origin/2.0'
Conflicts:
	README
	doc/qt-html-templates.qdocconf
	doc/qtcreator.qdoc
	doc/qtcreator.qdocconf
	src/app/Info.plist
	src/plugins/bineditor/BinEditor.pluginspec
	src/plugins/bookmarks/Bookmarks.pluginspec
	src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec
	src/plugins/coreplugin/Core.pluginspec
	src/plugins/coreplugin/coreconstants.h
	src/plugins/cpaster/CodePaster.pluginspec
	src/plugins/cppeditor/CppEditor.pluginspec
	src/plugins/cpptools/CppTools.pluginspec
	src/plugins/cvs/CVS.pluginspec
	src/plugins/debugger/Debugger.pluginspec
	src/plugins/designer/Designer.pluginspec
	src/plugins/fakevim/FakeVim.pluginspec
	src/plugins/find/Find.pluginspec
	src/plugins/genericprojectmanager/GenericProjectManager.pluginspec
	src/plugins/git/ScmGit.pluginspec
	src/plugins/helloworld/HelloWorld.pluginspec
	src/plugins/help/Help.pluginspec
	src/plugins/locator/Locator.pluginspec
	src/plugins/mercurial/Mercurial.pluginspec
	src/plugins/perforce/Perforce.pluginspec
	src/plugins/projectexplorer/ProjectExplorer.pluginspec
	src/plugins/qmldesigner/QmlDesigner.pluginspec
	src/plugins/qmlinspector/QmlInspector.pluginspec
	src/plugins/qmljseditor/QmlJSEditor.pluginspec
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
	src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec
	src/plugins/regexp/RegExp.pluginspec
	src/plugins/resourceeditor/ResourceEditor.pluginspec
	src/plugins/snippets/Snippets.pluginspec
	src/plugins/subversion/Subversion.pluginspec
	src/plugins/texteditor/TextEditor.pluginspec
	src/plugins/vcsbase/VCSBase.pluginspec
	src/plugins/welcome/Welcome.pluginspec
2010-06-08 10:39:45 +02:00
mae
530016aa2f Fix cursor positioning for up/down after backspace
Reviewed-by: Roberto Raggi
2010-06-04 13:40:10 +02:00
Erik Verbruggen
5f749306f1 Fixed member initialization order. 2010-06-04 11:47:55 +02:00
Erik Verbruggen
d4c9a47460 Fixed uninitialized members by initializing them. 2010-06-04 11:15:39 +02:00
Thorbjørn Lindeijer
502e86b737 Only do line selection in the gutter when the line numbers are visible
While 2641496a99 removed the marks check entirely, a fix for the same
issue made on the master branch (1263babfc6) changed it to check
whether the line numbers are visible. This is more correct.

Reviewed-by: mae
2010-06-02 13:39:45 +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
2641496a99 Fixed line select in gutter when text marks are not visible
The ProjectFilesEditor used for editing the generic project's files does
not show text marks, which broke the line select in the gutter.

Task-number: QTCREATORBUG-1238
Reviewed-by: mae
2010-06-01 13:33:35 +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
Erik Verbruggen
d349cafe2d Fixes rounding errors in block positions.
Influences the position of the folded-block markers.

Reviewed-by: thorbjorn
2010-05-31 15:06:30 +02:00
Jarek Kobus
1263babfc6 Enable line numbers selection in pro editor
Make it possible to select multiple lines in pro editor by d'n'd over
the line numbers like in the cpp editor.

Reviewed-by: mae <qt-info@nokia.com>
2010-05-25 17:58:54 +02:00
mae
886aef937f Merge commit 'origin/2.0' 2010-05-21 16:10:46 +02:00
mae
076c03498f Fix critical vertical block selection issue
Vertical block selections could be painted where there was no
selection, or they could jump randomly to columns futher right.

Reviewed-by: dt
2010-05-21 16:06:31 +02:00
mae
576a8ae799 Fix current line highlighting
we now draw it with alpha, so block highlighting and find scope
paintings shine through
2010-05-20 17:01:58 +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
7f4cbe2383 Merge remote branch 'origin/2.0'
Conflicts:
	src/plugins/debugger/moduleshandler.cpp
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecontents.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
2010-05-20 09:28:00 +02:00
con
04840b0ea7 Fix text highlighting on Mac.
Broke with 8c9a97479a

Reviewed-by: Thorbjørn Lindeijer
2010-05-19 11:40:27 +02:00
mae
8c9a97479a Small fixes for vertical block selection
The find scope was sometimes painted incorrectly, and the last
line was occassionally ommited from the standard selection paint.

Reviewed-by: thorbjorn
2010-05-18 16:02:03 +02:00
con
38f6379f39 Merge remote branch 'origin/2.0'
Conflicts:
	doc/qtcreator.qdoc
	src/plugins/find/currentdocumentfind.cpp
	src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
2010-05-17 17:40:40 +02:00
mae
78f130a121 Fix Backtab behavior to standard Windows behavior
Creator implemented Backtab similar to Eclipse and other editors,
now we do standard windows behavior.
2010-05-17 11:42:07 +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
con
e1c032f325 Fix drawing of collapse block indicator (fractional font sizes).
Task-number: QTCREATORBUG-1319
Reviewed-by: Thorbjørn Lindeijer
2010-05-06 15:27:10 +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
mae
5b46ae79b5 Fix hangup with regular expression search and 0-size match 2010-04-26 19:37:19 +02:00
Thorbjørn Lindeijer
8e9a70addf Renamed TextEditDocumentLayout to BaseTextDocumentLayout 2010-04-26 14:42: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
hjk
d8be1fbca4 textedit: make whitespace visualization work with overwrite mode cursor
Done with mae.
2010-04-16 13:26:46 +02:00
mae
db0a0f2996 "Fix" overwrite cursor for fake vim mode
It now behaves less logical but closer to what vim does. Since
this is the main target group, the change is probably right.
In detail: Overwrite cursor no longer shows *what* will get overwritten,
but instead it simply indicates *that* the editor is in overwrite mode,
with a more or less fixed size (fixed when the font is truly monospace).
2010-04-16 13:06:58 +02:00
mae
b1577b0e20 Make the current line highlighting prettier
Especially in combination with block highlighting.
2010-04-14 13:40:36 +02:00
mae
be92567948 Add "center cursor on scroll" option for the base text editor 2010-04-14 13:40:36 +02:00
mae
e9be9a0d57 Fix minor ifdefed-out block drawing issue
When drawing the background for an ifdefed-out block, expand
to the end of the visible viewport, even when scrolled
horizontally to the right.
2010-04-13 14:37:54 +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