Commit Graph

69 Commits

Author SHA1 Message Date
Oswald Buddenhagen
9e7a4c7d4f provide default implementation of IFile::reloadBehavior()
there only two classes of files anyway: regularly editable ones which may
ask for interaction, and "background" files which always operate silently.
the regular case is the more complex one, so put that into the base class.
2011-04-18 14:14:20 +02:00
Oswald Buddenhagen
fae7dc9584 add errorString output argument to IFile::reload() & IEditor::open()
add/unify read error handling in all affected classes
2011-04-18 14:10:13 +02:00
Oswald Buddenhagen
f1f9904d35 add errorString output argument to IFile::save()
this centralizes error reporting (in fact, in most cases it adds any in
the first place).

Task-number: QTCREATORBUG-1619
2011-04-18 14:10:13 +02:00
Oswald Buddenhagen
dc3c156cac Merge branch '2.2'
Conflicts:
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h
	src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
	src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
	src/plugins/qt4projectmanager/qt4target.cpp
	src/plugins/qt4projectmanager/qt4target.h
	src/plugins/qt4projectmanager/qtoptionspage.h
	src/plugins/qt4projectmanager/qtversionmanager.cpp
	src/plugins/welcome/welcomemode.cpp
2011-04-14 12:39:31 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
hjk
f67e9a54c9 Adjust mark area width to mark width.
Patch by Kevin Funk
2011-03-23 10:49:00 +01:00
hjk
89884d823d texteditor: don't crash when trying to open too large files
Task-number: QTCREATORBUG-3828
2011-02-22 16:28:31 +01:00
hjk
f576ad9f2c texteditor: merge ITextEditable into ITextEditor
rename BastTextEditor->BaseTextEditorWidget, BaseTextEditorEditable->BaseTextEditor
rename BaseTextEditor{,Widget} subclasses
rename editableInterface->editorInterface
rename createEditableInterface->createEditor
minor cleanups after renamings
2011-02-22 11:23:53 +01:00
Leandro Melo
ea313f3ec8 Text editor: Introduce per project settings
With some refactorings to make the code look better.

Reviewed-by: con
2011-02-21 17:22:24 +01:00
mae
4efa780b55 Fix revisions when loading with multiple chunks
Done-with: Leandro Melo
2011-02-10 15:04:24 +01:00
Leandro Melo
745b143136 Text editor: Disable undo when loading chunks
Instead of clearing the stack afterwards.

Reviewed-by: Thorbjorn Lindeijer
2011-02-08 14:07:01 +01:00
Leandro Melo
9ef40349d9 Text editor: Clear undo/redo stack after loading chunks
Reviewed-by: Thorbjorn Lindeijer
2011-02-07 17:18:05 +01:00
Leandro Melo
64dd45f7b9 Text editor: Clear buffer when no longer needed 2011-02-07 08:49:42 +01:00
Leandro Melo
ee5e38e55d Text editor: Make it easier for some compilers 2011-02-07 08:43:58 +01:00
Leandro Melo
3c8ff2bee4 Text editor: Remove unused member
Reviewed-by: mae
2011-02-04 17:04:55 +01:00
Leandro Melo
66e894478e Text editor: Progress bar for large files
Reviewed-by: mae
2011-02-04 17:04:55 +01:00
Leandro Melo
a9f6dbd89a Text editor: Convert encoding and fill doc. by chunks
Task-number: QTCREATORBUG-876
Task-number: QTCREATORBUG-3560

Reviewed-by: mae
2011-02-04 17:04:54 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
b1bcf081d8 Merge branch '2.1'
Conflicts:
	src/plugins/coreplugin/basemode.cpp
	src/plugins/coreplugin/basemode.h
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
	src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/debugger/debuggeruiswitcher.cpp
	src/plugins/debugger/debuggeruiswitcher.h
	src/plugins/projectexplorer/buildconfigdialog.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
	src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h
	src/plugins/qmldesigner/designercore/include/modelutilities.h
	src/plugins/qmldesigner/designercore/include/nodeinstance.h
	src/plugins/qmldesigner/designercore/include/propertymetainfo.h
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h
	src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h
	src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h
	src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp
	src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp
	src/plugins/qmldesigner/designercore/model/modelutilities.cpp
	src/plugins/snippets/inputwidget.cpp
	src/plugins/snippets/snippetscompletion.cpp
	src/plugins/snippets/snippetscompletion.h
	src/plugins/snippets/snippetspec.cpp
	src/plugins/snippets/snippetsplugin.cpp
	src/plugins/snippets/snippetswindow.cpp
	src/plugins/snippets/snippetswindow.h
	src/plugins/texteditor/snippetsparser.cpp
	src/tools/qml/qmldom/main.cpp
	tests/manual/trk/runner.cpp
	tests/manual/trk/trkolddevice.cpp
	tests/manual/trk/trkolddevice.h
	tests/manual/trk/trkserver.cpp
2010-12-17 17:00:53 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Friedemann Kleint
3641c6e0b8 TextEditor: Amend Coding style.
Fix 722e48c2b3.
2010-10-29 15:36:49 +02:00
Friedemann Kleint
722e48c2b3 TextEditor: Some exported header cleanup.
Remove internal markers from exported headers,
introduce private class for BaseTextDocument.

Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2010-10-29 15:20:10 +02:00
Takumi ASAKI
3cd32effdd Support UTF-8 BOM in TextEditor
TextEditor will now recognize an UTF-8 BOM.

A setting to determine what to do on saving has been added as well - the
options are "Always Add", "Keep Already Present" and (mostly for
completeness) "Always Delete".
Note: if encoding is "System", "Always Add" doesn't work, because there
is no API to know what the System encoding is.

Task-number: QTCREATORBUG-1857

Merge-request: 2180
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2010-10-28 20:33:16 +02:00
con
4e7c07d97a Add method for default text encoding to editor manager.
Moving the logic out of BaseTextDocument for use at other places.
2010-10-11 14:24:05 +02:00
mae
ebc305b0d8 Fix: Folded code is deleted on save
Also fixes a crash when folding code at the very end
of the document

Task-number: QTCREATORBUG-2159
2010-09-07 16:38:03 +02:00
con
d24d01f49c Merge commit '52b9fcca2ddd5d5e95c6e13cbded018699c7dd68' (origin/2.0)
Conflicts:
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationwidget.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemosshthread.h
2010-07-13 11:31:05 +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
Thorbjørn Lindeijer
72b78c22de Maintain the right cursor when undoing "clean whitespace" after saving
Previously it would always jump to the start of the document, since
that's where the newly created text cursor is at the beginEditBlock
call. Avoid this when saving the current editor by starting with the
cursor of the editor.

Reviewed-by: mae
Task-number: QTCREATORBUG-1807
2010-07-07 13:26:36 +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
76020b6152 Make sure bookmarks survive a document reload
While reloading a text document, the bookmarks got lost since their
associated QTextBlocks were deleted.

This patch makes sure that before reloading, the bookmarks are removed
non-persistently in the same way as when closing a document, and that
they are restored after the document was reloaded.

Currently, no effort is made to update the location of the bookmarks
based on the way the file changed.

Task-number: QTCREATORBUG-1281
Reviewed-by: dt
2010-05-28 15:44:59 +02:00
dt
9bc9fe73e1 File renaming
Reviewed-By: con
Reviewed-By: Friedemann Kleint

We now support renaming files. The version control system tries first to
rename, if that doesn't support or can't rename the file we do a normal
rename. (Note: git, hg, perforce > 2009.02 support renaming, cvs not.
(perforce untested)). We correctly notify all editors of the renamed
file and tell the project manager to rename the file in the project.

Note: Only the qt4projectmanager knows how to rename files.

Note: renaming folders, moving files to different folders, renaming
.pro/.pri files is not supported. Those things can be later added after
this has proven to work correctly in the simple case.

Also we don't do any actions based on the renaming like renaming
classes, changing include guards or #include lines.
2010-05-12 14:14:44 +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
mae
4d8cb88b5a Introduce default file encoding (for new files and new projects)
Task-number: QTCREATORBUG-365
Reviewed-by: dt
2010-04-13 19:14:23 +02:00
con
ef46c31d35 Fixes: External permission changes are not recognized
Task-number: QTCREATORBUG-1077
2010-04-08 16:08:14 +02:00
Christian Kamm
80fa321609 Clean the BaseTextDocument filename.
Previously, it could contain multiple directory separators, . or ..

This makes using the filename safe for hashes like the ones used in the
C++ and Qml code models.

Reviewed-by: Roberto Raggi
Reviewed-by: mae
2010-04-01 15:21:30 +02:00
con
d6061a23e1 Refactor the externally modified file handling
Reviewed-by: dt
2010-03-22 16:01:55 +01:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Roopesh Chander
9822fb65df cleanWhitespace() checkes whether it has to change indentation or not. handle that. 2010-02-08 16:59:10 +01:00
Roopesh Chander
fde766016a enable auto-determination of spaces/tabs for cleaning whitespace as well 2010-02-08 16:59:10 +01:00
hjk
3251309ada texteditor: remove traces of TEXTEDITOR_STANDALONE 2010-02-04 10:38:11 +01:00
mae
c91c416135 Fix whitespace cleaning of changed blocks after undo
QTCREATORBUG-456
2009-12-14 14:26:49 +01: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
mae
aac47dcbad fix revision handling in base text editor.
After recent qt changes, the initial revision after a QTextDocument::setPlainText()
is not 0.
2009-09-24 15:09:15 +02:00
mae
99435d5f0e Make "Edit/Advanced/Clean_Whitespace work on the current
selection (if there is one)
2009-09-09 16:37:09 +02:00
mae
16e7f0c16f be more conservative when reindenting code: only change the
actual whitespace when the indentation column changes.

Complete whitespace cleanup can still be done either automatically
on save (when configured) or when explicitely called with the
"Clean Whitespace" action from Edit/Advanced.
2009-09-09 16:16:46 +02:00
Thorbjørn Lindeijer
0bbc945154 setPlainText and setHtml already disable undo/redo 2009-08-26 17:57:26 +02:00
hjk
93cbef8724 long live the king 2009-08-14 09:30:56 +02:00
Henrik Abelsson
0a94100508 Add option to select behavior on externally changed files.
Merge-request: 840
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2009-07-13 15:00:39 +02:00
Jason McDonald
884b7af769 Update license headers and sales contact details.
Reviewed-by: Trust Me
2009-06-17 00:01:27 +10:00