Commit Graph

22 Commits

Author SHA1 Message Date
hjk
953cdb971f TextEditor: More BaseText* -> Text* renamings
*Document* and *Layout* classes, all basetext* files

Change-Id: I1c6e376733a434fcb5c7f19c6210dfa031eeafde
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-09-26 10:12:51 +02:00
hjk
b26a17f30d CppTools: Change CppModelManager implementation pattern
Replace the CppModelManagerInterface/derived CppModelManager
combo by a more common CppModelManager/CppModelManagerPrivate
pimpl pattern.

Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-19 13:17:55 +02:00
Erik Verbruggen
ce49f92cb7 Clang: remove dead code.
Change-Id: I06bac5443af41a27c2641199948705c45e8a4586
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-12 15:42:42 +02:00
hjk
0edefc4c2b TextEditor: Merge some "assist" related classes
Simplifies the code base by removing one level of unused
and unneeded abstraction.

- Merge {I,Default}AssistInterface to AssistInterface
- Merge {IAssist,Basic}ProposalItem to AssistProposalItem
- Merge {IGenericProposal,BasicProposalItemList}Model to GenericProposalModel

Change-Id: I54ee7b095427383d67a00fc1d87c3808c21d812d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-09 21:01:22 +02:00
hjk
127d3b9687 TextEditor: Move base of operation from Editor to *Widget
One less level of indirection

Change-Id: I4777bd7d54e572f36a490aeb747a8e0f89599049
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-09-08 14:48:26 +02:00
hjk
aa52cd83a6 CppEditor: Remove unused Project parameter
Change-Id: I3bfa201352127b34d46fe5bb4b18fab12aeafa3a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-09-04 12:01:18 +02:00
Christian Kandeler
1d5091e48f Do not use deprecated Qt functionality.
Replace all* remaining deprecated Qt 4 functions with
their Qt 5 counterparts. This means we no longer need to
define the QT_DISABLE_DEPRECATED_BEFORE macro.
This patch is relatively small because most source-compatible
changes of this kind have been done before.

* The one exception is the QmlDesigner, which uses QWeakPointer
in a deprecated way all over the place.

Change-Id: Id4b839c6685f3b5bdf2b89137f95231758ec53c7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-08-29 14:10:41 +02:00
hjk
2a5c602341 TextEditor: Introduce some convenience text accessors in the editor
And adjust users.

Change-Id: I9329257cfa5f3298731deb07c2881bc37d9a051d
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-08-27 15:00:36 +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
Nikolai Kosjar
b8a6a4dd4e CppTools: Move WorkingCopy to new cppworkingcopy.{h,cpp}
Change-Id: I447acf28849bffb52c1e6b6eafdde221ec0b179e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-08-20 10:26:47 +02:00
hjk
bf5e43be94 TextEditor: Merge ITextEditor and BaseTextEditor
Adjust all callers, de-export BaseTextEditorAnimator

Change-Id: I2329d976c1398e2449844bb480a4d4ed29859506
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-25 13:45:55 +02:00
Erik Verbruggen
3d33886e53 C++: fix include/framework path handling.
Instead of having two lists of paths, now only one list is used where
both include paths and framework paths can be mixed. This reflects the
way the compiler is invoked, and retains the (correct) search order.

Task-number: QTCREATORBUG-11599
Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-07-04 13:51:36 +02:00
Nikita Baryshnikov
0d43036077 Fix clang compilation
Change-Id: Ic2617b5eca47ebbcc04119dd7e064b8f570fbc09
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-06-20 16:38:38 +02:00
Nikita Baryshnikov
5ee81929ac Fix clang compilation
Was broken in 12103e0f67

Change-Id: I28ce266f609a232bf1ed99bb044ffc6a3b561d57
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-06-20 13:54:02 +02:00
Nikita Baryshnikov
12103e0f67 Reinvent deprecated qSort as Utils::sort
Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-06-19 14:00:32 +02:00
Nikolai Kosjar
e8fab22afb C++: Disable "Replace Dot for Arrow" auto-correction for ObjC sources
In the light of Obj-C properties this seems to annoy more than to help.

Change-Id: I48f92d505035369f48e8798d0972ef00306bdde0
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-02 15:48:48 +02:00
Nikolai Kosjar
126e69137a C++: Clarify units of a Token
This will avoid confusion when later more length and indices methods are
added.

In Token:
    length() --> bytes()
    begin() --> bytesBegin()
    end() --> bytesEnd()

Change-Id: I244c69b022e239ee762b4114559e707f93ff344f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-15 15:55:38 +02:00
Nikolai Kosjar
0d84603c41 CodeModel(s): Unify name/values of accessed environment variables
Format: QTC_*=(1|0).

Now it's easier to change them in the Run Configuration of Qt Creator.

Change-Id: Ifc45cecb89b33a31942b4c3e2d03851a1d72d0bf
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-26 15:57:21 +01:00
Friedemann Kleint
249a8b2d24 tr()-Fixes in CLANG code model.
Do not use QObject::tr(), use native file paths,
use complete contexts.

Change-Id: Icc4990b4c2ca5b9ae6f6b639db9e1a45a93e0a65
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-03-03 18:11:22 +01:00
hjk
b7ec5fb375 Clang: Coding style
Change-Id: Ib7dc759e8db7cf37fbcd7f75d28b29bf95593d6c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-05 11:18:51 +01:00
Robert Loehning
5292748bf2 Incremented year in copyright info
Change-Id: I6e25ba25aa2898b5382dae7f3751deebb6072efa
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-09 09:41:23 +01:00
Erik Verbruggen
5beb74fd9d Add experimental clang code-model plug-in.
Previously known as the wip/clang branch.

Contributors (in alphabetical order):
- Christian Kamm <christian.d.kamm@nokia.com>
- Erik Verbruggen <erik.verbruggen@digia.com>
- Leandro Melo <leandro.melo@nokia.com>
- Peter Kuemmel <syntheticpp@gmx.net>
- Sergey Shambir <sergey.shambir.auto@gmail.com>

Change-Id: I4c3ff600a19b6732641c1d5ef28236bf2cc17737
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-12-20 17:05:09 +01:00