rename PythonEditor plugin to Python

The plugin does not only contain a pure editor, but all kind of support
for a programming language like project and run support.

Change-Id: I1251367c8db2e7a54986415ffc5b860cb210de3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2019-07-15 12:50:29 +02:00
parent 2778a5adab
commit 3213e12ce7
24 changed files with 63 additions and 63 deletions

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Python Class",
"trDisplayCategory": "Python",
"icon": "../../files/python/icon.png",
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}",
"options":
[

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Python File",
"trDisplayCategory": "Python",
"icon": "icon.png",
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}",
"pages" :
[

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Qt for Python - Empty",
"trDisplayCategory": "Application",
"icon": "icon.png",
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
"options":

View File

@@ -7,7 +7,7 @@
"trDisplayName": "Qt for Python - Window",
"trDisplayCategory": "Application",
"icon": "icon.png",
"enabled": "%{JS: value('Plugins').indexOf('PythonEditor') >= 0}",
"enabled": "%{JS: value('Plugins').indexOf('Python') >= 0}",
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
"options":

View File

@@ -52,7 +52,7 @@ add_subdirectory(genericprojectmanager)
add_subdirectory(git)
add_subdirectory(mercurial)
add_subdirectory(perforce)
add_subdirectory(pythoneditor)
add_subdirectory(python)
add_subdirectory(qmakeprojectmanager)
add_subdirectory(qmljstools)
add_subdirectory(qmlprojectmanager)

View File

@@ -34,7 +34,7 @@ SUBDIRS = \
qmljseditor \
qmlprojectmanager \
glsleditor \
pythoneditor \
python \
nim \
mercurial \
bazaar \

View File

@@ -52,7 +52,7 @@ Project {
"perfprofiler/perfprofiler.qbs",
"projectexplorer/projectexplorer.qbs",
"qbsprojectmanager/qbsprojectmanager.qbs",
"pythoneditor/pythoneditor.qbs",
"python/python.qbs",
"qmldesigner/qmldesigner.qbs",
"qmljseditor/qmljseditor.qbs",
"qmljstools/qmljstools.qbs",

View File

@@ -1,9 +1,9 @@
add_qtc_plugin(PythonEditor
add_qtc_plugin(Python
PLUGIN_DEPENDS Core QtSupport ProjectExplorer TextEditor
SOURCES
pythoneditor.cpp pythoneditor.h
pythoneditorconstants.h
pythoneditorplugin.cpp pythoneditorplugin.h
pythonconstants.h
pythonplugin.cpp pythonplugin.h
pythonformattoken.h
pythonhighlighter.cpp pythonhighlighter.h
pythonindenter.cpp pythonindenter.h

View File

@@ -1,5 +1,5 @@
{
\"Name\" : \"PythonEditor\",
\"Name\" : \"Python\",
\"Version\" : \"$$QTCREATOR_VERSION\",
\"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
\"Vendor\" : \"The Qt Company Ltd\",
@@ -13,7 +13,7 @@
\"Alternatively, this plugin may be used under the terms of the GNU General Public License version 3 as published by the Free Software Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT included in the packaging of this plugin. Please review the following information to ensure the GNU General Public License requirements will be met: https://www.gnu.org/licenses/gpl-3.0.html.\"
],
\"Category\" : \"Other Languages\",
\"Description\" : \"Editor and file creation wizards for Python. Example plugin for QtCreator API demonstration.\",
\"Description\" : \"Plugin for supporting the Python language.\",
\"Url\" : \"http://www.qt.io\",
$$dependencyList,

View File

@@ -1,19 +1,19 @@
include(../../qtcreatorplugin.pri)
DEFINES += \
PYTHONEDITOR_LIBRARY
PYTHON_LIBRARY
HEADERS += \
pythoneditorplugin.h \
pythonplugin.h \
pythoneditor.h \
pythoneditorconstants.h \
pythonconstants.h \
pythonhighlighter.h \
pythonindenter.h \
pythonformattoken.h \
pythonscanner.h \
SOURCES += \
pythoneditorplugin.cpp \
pythonplugin.cpp \
pythoneditor.cpp \
pythonhighlighter.cpp \
pythonindenter.cpp \

View File

@@ -1,7 +1,7 @@
import qbs 1.0
QtcPlugin {
name: "PythonEditor"
name: "Python"
Depends { name: "Qt.widgets" }
Depends { name: "Utils" }
@@ -15,8 +15,8 @@ QtcPlugin {
name: "General"
files: [
"pythoneditor.cpp", "pythoneditor.h",
"pythoneditorconstants.h",
"pythoneditorplugin.cpp", "pythoneditorplugin.h",
"pythonconstants.h",
"pythonplugin.cpp", "pythonplugin.h",
"pythonhighlighter.h", "pythonhighlighter.cpp",
"pythonindenter.cpp", "pythonindenter.h",
"pythonformattoken.h",

View File

@@ -1,4 +1,4 @@
QTC_PLUGIN_NAME = PythonEditor
QTC_PLUGIN_NAME = Python
QTC_LIB_DEPENDS += \
extensionsystem \
utils

View File

@@ -27,7 +27,7 @@
#include <QtGlobal>
namespace PythonEditor {
namespace Python {
namespace Constants {
const char C_PYTHONEDITOR_ID[] = "PythonEditor.PythonEditor";
@@ -41,4 +41,4 @@ const char C_PY_MIMETYPE[] = "text/x-python";
const char C_PY_MIME_ICON[] = "text-x-python";
} // namespace Constants
} // namespace PythonEditor
} // namespace Python

View File

@@ -24,8 +24,8 @@
****************************************************************************/
#include "pythoneditor.h"
#include "pythoneditorconstants.h"
#include "pythoneditorplugin.h"
#include "pythonconstants.h"
#include "pythonplugin.h"
#include "pythonindenter.h"
#include "pythonhighlighter.h"
@@ -39,7 +39,7 @@
using namespace TextEditor;
namespace PythonEditor {
namespace Python {
namespace Internal {
PythonEditorFactory::PythonEditorFactory()
@@ -62,4 +62,4 @@ PythonEditorFactory::PythonEditorFactory()
}
} // namespace Internal
} // namespace PythonEditor
} // namespace Python

View File

@@ -27,7 +27,7 @@
#include <texteditor/texteditor.h>
namespace PythonEditor {
namespace Python {
namespace Internal {
class PythonEditorFactory : public TextEditor::TextEditorFactory
@@ -37,4 +37,4 @@ public:
};
} // namespace Internal
} // namespace PythonEditor
} // namespace Python

View File

@@ -25,7 +25,7 @@
#pragma once
namespace PythonEditor {
namespace Python {
namespace Internal {
enum Format {
@@ -68,4 +68,4 @@ private:
};
} // namespace Internal
} // namespace PythonEditor
} // namespace Python

View File

@@ -41,7 +41,7 @@
#include <texteditor/texteditorconstants.h>
#include <utils/qtcassert.h>
namespace PythonEditor {
namespace Python {
namespace Internal {
/**
@@ -198,4 +198,4 @@ void PythonHighlighter::highlightImport(Scanner &scanner)
}
} // namespace Internal
} // namespace PythonEditor
} // namespace Python

View File

@@ -27,7 +27,7 @@
#include <texteditor/syntaxhighlighter.h>
namespace PythonEditor {
namespace Python {
namespace Internal {
class Scanner;
@@ -47,4 +47,4 @@ private:
};
} // namespace Internal
} // namespace PythonEditor
} // namespace Python

View File

@@ -30,7 +30,7 @@
#include <algorithm>
namespace PythonEditor {
namespace Python {
static bool isEmptyLine(const QString &t)
{
@@ -124,4 +124,4 @@ int PythonIndenter::getIndentDiff(const QString &previousLine,
return 0;
}
} // namespace PythonEditor
} // namespace Python

View File

@@ -27,7 +27,7 @@
#include <texteditor/textindenter.h>
namespace PythonEditor {
namespace Python {
class PythonIndenter : public TextEditor::TextIndenter
{
@@ -44,4 +44,4 @@ private:
const TextEditor::TabSettings &tabSettings) const;
};
} // namespace PythonEditor
} // namespace Python

View File

@@ -23,9 +23,9 @@
**
****************************************************************************/
#include "pythoneditorplugin.h"
#include "pythonplugin.h"
#include "pythoneditor.h"
#include "pythoneditorconstants.h"
#include "pythonconstants.h"
#include "pythonhighlighter.h"
#include <coreplugin/icore.h>
@@ -69,10 +69,10 @@
using namespace Core;
using namespace ProjectExplorer;
using namespace PythonEditor::Constants;
using namespace Python::Constants;
using namespace Utils;
namespace PythonEditor {
namespace Python {
namespace Internal {
const char PythonMimeType[] = "text/x-python-project"; // ### FIXME
@@ -711,11 +711,11 @@ bool PythonProjectNode::renameFile(const QString &filePath, const QString &newFi
////////////////////////////////////////////////////////////////////////////////////
//
// PythonEditorPlugin
// PythonPlugin
//
////////////////////////////////////////////////////////////////////////////////////
class PythonEditorPluginPrivate
class PythonPluginPrivate
{
public:
PythonEditorFactory editorFactory;
@@ -723,24 +723,24 @@ public:
SimpleRunWorkerFactory<SimpleTargetRunner, PythonRunConfiguration> runWorkerFactory;
};
PythonEditorPlugin::~PythonEditorPlugin()
PythonPlugin::~PythonPlugin()
{
delete d;
}
bool PythonEditorPlugin::initialize(const QStringList &arguments, QString *errorMessage)
bool PythonPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments)
Q_UNUSED(errorMessage)
d = new PythonEditorPluginPrivate;
d = new PythonPluginPrivate;
ProjectManager::registerProjectType<PythonProject>(PythonMimeType);
return true;
}
void PythonEditorPlugin::extensionsInitialized()
void PythonPlugin::extensionsInitialized()
{
// Add MIME overlay icons (these icons displayed at Project dock panel)
QString imageFile = creatorTheme()->imageFile(Theme::IconOverlayPro,
@@ -751,6 +751,6 @@ void PythonEditorPlugin::extensionsInitialized()
}
} // namespace Internal
} // namespace PythonEditor
} // namespace Python
#include "pythoneditorplugin.moc"
#include "pythonplugin.moc"

View File

@@ -27,24 +27,24 @@
#include <extensionsystem/iplugin.h>
namespace PythonEditor {
namespace Python {
namespace Internal {
class PythonEditorPlugin : public ExtensionSystem::IPlugin
class PythonPlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "PythonEditor.json")
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Python.json")
public:
PythonEditorPlugin() = default;
~PythonEditorPlugin() final;
PythonPlugin() = default;
~PythonPlugin() final;
private:
bool initialize(const QStringList &arguments, QString *errorMessage) final;
void extensionsInitialized() final;
class PythonEditorPluginPrivate *d = nullptr;
class PythonPluginPrivate *d = nullptr;
};
} // namespace Internal
} // namespace PythonEditor
} // namespace Python

View File

@@ -25,10 +25,10 @@
#include "pythonscanner.h"
#include "pythoneditorconstants.h"
#include "pythoneditorplugin.h"
#include "pythonconstants.h"
#include "pythonplugin.h"
namespace PythonEditor {
namespace Python {
namespace Internal {
Scanner::Scanner(const QChar *text, const int length)
@@ -389,4 +389,4 @@ void Scanner::parseState(State &state, QChar &savedData) const
}
} // namespace Internal
} // namespace PythonEditor
} // namespace Python

View File

@@ -29,7 +29,7 @@
#include <QString>
namespace PythonEditor {
namespace Python {
namespace Internal {
/**
@@ -95,4 +95,4 @@ private:
};
} // namespace Internal
} // namespace PythonEditor
} // namespace Python