forked from qt-creator/qt-creator
Renaming...
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
#include "dynamicrule.h"
|
#include "dynamicrule.h"
|
||||||
#include "highlightdefinition.h"
|
#include "highlightdefinition.h"
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
Context::Context() : m_fallthrough(false), m_dynamic(false)
|
Context::Context() : m_fallthrough(false), m_dynamic(false)
|
||||||
@@ -128,7 +128,7 @@ bool Context::isDynamic() const
|
|||||||
|
|
||||||
void Context::updateDynamicRules(const QStringList &captures) const
|
void Context::updateDynamicRules(const QStringList &captures) const
|
||||||
{
|
{
|
||||||
Highlight::Internal::updateDynamicRules(m_rules, captures);
|
GenericEditor::Internal::updateDynamicRules(m_rules, captures);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Context::addRule(const QSharedPointer<Rule> &rule)
|
void Context::addRule(const QSharedPointer<Rule> &rule)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#include <QtCore/QList>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QSharedPointer>
|
#include <QtCore/QSharedPointer>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class Rule;
|
class Rule;
|
||||||
@@ -105,6 +105,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // CONTEXT_H
|
#endif // CONTEXT_H
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "dynamicrule.h"
|
#include "dynamicrule.h"
|
||||||
#include "reuse.h"
|
#include "reuse.h"
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
DynamicRule::DynamicRule() : m_active(false)
|
DynamicRule::DynamicRule() : m_active(false)
|
||||||
@@ -51,7 +51,7 @@ void DynamicRule::replaceExpressions(const QStringList &captures)
|
|||||||
updateDynamicRules(childs(), captures);
|
updateDynamicRules(childs(), captures);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
void updateDynamicRules(const QList<QSharedPointer<Rule> > &rules, const QStringList &captures)
|
void updateDynamicRules(const QList<QSharedPointer<Rule> > &rules, const QStringList &captures)
|
||||||
@@ -64,4 +64,4 @@ void updateDynamicRules(const QList<QSharedPointer<Rule> > &rules, const QString
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QStringList;
|
class QStringList;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DynamicRule : public Rule
|
class DynamicRule : public Rule
|
||||||
@@ -59,6 +59,6 @@ private:
|
|||||||
void updateDynamicRules(const QList<QSharedPointer<Rule> > &rules, const QStringList &captures);
|
void updateDynamicRules(const QList<QSharedPointer<Rule> > &rules, const QStringList &captures);
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // DYNAMICRULE_H
|
#endif // DYNAMICRULE_H
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "genericeditor.h"
|
#include "editor.h"
|
||||||
#include "generichighlighterconstants.h"
|
#include "genericeditorconstants.h"
|
||||||
#include "genericeditorplugin.h"
|
#include "genericeditorplugin.h"
|
||||||
#include "highlightdefinition.h"
|
#include "highlightdefinition.h"
|
||||||
#include "highlighter.h"
|
#include "highlighter.h"
|
||||||
@@ -43,37 +43,37 @@
|
|||||||
#include <QtCore/QSharedPointer>
|
#include <QtCore/QSharedPointer>
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
GenericEditorEditable::GenericEditorEditable(GenericEditor *editor) :
|
EditorEditable::EditorEditable(Editor *editor) :
|
||||||
TextEditor::BaseTextEditorEditable(editor)
|
TextEditor::BaseTextEditorEditable(editor)
|
||||||
{
|
{
|
||||||
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
|
Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance();
|
||||||
m_context << uidm->uniqueIdentifier(Highlight::Constants::GENERIC_EDITOR);
|
m_context << uidm->uniqueIdentifier(GenericEditor::Constants::GENERIC_EDITOR);
|
||||||
m_context << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
|
m_context << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GenericEditorEditable::id() const
|
QString EditorEditable::id() const
|
||||||
{ return QLatin1String(Highlight::Constants::GENERIC_EDITOR); }
|
{ return QLatin1String(GenericEditor::Constants::GENERIC_EDITOR); }
|
||||||
|
|
||||||
QList<int> GenericEditorEditable::context() const
|
QList<int> EditorEditable::context() const
|
||||||
{ return m_context; }
|
{ return m_context; }
|
||||||
|
|
||||||
bool GenericEditorEditable::isTemporary() const
|
bool EditorEditable::isTemporary() const
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
bool GenericEditorEditable::duplicateSupported() const
|
bool EditorEditable::duplicateSupported() const
|
||||||
{ return true; }
|
{ return true; }
|
||||||
|
|
||||||
Core::IEditor *GenericEditorEditable::duplicate(QWidget *parent)
|
Core::IEditor *EditorEditable::duplicate(QWidget *parent)
|
||||||
{
|
{
|
||||||
GenericEditor *newEditor = new GenericEditor(editor()->mimeType(), parent);
|
Editor *newEditor = new Editor(editor()->mimeType(), parent);
|
||||||
newEditor->duplicateFrom(editor());
|
newEditor->duplicateFrom(editor());
|
||||||
return newEditor->editableInterface();
|
return newEditor->editableInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GenericEditorEditable::open(const QString &fileName)
|
bool EditorEditable::open(const QString &fileName)
|
||||||
{
|
{
|
||||||
if (TextEditor::BaseTextEditorEditable::open(fileName)) {
|
if (TextEditor::BaseTextEditorEditable::open(fileName)) {
|
||||||
editor()->setMimeType(
|
editor()->setMimeType(
|
||||||
@@ -83,8 +83,7 @@ bool GenericEditorEditable::open(const QString &fileName)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericEditor::GenericEditor(const QString &definitionId, QWidget *parent) :
|
Editor::Editor(const QString &definitionId, QWidget *parent) : TextEditor::BaseTextEditor(parent)
|
||||||
TextEditor::BaseTextEditor(parent)
|
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
QSharedPointer<HighlightDefinition> definition =
|
QSharedPointer<HighlightDefinition> definition =
|
||||||
@@ -95,8 +94,8 @@ GenericEditor::GenericEditor(const QString &definitionId, QWidget *parent) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditor::BaseTextEditorEditable *GenericEditor::createEditableInterface()
|
TextEditor::BaseTextEditorEditable *Editor::createEditableInterface()
|
||||||
{
|
{
|
||||||
GenericEditorEditable *editable = new GenericEditorEditable(this);
|
EditorEditable *editable = new EditorEditable(this);
|
||||||
return editable;
|
return editable;
|
||||||
}
|
}
|
||||||
@@ -38,17 +38,17 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QString;
|
class QString;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GenericEditor;
|
class Editor;
|
||||||
|
|
||||||
class GenericEditorEditable : public TextEditor::BaseTextEditorEditable
|
class EditorEditable : public TextEditor::BaseTextEditorEditable
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GenericEditorEditable(GenericEditor *editor);
|
EditorEditable(Editor *editor);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QString id() const;
|
virtual QString id() const;
|
||||||
@@ -62,18 +62,18 @@ private:
|
|||||||
QList<int> m_context;
|
QList<int> m_context;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GenericEditor : public TextEditor::BaseTextEditor
|
class Editor : public TextEditor::BaseTextEditor
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GenericEditor(const QString &definitionId, QWidget *parent = 0);
|
Editor(const QString &definitionId, QWidget *parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual TextEditor::BaseTextEditorEditable *createEditableInterface();
|
virtual TextEditor::BaseTextEditorEditable *createEditableInterface();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // GENERICEDITOR_H
|
#endif // GENERICEDITOR_H
|
||||||
@@ -27,46 +27,46 @@
|
|||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "genericeditorfactory.h"
|
#include "editorfactory.h"
|
||||||
#include "generichighlighterconstants.h"
|
#include "genericeditorconstants.h"
|
||||||
#include "genericeditor.h"
|
#include "editor.h"
|
||||||
|
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
GenericEditorFactory::GenericEditorFactory(QObject *parent) :
|
EditorFactory::EditorFactory(QObject *parent) :
|
||||||
Core::IEditorFactory(parent)
|
Core::IEditorFactory(parent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
GenericEditorFactory::~GenericEditorFactory()
|
EditorFactory::~EditorFactory()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Core::IEditor *GenericEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *EditorFactory::createEditor(QWidget *parent)
|
||||||
{
|
{
|
||||||
GenericEditor *genericEditor = createGenericEditor(parent);
|
Editor *genericEditor = createGenericEditor(parent);
|
||||||
return genericEditor->editableInterface();
|
return genericEditor->editableInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GenericEditorFactory::id() const
|
QString EditorFactory::id() const
|
||||||
{
|
{
|
||||||
return QLatin1String(Highlight::Constants::GENERIC_EDITOR);
|
return QLatin1String(GenericEditor::Constants::GENERIC_EDITOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList GenericEditorFactory::mimeTypes() const
|
QStringList EditorFactory::mimeTypes() const
|
||||||
{ return m_mimeTypes; }
|
{ return m_mimeTypes; }
|
||||||
|
|
||||||
QString GenericEditorFactory::displayName() const
|
QString EditorFactory::displayName() const
|
||||||
{
|
{
|
||||||
return tr(Highlight::Constants::GENERIC_EDITOR_DISPLAY_NAME);
|
return tr(GenericEditor::Constants::GENERIC_EDITOR_DISPLAY_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IFile *GenericEditorFactory::open(const QString &fileName)
|
Core::IFile *EditorFactory::open(const QString &fileName)
|
||||||
{
|
{
|
||||||
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
|
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
|
||||||
return iface ? iface->file() : 0;
|
return iface ? iface->file() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericEditorFactory::addMimeType(const QString &mimeType)
|
void EditorFactory::addMimeType(const QString &mimeType)
|
||||||
{ m_mimeTypes.append(mimeType); }
|
{ m_mimeTypes.append(mimeType); }
|
||||||
@@ -34,18 +34,18 @@
|
|||||||
|
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GenericEditor;
|
class Editor;
|
||||||
|
|
||||||
class GenericEditorFactory : public Core::IEditorFactory
|
class EditorFactory : public Core::IEditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GenericEditorFactory(QObject *parent = 0);
|
EditorFactory(QObject *parent = 0);
|
||||||
virtual ~GenericEditorFactory();
|
virtual ~EditorFactory();
|
||||||
|
|
||||||
// Currently there are language specific factores which configure the correct highlighter.
|
// Currently there are language specific factores which configure the correct highlighter.
|
||||||
// Would it be a good idea if the createEditor method also received the mime type? This would
|
// Would it be a good idea if the createEditor method also received the mime type? This would
|
||||||
@@ -60,12 +60,12 @@ protected:
|
|||||||
void addMimeType(const QString &mimeType);
|
void addMimeType(const QString &mimeType);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent) = 0;
|
virtual Editor *createGenericEditor(QWidget *parent) = 0;
|
||||||
|
|
||||||
QStringList m_mimeTypes;
|
QStringList m_mimeTypes;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // GENERICEDITORFACTORY_H
|
#endif // GENERICEDITORFACTORY_H
|
||||||
@@ -8,8 +8,6 @@ CONFIG += help
|
|||||||
HEADERS += \
|
HEADERS += \
|
||||||
genericeditorplugin.h \
|
genericeditorplugin.h \
|
||||||
progressdata.h \
|
progressdata.h \
|
||||||
genericeditorfactory.h \
|
|
||||||
genericeditor.h \
|
|
||||||
languagespecificfactories.h \
|
languagespecificfactories.h \
|
||||||
specificrules.h \
|
specificrules.h \
|
||||||
rule.h \
|
rule.h \
|
||||||
@@ -23,13 +21,13 @@ HEADERS += \
|
|||||||
highlightdefinition.h \
|
highlightdefinition.h \
|
||||||
dynamicrule.h \
|
dynamicrule.h \
|
||||||
context.h \
|
context.h \
|
||||||
genericeditorconstants.h
|
genericeditorconstants.h \
|
||||||
|
editor.h \
|
||||||
|
editorfactory.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
genericeditorplugin.cpp \
|
genericeditorplugin.cpp \
|
||||||
progressdata.cpp \
|
progressdata.cpp \
|
||||||
genericeditorfactory.cpp \
|
|
||||||
genericeditor.cpp \
|
|
||||||
languagespecificfactories.cpp \
|
languagespecificfactories.cpp \
|
||||||
specificrules.cpp \
|
specificrules.cpp \
|
||||||
rule.cpp \
|
rule.cpp \
|
||||||
@@ -40,7 +38,9 @@ SOURCES += \
|
|||||||
highlightdefinitionhandler.cpp \
|
highlightdefinitionhandler.cpp \
|
||||||
highlightdefinition.cpp \
|
highlightdefinition.cpp \
|
||||||
dynamicrule.cpp \
|
dynamicrule.cpp \
|
||||||
context.cpp
|
context.cpp \
|
||||||
|
editor.cpp \
|
||||||
|
editorfactory.cpp
|
||||||
|
|
||||||
OTHER_FILES += GenericEditor.pluginspec GenericEditor.mimetypes.xml
|
OTHER_FILES += GenericEditor.pluginspec GenericEditor.mimetypes.xml
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
<file>XML/java.xml</file>
|
<file>XML/java.xml</file>
|
||||||
<file>XML/javadoc.xml</file>
|
<file>XML/javadoc.xml</file>
|
||||||
<file>XML/javascript.xml</file>
|
<file>XML/javascript.xml</file>
|
||||||
<file>XML/language.dtd</file>
|
|
||||||
<file>XML/objectivec.xml</file>
|
<file>XML/objectivec.xml</file>
|
||||||
<file>XML/perl.xml</file>
|
<file>XML/perl.xml</file>
|
||||||
<file>XML/php.xml</file>
|
<file>XML/php.xml</file>
|
||||||
|
|||||||
@@ -27,12 +27,12 @@
|
|||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef GENERICHIGHLIGHTERCONSTANTS_H
|
#ifndef GENERICEDITORCONSTANTS_H
|
||||||
#define GENERICHIGHLIGHTERCONSTANTS_H
|
#define GENERICEDITORCONSTANTS_H
|
||||||
|
|
||||||
#include <QtCore/QtGlobal>
|
#include <QtCore/QtGlobal>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Constants {
|
namespace Constants {
|
||||||
|
|
||||||
const char * const GENERIC_EDITOR = "GenericEditorPlugin.GenericEditor";
|
const char * const GENERIC_EDITOR = "GenericEditorPlugin.GenericEditor";
|
||||||
@@ -57,6 +57,6 @@ const char * const SQL_MIMETYPE = "text/x-sql";
|
|||||||
const char * const TCL_MIMETYPE = "application/x-tcl";
|
const char * const TCL_MIMETYPE = "application/x-tcl";
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // GENERICHIGHLIGHTERCONSTANTS_H
|
#endif // GENERICEDITORCONSTANTS_H
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <QtXml/QXmlSimpleReader>
|
#include <QtXml/QXmlSimpleReader>
|
||||||
#include <QtXml/QXmlInputSource>
|
#include <QtXml/QXmlInputSource>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
const QLatin1String GenericEditorPlugin::kAlertDefinitionId(":/genericeditor/XML/alert.xml");
|
const QLatin1String GenericEditorPlugin::kAlertDefinitionId(":/genericeditor/XML/alert.xml");
|
||||||
@@ -80,22 +80,22 @@ GenericEditorPlugin::GenericEditorPlugin()
|
|||||||
|
|
||||||
//Todo
|
//Todo
|
||||||
|
|
||||||
m_idByMimeType.insert(Highlight::Constants::C_HEADER_MIMETYPE, kCDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::C_HEADER_MIMETYPE, kCDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::C_SOURCE_MIMETYPE, kCDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::C_SOURCE_MIMETYPE, kCDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::CPP_HEADER_MIMETYPE, kCppDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::CPP_HEADER_MIMETYPE, kCppDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::CPP_SOURCE_MIMETYPE, kCppDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::CPP_SOURCE_MIMETYPE, kCppDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::CSS_MIMETYPE, kCssDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::CSS_MIMETYPE, kCssDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::FORTRAN_MIMETYPE, kFortranDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::FORTRAN_MIMETYPE, kFortranDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::HTML_MIMETYPE, kHtmlDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::HTML_MIMETYPE, kHtmlDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::JAVA_MIMETYPE, kJavaDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::JAVA_MIMETYPE, kJavaDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::JAVASCRIPT_MIMETYPE, kJavascriptDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::JAVASCRIPT_MIMETYPE, kJavascriptDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::OBJECTIVEC_MIMETYPE, kObjectiveCDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::OBJECTIVEC_MIMETYPE, kObjectiveCDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::PERL_MIMETYPE, kPerlDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::PERL_MIMETYPE, kPerlDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::PHP_MIMETYPE, kPhpDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::PHP_MIMETYPE, kPhpDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::PYTHON_MIMETYPE, kPythonDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::PYTHON_MIMETYPE, kPythonDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::RUBY_MIMETYPE, kRubyDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::RUBY_MIMETYPE, kRubyDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::SQL_MIMETYPE, kSqlDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::SQL_MIMETYPE, kSqlDefinitionId);
|
||||||
m_idByMimeType.insert(Highlight::Constants::TCL_MIMETYPE, kTclDefinitionId);
|
m_idByMimeType.insert(GenericEditor::Constants::TCL_MIMETYPE, kTclDefinitionId);
|
||||||
|
|
||||||
m_idByName.insert(QLatin1String("alerts"), kAlertDefinitionId);
|
m_idByName.insert(QLatin1String("alerts"), kAlertDefinitionId);
|
||||||
m_idByName.insert(QLatin1String("c"), kCDefinitionId);
|
m_idByName.insert(QLatin1String("c"), kCDefinitionId);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
#include <QtCore/QSet>
|
#include <QtCore/QSet>
|
||||||
#include <QtCore/QSharedPointer>
|
#include <QtCore/QSharedPointer>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class HighlightDefinition;
|
class HighlightDefinition;
|
||||||
@@ -96,6 +96,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // GENERICEDITORPLUGIN_H
|
#endif // GENERICEDITORPLUGIN_H
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include <QLatin1String>
|
#include <QLatin1String>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
HighlightDefinition::HighlightDefinition() :
|
HighlightDefinition::HighlightDefinition() :
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include <QtCore/QHash>
|
#include <QtCore/QHash>
|
||||||
#include <QtCore/QSharedPointer>
|
#include <QtCore/QSharedPointer>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class KeywordList;
|
class KeywordList;
|
||||||
@@ -126,6 +126,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // HIGHLIGHTDEFINITION_H
|
#endif // HIGHLIGHTDEFINITION_H
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include <QLatin1String>
|
#include <QLatin1String>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include <QtXml/QXmlDefaultHandler>
|
#include <QtXml/QXmlDefaultHandler>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class KeywordList;
|
class KeywordList;
|
||||||
@@ -102,6 +102,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // HIGHLIGHTDEFINITIONHANDLER_H
|
#endif // HIGHLIGHTDEFINITIONHANDLER_H
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include <texteditor/basetexteditor.h>
|
#include <texteditor/basetexteditor.h>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class Rule;
|
class Rule;
|
||||||
@@ -139,6 +139,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // HIGHLIGHTER_H
|
#endif // HIGHLIGHTER_H
|
||||||
|
|||||||
@@ -30,12 +30,12 @@
|
|||||||
#ifndef HIGHLIGHTEREXCEPTION_H
|
#ifndef HIGHLIGHTEREXCEPTION_H
|
||||||
#define HIGHLIGHTEREXCEPTION_H
|
#define HIGHLIGHTEREXCEPTION_H
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class HighlighterException {};
|
class HighlighterException {};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // HIGHLIGHTEREXCEPTION_H
|
#endif // HIGHLIGHTEREXCEPTION_H
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "includerulesinstruction.h"
|
#include "includerulesinstruction.h"
|
||||||
#include "reuse.h"
|
#include "reuse.h"
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
IncludeRulesInstruction::IncludeRulesInstruction(const QString &context,
|
IncludeRulesInstruction::IncludeRulesInstruction(const QString &context,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class IncludeRulesInstruction
|
class IncludeRulesInstruction
|
||||||
@@ -51,6 +51,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // INCLUDERULESINSTRUCTION_H
|
#endif // INCLUDERULESINSTRUCTION_H
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "itemdata.h"
|
#include "itemdata.h"
|
||||||
#include "reuse.h"
|
#include "reuse.h"
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#include <QtGui/QFont>
|
#include <QtGui/QFont>
|
||||||
#include <QtGui/QTextCharFormat>
|
#include <QtGui/QTextCharFormat>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class ItemData
|
class ItemData
|
||||||
@@ -64,6 +64,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // ITEMDATA_H
|
#endif // ITEMDATA_H
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "keywordlist.h"
|
#include "keywordlist.h"
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
void KeywordList::addKeyword(const QString &keyword)
|
void KeywordList::addKeyword(const QString &keyword)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
#include <QtCore/QSet>
|
#include <QtCore/QSet>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class KeywordList
|
class KeywordList
|
||||||
@@ -48,6 +48,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // KEYWORDLIST_H
|
#endif // KEYWORDLIST_H
|
||||||
|
|||||||
@@ -29,115 +29,115 @@
|
|||||||
|
|
||||||
#include "languagespecificfactories.h"
|
#include "languagespecificfactories.h"
|
||||||
#include "genericeditorconstants.h"
|
#include "genericeditorconstants.h"
|
||||||
#include "genericeditor.h"
|
#include "editor.h"
|
||||||
#include "genericeditorplugin.h"
|
#include "genericeditorplugin.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/mimedatabase.h>
|
#include <coreplugin/mimedatabase.h>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
// C
|
// C
|
||||||
CFactory::CFactory(QObject *parent) : GenericEditorFactory(parent)
|
CFactory::CFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{
|
{
|
||||||
addMimeType(QLatin1String(Highlight::Constants::C_HEADER_MIMETYPE));
|
addMimeType(QLatin1String(GenericEditor::Constants::C_HEADER_MIMETYPE));
|
||||||
addMimeType(QLatin1String(Highlight::Constants::C_SOURCE_MIMETYPE));
|
addMimeType(QLatin1String(GenericEditor::Constants::C_SOURCE_MIMETYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericEditor *CFactory::createGenericEditor(QWidget *parent)
|
Editor *CFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kCDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kCDefinitionId, parent); }
|
||||||
|
|
||||||
// C++
|
// C++
|
||||||
CppFactory::CppFactory(QObject *parent) : GenericEditorFactory(parent)
|
CppFactory::CppFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{
|
{
|
||||||
addMimeType(QLatin1String(Highlight::Constants::CPP_HEADER_MIMETYPE));
|
addMimeType(QLatin1String(GenericEditor::Constants::CPP_HEADER_MIMETYPE));
|
||||||
addMimeType(QLatin1String(Highlight::Constants::CPP_SOURCE_MIMETYPE));
|
addMimeType(QLatin1String(GenericEditor::Constants::CPP_SOURCE_MIMETYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericEditor *CppFactory::createGenericEditor(QWidget *parent)
|
Editor *CppFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kCppDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kCppDefinitionId, parent); }
|
||||||
|
|
||||||
// Css
|
// Css
|
||||||
CssFactory::CssFactory(QObject *parent) : GenericEditorFactory(parent)
|
CssFactory::CssFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::CSS_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::CSS_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *CssFactory::createGenericEditor(QWidget *parent)
|
Editor *CssFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kCssDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kCssDefinitionId, parent); }
|
||||||
|
|
||||||
// Fortran
|
// Fortran
|
||||||
FortranFactory::FortranFactory(QObject *parent) : GenericEditorFactory(parent)
|
FortranFactory::FortranFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::FORTRAN_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::FORTRAN_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *FortranFactory::createGenericEditor(QWidget *parent)
|
Editor *FortranFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kFortranDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kFortranDefinitionId, parent); }
|
||||||
|
|
||||||
// Html
|
// Html
|
||||||
HtmlFactory::HtmlFactory(QObject *parent) : GenericEditorFactory(parent)
|
HtmlFactory::HtmlFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::HTML_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::HTML_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *HtmlFactory::createGenericEditor(QWidget *parent)
|
Editor *HtmlFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kHtmlDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kHtmlDefinitionId, parent); }
|
||||||
|
|
||||||
// Java
|
// Java
|
||||||
JavaFactory::JavaFactory(QObject *parent) : GenericEditorFactory(parent)
|
JavaFactory::JavaFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::JAVA_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::JAVA_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *JavaFactory::createGenericEditor(QWidget *parent)
|
Editor *JavaFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kJavaDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kJavaDefinitionId, parent); }
|
||||||
|
|
||||||
// Javascript
|
// Javascript
|
||||||
JavascriptFactory::JavascriptFactory(QObject *parent) : GenericEditorFactory(parent)
|
JavascriptFactory::JavascriptFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::JAVASCRIPT_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::JAVASCRIPT_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *JavascriptFactory::createGenericEditor(QWidget *parent)
|
Editor *JavascriptFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kJavascriptDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kJavascriptDefinitionId, parent); }
|
||||||
|
|
||||||
// ObjectiveC
|
// ObjectiveC
|
||||||
ObjectiveCFactory::ObjectiveCFactory(QObject *parent) : GenericEditorFactory(parent)
|
ObjectiveCFactory::ObjectiveCFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::OBJECTIVEC_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::OBJECTIVEC_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *ObjectiveCFactory::createGenericEditor(QWidget *parent)
|
Editor *ObjectiveCFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kObjectiveCDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kObjectiveCDefinitionId, parent); }
|
||||||
|
|
||||||
// Perl
|
// Perl
|
||||||
PerlFactory::PerlFactory(QObject *parent) : GenericEditorFactory(parent)
|
PerlFactory::PerlFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::PERL_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::PERL_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *PerlFactory::createGenericEditor(QWidget *parent)
|
Editor *PerlFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kPerlDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kPerlDefinitionId, parent); }
|
||||||
|
|
||||||
// Php
|
// Php
|
||||||
PhpFactory::PhpFactory(QObject *parent) : GenericEditorFactory(parent)
|
PhpFactory::PhpFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::PHP_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::PHP_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *PhpFactory::createGenericEditor(QWidget *parent)
|
Editor *PhpFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kPhpDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kPhpDefinitionId, parent); }
|
||||||
|
|
||||||
// Python
|
// Python
|
||||||
PythonFactory::PythonFactory(QObject *parent) : GenericEditorFactory(parent)
|
PythonFactory::PythonFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::PYTHON_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::PYTHON_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *PythonFactory::createGenericEditor(QWidget *parent)
|
Editor *PythonFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kPythonDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kPythonDefinitionId, parent); }
|
||||||
|
|
||||||
// Ruby
|
// Ruby
|
||||||
RubyFactory::RubyFactory(QObject *parent) : GenericEditorFactory(parent)
|
RubyFactory::RubyFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::RUBY_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::RUBY_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *RubyFactory::createGenericEditor(QWidget *parent)
|
Editor *RubyFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kRubyDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kRubyDefinitionId, parent); }
|
||||||
|
|
||||||
// SQL
|
// SQL
|
||||||
SqlFactory::SqlFactory(QObject *parent) : GenericEditorFactory(parent)
|
SqlFactory::SqlFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::SQL_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::SQL_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *SqlFactory::createGenericEditor(QWidget *parent)
|
Editor *SqlFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kSqlDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kSqlDefinitionId, parent); }
|
||||||
|
|
||||||
// Tcl
|
// Tcl
|
||||||
TclFactory::TclFactory(QObject *parent) : GenericEditorFactory(parent)
|
TclFactory::TclFactory(QObject *parent) : EditorFactory(parent)
|
||||||
{ addMimeType(QLatin1String(Highlight::Constants::TCL_MIMETYPE)); }
|
{ addMimeType(QLatin1String(GenericEditor::Constants::TCL_MIMETYPE)); }
|
||||||
|
|
||||||
GenericEditor *TclFactory::createGenericEditor(QWidget *parent)
|
Editor *TclFactory::createGenericEditor(QWidget *parent)
|
||||||
{ return new GenericEditor(GenericEditorPlugin::kTclDefinitionId, parent); }
|
{ return new Editor(GenericEditorPlugin::kTclDefinitionId, parent); }
|
||||||
|
|||||||
@@ -30,12 +30,12 @@
|
|||||||
#ifndef LANGUAGESPECIFICFACTORIES_H
|
#ifndef LANGUAGESPECIFICFACTORIES_H
|
||||||
#define LANGUAGESPECIFICFACTORIES_H
|
#define LANGUAGESPECIFICFACTORIES_H
|
||||||
|
|
||||||
#include "genericeditorfactory.h"
|
#include "editorfactory.h"
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class CFactory : public GenericEditorFactory
|
class CFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -43,10 +43,10 @@ public:
|
|||||||
virtual ~CFactory() {}
|
virtual ~CFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CppFactory : public GenericEditorFactory
|
class CppFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -54,10 +54,10 @@ public:
|
|||||||
virtual ~CppFactory() {}
|
virtual ~CppFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CssFactory : public GenericEditorFactory
|
class CssFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -65,10 +65,10 @@ public:
|
|||||||
virtual ~CssFactory() {}
|
virtual ~CssFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class FortranFactory : public GenericEditorFactory
|
class FortranFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -76,10 +76,10 @@ public:
|
|||||||
virtual ~FortranFactory() {}
|
virtual ~FortranFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class HtmlFactory : public GenericEditorFactory
|
class HtmlFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -87,10 +87,10 @@ public:
|
|||||||
virtual ~HtmlFactory() {}
|
virtual ~HtmlFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class JavaFactory : public GenericEditorFactory
|
class JavaFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -98,10 +98,10 @@ public:
|
|||||||
virtual ~JavaFactory() {}
|
virtual ~JavaFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class JavascriptFactory : public GenericEditorFactory
|
class JavascriptFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -109,10 +109,10 @@ public:
|
|||||||
virtual ~JavascriptFactory() {}
|
virtual ~JavascriptFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class ObjectiveCFactory : public GenericEditorFactory
|
class ObjectiveCFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -120,10 +120,10 @@ public:
|
|||||||
virtual ~ObjectiveCFactory() {}
|
virtual ~ObjectiveCFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class PerlFactory : public GenericEditorFactory
|
class PerlFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -131,10 +131,10 @@ public:
|
|||||||
virtual ~PerlFactory() {}
|
virtual ~PerlFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class PhpFactory : public GenericEditorFactory
|
class PhpFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -142,10 +142,10 @@ public:
|
|||||||
virtual ~PhpFactory() {}
|
virtual ~PhpFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class PythonFactory : public GenericEditorFactory
|
class PythonFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -153,10 +153,10 @@ public:
|
|||||||
virtual ~PythonFactory() {}
|
virtual ~PythonFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RubyFactory : public GenericEditorFactory
|
class RubyFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -164,10 +164,10 @@ public:
|
|||||||
virtual ~RubyFactory() {}
|
virtual ~RubyFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class SqlFactory : public GenericEditorFactory
|
class SqlFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -175,10 +175,10 @@ public:
|
|||||||
virtual ~SqlFactory() {}
|
virtual ~SqlFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class TclFactory : public GenericEditorFactory
|
class TclFactory : public EditorFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -186,10 +186,10 @@ public:
|
|||||||
virtual ~TclFactory() {}
|
virtual ~TclFactory() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual GenericEditor *createGenericEditor(QWidget *parent);
|
virtual Editor *createGenericEditor(QWidget *parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // LANGUAGESPECIFICFACTORIES_H
|
#endif // LANGUAGESPECIFICFACTORIES_H
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QtGlobal>
|
#include <QtCore/QtGlobal>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
ProgressData::ProgressData() :
|
ProgressData::ProgressData() :
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class ProgressData
|
class ProgressData
|
||||||
@@ -67,6 +67,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highgliht
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // PROGRESSDATA_H
|
#endif // PROGRESSDATA_H
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include <QtCore/QLatin1String>
|
#include <QtCore/QLatin1String>
|
||||||
#include <QtCore/QChar>
|
#include <QtCore/QChar>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
inline bool toBool(const QString &s)
|
inline bool toBool(const QString &s)
|
||||||
@@ -86,6 +86,6 @@ inline void setStartCharacter(QChar &c, const QString &character)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // REUSE_H
|
#endif // REUSE_H
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
const QLatin1Char Rule::kBackSlash('\\');
|
const QLatin1Char Rule::kBackSlash('\\');
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include <QtCore/QList>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QSharedPointer>
|
#include <QtCore/QSharedPointer>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class ProgressData;
|
class ProgressData;
|
||||||
@@ -155,6 +155,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // RULE_H
|
#endif // RULE_H
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#include <QLatin1Char>
|
#include <QLatin1Char>
|
||||||
|
|
||||||
using namespace Highlight;
|
using namespace GenericEditor;
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
#include <QtCore/QRegExp>
|
#include <QtCore/QRegExp>
|
||||||
#include <QtCore/QSharedPointer>
|
#include <QtCore/QSharedPointer>
|
||||||
|
|
||||||
namespace Highlight {
|
namespace GenericEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class KeywordList;
|
class KeywordList;
|
||||||
@@ -283,6 +283,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Highlight
|
} // namespace GenericEditor
|
||||||
|
|
||||||
#endif // SPECIFICRULES_H
|
#endif // SPECIFICRULES_H
|
||||||
|
|||||||
Reference in New Issue
Block a user