forked from qt-creator/qt-creator
C++: make highlighting/completion plugable.
Change-Id: I990fdf5411153041c6b4c62f31b453342d59de53 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -40,21 +40,38 @@
|
||||
|
||||
#include <QFuture>
|
||||
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
class CppEditorSupport;
|
||||
namespace TextEditor {
|
||||
class ITextEditor;
|
||||
}
|
||||
|
||||
namespace CppTools {
|
||||
|
||||
class CPPTOOLS_EXPORT CppHighlightingSupport
|
||||
{
|
||||
public:
|
||||
typedef TextEditor::SemanticHighlighter::Result Use;
|
||||
|
||||
public:
|
||||
CppHighlightingSupport();
|
||||
CppHighlightingSupport(TextEditor::ITextEditor *editor);
|
||||
virtual ~CppHighlightingSupport() = 0;
|
||||
|
||||
QFuture<Use> highlightingFuture(const CPlusPlus::Document::Ptr &doc,
|
||||
const CPlusPlus::Snapshot &snapshot) const;
|
||||
virtual QFuture<Use> highlightingFuture(const CPlusPlus::Document::Ptr &doc,
|
||||
const CPlusPlus::Snapshot &snapshot) const = 0;
|
||||
|
||||
protected:
|
||||
TextEditor::ITextEditor *editor() const
|
||||
{ return m_editor; }
|
||||
|
||||
private:
|
||||
TextEditor::ITextEditor *m_editor;
|
||||
};
|
||||
|
||||
class CPPTOOLS_EXPORT CppHighlightingSupportFactory
|
||||
{
|
||||
public:
|
||||
virtual ~CppHighlightingSupportFactory() = 0;
|
||||
|
||||
virtual CppHighlightingSupport *highlightingSupport(TextEditor::ITextEditor *editor) = 0;
|
||||
};
|
||||
|
||||
} // namespace CppTools
|
||||
|
||||
Reference in New Issue
Block a user