Commit Graph

39 Commits

Author SHA1 Message Date
Eike Ziller
aa6495a261 ExtensionSystem: Remove Qt4 support
Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.

Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-08-27 08:44:34 +02:00
Nikolai Kosjar
89bd4ee3c4 C++: Base parsing on editor document instead of widget
This mainly takes CppEditorSupport apart.

* Parsing is now invoked by CPPEditorDocument itself by listening to
  QTextDocument::contentsChanged().

* Upon construction and destruction CPPEditorDocument creates and
  deletes an EditorDocumentHandle for (un)registration in the model
  manager. This handle provides everything to generate the working copy
  and to access the editor document processor.

* A CPPEditorDocument owns a BaseEditorDocumentProcessor instance that
  controls parsing, semantic info recalculation and the semantic
  highlighting for the document. This is more or less what is left from
  CppEditorSupport and can be considered as the backend of a
  CPPEditorDocument. CPPEditorDocument itself is quite small.

    * BuiltinEditorDocumentProcessor and ClangEditorDocumentProcessor
      derive from BaseEditorDocumentProcessor and implement the gaps.

    * Since the semantic info calculation was bound to the widget, it
      also calculated the local uses, which depend on the cursor
      position. This calculation got moved into the extracted class
      UseSeletionsUpdater in the cppeditor plugin, which is run once the
      cursor position changes or the semantic info document is updated.

    * Some more logic got extracted:
	- SemanticInfoUpdater (logic was in CppEditorSupport)
	- SemanticHighlighter (logic was in CppEditorSupport)

    * The *Parser and *Processor classes can be easily accessed by the
      static function get().

* CppHighlightingSupport is gone since it turned out to be useless.

* The editor dependency in CompletionAssistProviders is gone since we
  actually only need the file path now.

Change-Id: I49d3a7bd138c5ed9620123e34480772535156508
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-08-25 13:06:01 +02:00
hjk
307129bf8f CppEditor: Partially move to new editor setup scheme
This needs more reorganization. For now, use a method to
add cpp editor support directly without relying on a fully
set up editor/widget/document combo.

Change-Id: Id8631c75ccd209f418faef31f8b8a4c71e53d87d
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-08-22 10:06:59 +02:00
hjk
cb35594800 TextEditor: Centralize settings connections setup
All editors did that manually, with varying approaches. Connect once
when the document is made known to the EditorWidget instead.

Change-Id: Ib0828b08158539859f6f89c8080435a027aa06ed
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-08-20 13:28:44 +02:00
hjk
d2ec7d80d9 TextEditor: Merge the two sets of *EditorWidget constructors
Change-Id: I45d87d0be722ac36d64af222f03f8cb76242c9df
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-08-19 09:19:33 +02:00
hjk
844c734d5e CppEditor: Move revisionVisible construction to constructor
Change-Id: I6462403d2d06c7c6c3f79627fbba80f0ce0683ef
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-08-18 15:48:18 +02:00
hjk
210321377e Editors: Some renamings to enhance consistency
The base pattern is FooEditor for BaseTextEditor derived classes
and FooEditorWidget for BaseTextEditorWidget derived classes. So:

CPPEditorWidget -> CppEditorWidget
CPPEditorWidgetPrivate -> CppEditorWidgetPrivate
...::EditorWidget -> PythonEditorWidget
GLSLTextEditorWidget -> GlslEditorWidget
GLSLEditorEditable -> GlslEditor

Change-Id: I76d34a3694c2fb35491982d86e83f7e4774c0be6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-07-31 10:54:58 +02:00
hjk
62a870a14f TextEditor: Simplify HighlighterFactory hierarchy
Change-Id: I555639a9137dcb8ccb471e1615823870c8158b3c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-06-26 15:54:12 +02:00
Nikolai Kosjar
4ecadb38a0 CppEditor: Extract CppEditorOutline
Change-Id: I3b41f91f17ce9fb24796f2f6bff353fb3c6177ec
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-13 18:04:52 +02:00
Nikolai Kosjar
5a7916d26e CppEditor: Clean up CppEditor/CppEditorWidget
* Excess includes and forward declarations
* Access protection levels
* QTC_OVERRIDE
* Remove declared but not implemented/used functions.
* Remove unused class

Change-Id: Ia19ddddccd9adde827a7875b466fde5ca4d96e7d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-10 15:13:45 +02:00
Tobias Hunger
a8e8910130 IWizard->IWizardFactory
Start at splitting up the wizard functionality a bit. Currently
it is a factory but also contains a lot of logic that is invoked by
the real wizard dialogs.

This change renames/moves a couple of things only.

Change-Id: I1fa114ee3ee262f7c0690841f361bbf09e674725
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:42:03 +02:00
Nikolai Kosjar
dbb172da79 C++: Add code model inspector action to menu
Change-Id: Icd20ec482542011476d1baf1fa81d5584b3df1c6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-03-05 15:32:02 +01:00
Eike Ziller
f9ce335a6d Editors: Remove useless parent widget argument from create/duplicate
It was never called with a sensible value anyhow, and only complicates things.

Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-08 11:46:11 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
hjk
50b813e22a CppEditor: Change default sorting of outline combobox
Now "alphabetically" instead of "file order".

Change-Id: I9b534e9171fda59752ae430bede67561f8aa0038
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-07 11:05:50 +01:00
Eike Ziller
d80fb696ab Give TextEditorActionHandler an explicit parent and unify usage.
The action handler implicitly passed ownership to ICore, which is non-
to the action handler. We now consistently create the action handler in
the editor factory, give ownership to the editor factory, and don't hold
a reference to it.

Change-Id: I4372f8de966e3ceff87c06c5528c6b54522c1d57
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-12-12 09:59:55 +01:00
Eike Ziller
3d1b70c58e Remove the need to register editors in the action handler
The action handler already knows which editors to handle through the
context. It only needs to receive signals for updating the actions from
the current editor. So there is no need to tell the action handler about
every individual editor. This also removes some noise from the text
editor implementations.

Change-Id: I76dc5b1559cc8cf54ff313e6cdba4e789a3108aa
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-12-12 09:59:27 +01:00
Nikolai Kosjar
c4a0f90edd CppEditor: Introduce C++ Code Model Inspector
By default invokable via Ctrl+Shift+F12.

Change-Id: If8d61233b6d38d12131718f7c20bf40f76bc9ae4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-12-11 11:46:58 +01:00
Erik Verbruggen
759fd36a1e C++: The editor plugin doesn’t need to track currentEditorChanged
This was done to do a semantic re-highlight, but the CppEditorSupport
now handles this by also listening for currentEditorChanged signals.

Change-Id: Iaca6212f88c8d02203727f5d89d093c328b9e33c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-11-21 15:24:35 +01:00
Eike Ziller
bc81930f17 Give preprocessor dialog button a tool tip.
Change-Id: Iad756a8f18736da79cca63232eb00fcee8a2f38c
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-10-24 10:26:27 +02:00
Nikolai Kosjar
18cba4fcf9 CppEditor: Remove duplicate code in cppeditorplugin.cpp
Change-Id: Ifeff4455b1ce0a0a7299f009beaf6319e9abb523
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-10-21 10:33:26 +02:00
David Schulz
34ef3f244e CppEditor: Add action to open a preprocessor dialog
Change-Id: I5ed09f6b8a358652145012e137ab717729999aca
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-21 08:27:51 +02:00
Nikolai Kosjar
b8dbac0b9c Rename "[Mm]ethod(s)" to "[Ff]unction(s)"
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.

This is a follow-up patch to commit 872bfb7.

Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-10 15:56:12 +02:00
Nikolai Kosjar
589d9c7773 CppTools: Rename "Update Code Model" to "Reparse Externally Changed Files"
It was not clear what "Update Code Model" did.

Change-Id: I245307039f8770047b80c7234481099edfe60bc9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-10-04 17:46:42 +02:00
Przemyslaw Gorszkowski
a3eaed4c51 CppEditor: introduce include hierarchy
Based on type hierarchy.

Added to context menu ('Open Include Hierarchy')
Shortcut(Ctrl+Shift+I)

'Include Hierarchy' contains:
FileName for which 'Include Hierarchy' is done
Includes(which files are included by current file - tree hierarchy)
Included by(which files include current file - tree hierarchy)

It is possible to open/goto each file by clicking on specific item.
Additionally for 'Included by' files it goes to the line where is include
directive for current file.

Change-Id: I549b1ed64e4c9f6955f60d00efb12950a3259f81
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-01 13:12:04 +02:00
hjk
49d0789e64 Cleanup IWizard interface and users
Added 639 lines, removed 1391.

Change-Id: I15ec7dd056d4f7ad79c6dd6a4181007ad14f6a43
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-24 09:57:32 +02:00
hjk
ca15d0aa95 Apply static pattern to TextEditorSetting
Change-Id: I4e6f573d893c0aa2bb4ca9812fc8db2961dac172
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-20 10:28:22 +02:00
hjk
65cc8ae4c2 Core: Clean up FileIconProvider interface
Change-Id: I98c3c8796cb887f5bb3c5184854562ff36727836
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-09-13 14:06:16 +02:00
hjk
98917598d3 ProjectManager: Use Core::Id for progress types
Change-Id: I72993fda50ad70ad2d7c2f449923ac6e34b9e737
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-04 14:59:06 +02:00
hjk
a37589d431 Apply 'static' pattern to MimeDatabase
Also adjust and streamline using and surrounding code.

Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-09-03 11:41:45 +02:00
hjk
df36184371 Core: Static pattern for ProgressManager, clean up all users
Change-Id: I4af8793ca69a3af9e99baeb7c31dad3864266f91
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 12:41:47 +02:00
hjk
eb724f3772 EditorManager: Use interface directly instead of going through ICore
In the majority of cases we were doing that anyways, having two
ways is just needlessly confusing.

Change-Id: Ied362a702c23beee528368d74df1f2aabe5807f8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:25:51 +02:00
jkobus
33a7952745 Implement syntax highlighting in diff editor
All Qt Creator's main highlighters are used in the first place,
for other mimetypes generic highlighter is used as a fallback.

Task-number: QTCREATORBUG-9580

Change-Id: I863b9085520e5bdda142ce88f2074afeacee0531
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-08-29 08:54:04 +02:00
hjk
b772001c82 EditorFactory: Replace some virtual functions with data members
Change-Id: I014cb57460c4e3a36bf7403960908b5ffec867ff
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-08-02 10:21:15 +02:00
Nikolai Kosjar
6aceadac27 CppEditor: Fix "! condition" coding style
Change-Id: I216b74933f5e94c49be7f05f0b09ac01b3319d8c
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
2013-07-25 12:10:30 +02:00
Orgad Shaneh
ad9e7ccab6 Fix coding style for else statements
Change-Id: I1309db70e98d678e150388c76ce665e988fdf081
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 11:11:25 +02:00
Eike Ziller
28ec7caa7b Correct some default shortcuts for Mac
This makes them align to the other "editor split" shortcuts.

Change-Id: I0b300ae495ffa17062a0a52b148f61015b965c29
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-04-26 10:31:11 +02:00
Nikolai Kosjar
a2b2857b44 CppEditor: Rename CppPlugin to CppEditorPlugin
Change-Id: Icebf85ae425f413ed0d3dfc873869665233ec58c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-04-19 12:09:45 +02:00