forked from qt-creator/qt-creator
GlslEditor: Also camel-case the namespace
Follows the general pattern better. Change-Id: I5eaa6fb003d3b78c006f2500bba28c7cb92f623b Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -84,11 +84,11 @@ Protocol::ContentType Protocol::contentType(const QString &mt)
|
|||||||
{
|
{
|
||||||
if (mt == QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)
|
if (mt == QLatin1String(CppTools::Constants::C_SOURCE_MIMETYPE)
|
||||||
|| mt == QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE)
|
|| mt == QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE)
|
||||||
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE)
|
|| mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE)
|
||||||
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT)
|
|| mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE_VERT)
|
||||||
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG)
|
|| mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE_FRAG)
|
||||||
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_VERT_ES)
|
|| mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE_VERT_ES)
|
||||||
|| mt == QLatin1String(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG_ES))
|
|| mt == QLatin1String(GlslEditor::Constants::GLSL_MIMETYPE_FRAG_ES))
|
||||||
return C;
|
return C;
|
||||||
if (mt == QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)
|
if (mt == QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE)
|
||||||
|| mt == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)
|
|| mt == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
using namespace CPlusPlus;
|
using namespace CPlusPlus;
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
GlslCompleter::GlslCompleter()
|
GlslCompleter::GlslCompleter()
|
||||||
@@ -135,4 +135,4 @@ QString GlslCompleter::insertParagraphSeparator(const QTextCursor &cursor) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <texteditor/autocompleter.h>
|
#include <texteditor/autocompleter.h>
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GlslCompleter : public TextEditor::AutoCompleter
|
class GlslCompleter : public TextEditor::AutoCompleter
|
||||||
@@ -53,6 +53,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLAUTOCOMPLETER_H
|
#endif // GLSLAUTOCOMPLETER_H
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
enum CompletionOrder {
|
enum CompletionOrder {
|
||||||
@@ -472,4 +472,4 @@ GlslCompletionAssistInterface::GlslCompletionAssistInterface(QTextDocument *text
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace GLSL { class Function; }
|
|||||||
|
|
||||||
namespace TextEditor { class BasicProposalItem; }
|
namespace TextEditor { class BasicProposalItem; }
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GlslCompletionAssistInterface;
|
class GlslCompletionAssistInterface;
|
||||||
@@ -110,6 +110,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLCOMPLETIONASSIST_H
|
#endif // GLSLCOMPLETIONASSIST_H
|
||||||
|
|||||||
@@ -75,9 +75,9 @@
|
|||||||
|
|
||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
using namespace GLSL;
|
using namespace GLSL;
|
||||||
using namespace GLSLEditor::Constants;
|
using namespace GlslEditor::Constants;
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -395,4 +395,4 @@ Core::IEditor *GlslEditorFactory::createEditor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class TranslationUnitAST;
|
|||||||
class Scope;
|
class Scope;
|
||||||
} // namespace GLSL
|
} // namespace GLSL
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GlslEditor;
|
class GlslEditor;
|
||||||
@@ -132,6 +132,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLEDITOR_H
|
#endif // GLSLEDITOR_H
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Constants {
|
namespace Constants {
|
||||||
|
|
||||||
const char M_CONTEXT[] = "GLSL Editor.ContextMenu";
|
const char M_CONTEXT[] = "GLSL Editor.ContextMenu";
|
||||||
@@ -53,6 +53,6 @@ const char WIZARD_CATEGORY_GLSL[] = "U.GLSL";
|
|||||||
const char WIZARD_TR_CATEGORY_GLSL[] = QT_TRANSLATE_NOOP("GLSLEditor", "GLSL");
|
const char WIZARD_TR_CATEGORY_GLSL[] = QT_TRANSLATE_NOOP("GLSLEditor", "GLSL");
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLEDITOR_CONSTANTS_H
|
#endif // GLSLEDITOR_CONSTANTS_H
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GlslEditorPluginPrivate
|
class GlslEditorPluginPrivate
|
||||||
@@ -132,7 +132,7 @@ bool GlslEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
|
|||||||
addAutoReleasedObject(new GlslEditorFactory);
|
addAutoReleasedObject(new GlslEditorFactory);
|
||||||
addAutoReleasedObject(new GlslCompletionAssistProvider);
|
addAutoReleasedObject(new GlslCompletionAssistProvider);
|
||||||
|
|
||||||
ActionContainer *contextMenu = ActionManager::createMenu(GLSLEditor::Constants::M_CONTEXT);
|
ActionContainer *contextMenu = ActionManager::createMenu(Constants::M_CONTEXT);
|
||||||
ActionContainer *glslToolsMenu = ActionManager::createMenu(Id(Constants::M_TOOLS_GLSL));
|
ActionContainer *glslToolsMenu = ActionManager::createMenu(Id(Constants::M_TOOLS_GLSL));
|
||||||
glslToolsMenu->setOnAllDisabledBehavior(ActionContainer::Hide);
|
glslToolsMenu->setOnAllDisabledBehavior(ActionContainer::Hide);
|
||||||
QMenu *menu = glslToolsMenu->menu();
|
QMenu *menu = glslToolsMenu->menu();
|
||||||
@@ -213,12 +213,12 @@ bool GlslEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
|
|||||||
|
|
||||||
auto hf = new HighlighterFactory;
|
auto hf = new HighlighterFactory;
|
||||||
hf->setProductType<Highlighter>();
|
hf->setProductType<Highlighter>();
|
||||||
hf->setId(GLSLEditor::Constants::C_GLSLEDITOR_ID);
|
hf->setId(Constants::C_GLSLEDITOR_ID);
|
||||||
hf->addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE);
|
hf->addMimeType(Constants::GLSL_MIMETYPE);
|
||||||
hf->addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE_VERT);
|
hf->addMimeType(Constants::GLSL_MIMETYPE_VERT);
|
||||||
hf->addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG);
|
hf->addMimeType(Constants::GLSL_MIMETYPE_FRAG);
|
||||||
hf->addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE_VERT_ES);
|
hf->addMimeType(Constants::GLSL_MIMETYPE_VERT_ES);
|
||||||
hf->addMimeType(GLSLEditor::Constants::GLSL_MIMETYPE_FRAG_ES);
|
hf->addMimeType(Constants::GLSL_MIMETYPE_FRAG_ES);
|
||||||
addAutoReleasedObject(hf);
|
addAutoReleasedObject(hf);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -287,6 +287,6 @@ const GlslEditorPlugin::InitFile *GlslEditorPlugin::shaderInit(int variant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN(GLSLEditor::Internal::GLSLEditorPlugin)
|
Q_EXPORT_PLUGIN(GlslEditor::Internal::GlslEditorPlugin)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
#include <glsl/glsl.h>
|
#include <glsl/glsl.h>
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GlslEditorWidget;
|
class GlslEditorWidget;
|
||||||
@@ -70,6 +70,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLEDITORPLUGIN_H
|
#endif // GLSLEDITORPLUGIN_H
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
|
|
||||||
GlslFileWizard::GlslFileWizard(ShaderType shaderType)
|
GlslFileWizard::GlslFileWizard(ShaderType shaderType)
|
||||||
: m_shaderType(shaderType)
|
: m_shaderType(shaderType)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <coreplugin/basefilewizardfactory.h>
|
#include <coreplugin/basefilewizardfactory.h>
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
|
|
||||||
class GlslFileWizard: public Core::BaseFileWizardFactory
|
class GlslFileWizard: public Core::BaseFileWizardFactory
|
||||||
{
|
{
|
||||||
@@ -63,6 +63,6 @@ private:
|
|||||||
ShaderType m_shaderType;
|
ShaderType m_shaderType;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLFILEWIZARD_H
|
#endif // GLSLFILEWIZARD_H
|
||||||
|
|||||||
@@ -35,8 +35,8 @@
|
|||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
using namespace GLSLEditor;
|
using namespace GlslEditor;
|
||||||
using namespace GLSLEditor::Internal;
|
using namespace GlslEditor::Internal;
|
||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
|
|
||||||
Highlighter::Highlighter(QTextDocument *parent)
|
Highlighter::Highlighter(QTextDocument *parent)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <texteditor/syntaxhighlighter.h>
|
#include <texteditor/syntaxhighlighter.h>
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GlslEditorWidget;
|
class GlslEditorWidget;
|
||||||
@@ -71,6 +71,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLHIGHLIGHTER_H
|
#endif // GLSLHIGHLIGHTER_H
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
GlslHoverHandler::GlslHoverHandler(QObject *parent) : BaseHoverHandler(parent)
|
GlslHoverHandler::GlslHoverHandler(QObject *parent) : BaseHoverHandler(parent)
|
||||||
@@ -69,4 +69,4 @@ void GlslHoverHandler::decorateToolTip()
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace Core { class IEditor; }
|
|||||||
|
|
||||||
namespace TextEditor { class BaseTextEditor; }
|
namespace TextEditor { class BaseTextEditor; }
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GlslHoverHandler : public TextEditor::BaseHoverHandler
|
class GlslHoverHandler : public TextEditor::BaseHoverHandler
|
||||||
@@ -55,6 +55,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLHOVERHANDLER_H
|
#endif // GLSLHOVERHANDLER_H
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#include <QTextBlock>
|
#include <QTextBlock>
|
||||||
#include <QTextCursor>
|
#include <QTextCursor>
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
GlslIndenter::GlslIndenter()
|
GlslIndenter::GlslIndenter()
|
||||||
@@ -116,4 +116,4 @@ void GlslIndenter::indent(QTextDocument *doc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <texteditor/indenter.h>
|
#include <texteditor/indenter.h>
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class GlslIndenter : public TextEditor::Indenter
|
class GlslIndenter : public TextEditor::Indenter
|
||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
const TextEditor::TabSettings &tabSettings);
|
const TextEditor::TabSettings &tabSettings);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // namespace Internal
|
||||||
} // GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // GLSLINDENTER_H
|
#endif // GLSLINDENTER_H
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
using namespace GLSL;
|
using namespace GLSL;
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
int languageVariant(const QString &mimeType)
|
int languageVariant(const QString &mimeType)
|
||||||
@@ -75,6 +75,6 @@ int languageVariant(const QString &mimeType)
|
|||||||
return variant;
|
return variant;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Internal
|
} // namespace Internal
|
||||||
} // GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
|
|||||||
@@ -32,12 +32,12 @@
|
|||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
namespace GLSLEditor {
|
namespace GlslEditor {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
int languageVariant(const QString &mimeType);
|
int languageVariant(const QString &mimeType);
|
||||||
|
|
||||||
} // Internal
|
} // namespace Internal
|
||||||
} // GLSLEditor
|
} // namespace GlslEditor
|
||||||
|
|
||||||
#endif // REUSE_H
|
#endif // REUSE_H
|
||||||
|
|||||||
Reference in New Issue
Block a user