Commit Graph

34 Commits

Author SHA1 Message Date
Leandro Melo
1c1b3840c5 Editors: Fix refactoring changes indent ranges selections
This also fix an error by 1 when reindenting for the extract function quickfix.

Change-Id: Icd666edf4c4473322a4d4d9ed5f3ca7fbbfb7d83
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-16 16:01:51 +01:00
Leandro Melo
f04be782ab C++: Preserve original indentation in extract function
Also extend the refactoring changes to allow for reindenting.

Task-number: QTCREATORBUG-6797
Change-Id: I515c9a37d9e62e1d5de52ff99bd492e739a81885
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-12 15:32:02 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
hjk
82f5573626 more Id type fixes
Change-Id: I3720946ba5485696822976567d83b4d6cb1fb283

x

Change-Id: Iab58bc34bc56371405d132315573b484a533b77c
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-10 15:57:09 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Christian Kamm
26f855ca47 RefactoringFile: Use editor's cursor, if possible.
This fixes 'undo' with quick fixes not preserving the original cursor
position.

Change-Id: If6475a5afab3e806ea713c769f730c6ffd773298
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-10-20 15:45:54 +02:00
Christian Kamm
71cbd765b2 RefactoringChanges: Fix problems with encodings.
Task-number: QTCREATORBUG-6140
Change-Id: Iedbfca6987bffa2670df39f5f461690218f6da14
Reviewed-on: http://codereview.qt-project.org/5233
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-20 13:25:36 +02:00
Christian Kamm
fb91b88b9c RefactoringChanges: Add missing virtual destructor.
Change-Id: I6237e7c3a8c1e4a1a223c6f1a66c4e866406ca2b
Reviewed-on: http://codereview.qt.nokia.com/3312
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2011-08-22 13:42:40 +02:00
Christian Kamm
8a6d767a8f Refactoring changes: Cleanup and improvements.
Previously RefactoringFiles were usually passed around by value.
However, since a RefactoringFile may sometimes own a QTextDocument
(when it was read from a file), that's not great and caused the
file to be reread after every copy.

With this change RefactoringFile becomes noncopyable and is always
owned by a shared pointer.

This change also allowed having const RefactoringFiles which is
useful because they can be safely used from other threads. See
CppRefactoringChanges::fileNoEditor.

Change-Id: I9045921d6d0f6349f9558ff2a3d8317ea172193b
Reviewed-on: http://codereview.qt.nokia.com/3084
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-19 11:12:09 +02:00
Christian Kamm
8f14bc0ea2 C++: Synchronize function decl/def refactoring.
When editing a function declaration or definition the code model
may realize the same changes have to be applied somewhere else. A
refactoring marker will pop up that can be clicked to perform the
changes. Alternatively, press enter to apply.

Change-Id: I2299a2ecfb6a8f87d4853fc7cfa99486f890a1d3
Reviewed-on: http://codereview.qt.nokia.com/2909
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-08-16 11:13:12 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Oswald Buddenhagen
45c9cf7a12 add/unify i/o error handling
lots of use of Utils::FileSaver and Utils::FileReader

Task-number: QTCREATORBUG-1619
2011-04-18 14:10:14 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02: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
Friedemann Kleint
a9a5e3ea17 Exported header cleanup. 2011-01-20 14:03:07 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
793d1cba77 Start on some cleanup of EditorManager API and usage. 2011-01-05 10:41:34 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Christian Kamm
f0f623bcb8 Fix crash related to 'add definition from declaration' quickfix.
Reviewed-by: hjk
Reviewed-by: Erik Verbruggen
2010-10-07 14:54:04 +02:00
Erik Verbruggen
f1de90c872 C++ Editor: fixed cursor positioning after quickfix action. 2010-09-24 10:05:29 +02:00
dt
08ccda5862 EditorManager: Change openEditor/activateEditor to not do mode switching
Also introduce a indirection, modes have now types, edit and debug have
the same type, and editors do have a prefered type of modes instead of a
prefered mode.

That fixes the bug that if the prefered qml editing mode was set to
design, then in switching between qml editors would
- in Edit Mode: stay in edit mode
- in Debug Mode: switch to debug mode
2010-09-14 15:23:11 +02:00
Christian Kamm
bbe64796a0 QuickFix: Introduce CppRefactoringFile. 2010-08-13 12:51:22 +02:00
Christian Kamm
1ae9940b32 QuickFix: Add a warning to RefactoringChanges::removeFile. 2010-08-12 14:26:30 +02:00
Christian Kamm
03b443b86b QuickFix: Simplify getting a Document for a C++ refactoring. 2010-08-12 14:21:35 +02:00
Christian Kamm
0355e37e53 QuickFix: Migrate to a nicer API for cross-file quick fixes. 2010-08-12 14:21:35 +02:00
Christian Kamm
235f4d1d26 QuickFix: Clean up RefactoringChanges and add missing functionality.
* Can change files without opening an editor.
* Can open an editor without changing a file.
* Default to reindenting new files.
* Allow reading a file temporarily to access document and text.
2010-08-12 14:21:35 +02:00
Roberto Raggi
d3761d10e2 Use 1-based locations. 2010-07-29 15:17:24 +02:00
Erik Verbruggen
b2659950e2 Added the InsertionPointLocator.
For answers to questions about where to insert a snippet/chunk of C++ code. Ok,
currently it will only find the One And Only place to insert method
declarations in classes, and it will need some tuning.
2010-07-27 15:32:40 +02:00
Erik Verbruggen
9135c8ccb1 Quickfix for adding a declaration to a class from a definition. 2010-07-12 09:53:58 +02:00
Roberto Raggi
c3657634ed Added workaround for indentation not working when inserting text at the beginning of a range. 2010-06-22 15:59:21 +02:00
Roberto Raggi
27f6b2ceb5 Renamed CppRefactoringChanges::parsedDocumentForFile(). 2010-06-22 12:13:30 +02:00
Roberto Raggi
eb749ec3a2 Generalized the changeset operations. 2010-06-22 12:13:30 +02:00
Erik Verbruggen
297b281ced Added infrastructure to change multiple files at once. 2010-06-14 15:03:10 +02:00