diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index a7810d191d2b9a5ad845d0e5bacd3bb0bf8fd7fd..3f2dd7b7d1c87e787af84970f028e1f5c1ec8f7c 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -43,10 +43,10 @@ contains(QT_CONFIG, declarative) { include(../private_headers.pri) exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) { SUBDIRS += plugin_qmldesigner \ - plugin_qmlinspector + plugin_qmljsinspector } else { warning() - warning("QmlDesigner and QmlInspector plugins have been disabled") + warning("QmlDesigner and QmlJSInspector plugins have been disabled") warning("The plugins depend on on private headers from QtDeclarative module.") warning("To enable them, pass 'QT_PRIVATE_HEADERS=$QTDIR/include' to qmake, where $QTDIR is the source directory of qt.") warning() @@ -200,12 +200,10 @@ plugin_qmldesigner.depends = plugin_coreplugin plugin_qmldesigner.depends += plugin_texteditor plugin_qmldesigner.depends += plugin_qmljseditor -plugin_qmlinspector.subdir = qmlinspector -plugin_qmlinspector.depends += plugin_projectexplorer -plugin_qmlinspector.depends += plugin_cppeditor -plugin_qmlinspector.depends += plugin_qmlprojectmanager -plugin_qmlinspector.depends += plugin_debugger -plugin_qmlinspector.depends += plugin_cpptools +plugin_qmljsinspector.subdir = qmljsinspector +plugin_qmljsinspector.depends += plugin_projectexplorer +plugin_qmljsinspector.depends += plugin_qmlprojectmanager +plugin_qmljsinspector.depends += plugin_debugger plugin_mercurial.subdir = mercurial plugin_mercurial.depends = plugin_vcsbase diff --git a/src/plugins/qmlinspector/QmlInspector.pluginspec b/src/plugins/qmljsinspector/QmlJSInspector.pluginspec similarity index 94% rename from src/plugins/qmlinspector/QmlInspector.pluginspec rename to src/plugins/qmljsinspector/QmlJSInspector.pluginspec index 5f217f9ed11b423f6858abdd1a33ce6245068526..788e28f6364867234e0ec93c85c730a67c1b5c36 100644 --- a/src/plugins/qmlinspector/QmlInspector.pluginspec +++ b/src/plugins/qmljsinspector/QmlJSInspector.pluginspec @@ -1,4 +1,4 @@ -<plugin name="QmlInspector" version="2.1.80" compatVersion="2.1.80"> +<plugin name="QmlJSInspector" version="2.1.80" compatVersion="2.1.80"> <vendor>Nokia Corporation</vendor> <copyright>(C) 2010 Nokia Corporation</copyright> <license> diff --git a/src/plugins/qmlinspector/images/logo.png b/src/plugins/qmljsinspector/images/logo.png similarity index 100% rename from src/plugins/qmlinspector/images/logo.png rename to src/plugins/qmljsinspector/images/logo.png diff --git a/src/plugins/qmljsinspector/qmljsdebuggerclient.cpp b/src/plugins/qmljsinspector/qmljsdebuggerclient.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7458c23ab7d4f1d2da94b95a125c73525acfc00d --- /dev/null +++ b/src/plugins/qmljsinspector/qmljsdebuggerclient.cpp @@ -0,0 +1,53 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ +#include "qmljsdebuggerclient.h" + +using namespace QmlJSInspector::Internal; + +DebuggerClient::DebuggerClient(QDeclarativeDebugConnection *client, Debugger::Internal::QmlEngine *engine) + : QDeclarativeDebugClient(QLatin1String("Debugger"), client) + , connection(client), engine(engine) +{ + connect(engine, SIGNAL(sendMessage(QByteArray)), this, SLOT(slotSendMessage(QByteArray))); + setEnabled(true); +} + +DebuggerClient::~DebuggerClient() +{ +} + +void DebuggerClient::messageReceived(const QByteArray &data) +{ + engine->messageReceived(data); +} + +void DebuggerClient::slotSendMessage(const QByteArray &message) +{ + QDeclarativeDebugClient::sendMessage(message); +} diff --git a/src/plugins/qmljsinspector/qmljsdebuggerclient.h b/src/plugins/qmljsinspector/qmljsdebuggerclient.h new file mode 100644 index 0000000000000000000000000000000000000000..b77aa9f42631770c24fb22366cc04bb4246165a7 --- /dev/null +++ b/src/plugins/qmljsinspector/qmljsdebuggerclient.h @@ -0,0 +1,63 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ +#ifndef QMLJSDEBUGGERCLIENT_H +#define QMLJSDEBUGGERCLIENT_H + +#include <debugger/qml/qmlengine.h> +#include <debugger/stackframe.h> +#include <debugger/stackhandler.h> +#include <debugger/debuggerrunner.h> +#include <private/qdeclarativedebugclient_p.h> // QML private API + +namespace QmlJSInspector { +namespace Internal { + +class DebuggerClient : public QDeclarativeDebugClient +{ + Q_OBJECT + +public: + DebuggerClient(QDeclarativeDebugConnection *client, Debugger::Internal::QmlEngine *engine); + virtual ~DebuggerClient(); + +public: // attributes + QDeclarativeDebugConnection *connection; + Debugger::Internal::QmlEngine *engine; + +private Q_SLOTS: + void slotSendMessage(const QByteArray &message); + +protected: + virtual void messageReceived(const QByteArray &data); +}; + +} // Internal +} // QmlJSInspector + +#endif // QMLJSDEBUGGERCLIENT_H diff --git a/src/plugins/qmlinspector/qmlinspector.pro b/src/plugins/qmljsinspector/qmljsinspector.pro similarity index 50% rename from src/plugins/qmlinspector/qmlinspector.pro rename to src/plugins/qmljsinspector/qmljsinspector.pro index db07adbcb5494e7830cee8d07b9ba37db576eaee..0f8b6abb015a4c3dbc71929481ec64501457acdd 100644 --- a/src/plugins/qmlinspector/qmlinspector.pro +++ b/src/plugins/qmljsinspector/qmljsinspector.pro @@ -1,23 +1,27 @@ TEMPLATE = lib -TARGET = QmlInspector - +TARGET = QmlJSInspector INCLUDEPATH += . DEPENDPATH += . +QT += declarative include(../../private_headers.pri) -DEFINES += QMLINSPECTOR_LIBRARY +DEFINES += QMLJSINSPECTOR_LIBRARY -HEADERS += qmlinspectorplugin.h \ - qmlinspectorconstants.h \ - qmlinspector_global.h \ - inspectorcontext.h \ +HEADERS += \ +qmljsdebuggerclient.h \ +qmljsinspector_global.h \ +qmljsinspectorconstants.h \ +qmljsinspectorcontext.h \ +qmljsinspectorplugin.h -SOURCES += qmlinspectorplugin.cpp \ - inspectorcontext.cpp +SOURCES += \ +qmljsdebuggerclient.cpp \ +qmljsinspectorcontext.cpp \ +qmljsinspectorplugin.cpp -OTHER_FILES += QmlInspector.pluginspec -RESOURCES += qmlinspector.qrc +OTHER_FILES += QmlJSInspector.pluginspec +RESOURCES += qmljsinspector.qrc include(../../qtcreatorplugin.pri) include(../../plugins/projectexplorer/projectexplorer.pri) diff --git a/src/plugins/qmlinspector/qmlinspector.qrc b/src/plugins/qmljsinspector/qmljsinspector.qrc similarity index 100% rename from src/plugins/qmlinspector/qmlinspector.qrc rename to src/plugins/qmljsinspector/qmljsinspector.qrc diff --git a/src/plugins/qmlinspector/qmlinspector_global.h b/src/plugins/qmljsinspector/qmljsinspector_global.h similarity index 97% rename from src/plugins/qmlinspector/qmlinspector_global.h rename to src/plugins/qmljsinspector/qmljsinspector_global.h index bf82eb5303fddff4ebd6060f7c3993005d9f408d..44dbc83f20e277099e59cf187fdfd455d3ceaacb 100644 --- a/src/plugins/qmlinspector/qmlinspector_global.h +++ b/src/plugins/qmljsinspector/qmljsinspector_global.h @@ -31,7 +31,7 @@ #include <QtCore/QtGlobal> -#if defined(QMLINSPECTOR_LIBRARY) +#if defined(QMLJSINSPECTOR_LIBRARY) # define QMLINSPECTOR_EXPORT Q_DECL_EXPORT #else # define QMLINSPECTOR_EXPORT Q_DECL_IMPORT diff --git a/src/plugins/qmlinspector/qmlinspectorconstants.h b/src/plugins/qmljsinspector/qmljsinspectorconstants.h similarity index 95% rename from src/plugins/qmlinspector/qmlinspectorconstants.h rename to src/plugins/qmljsinspector/qmljsinspectorconstants.h index 9e91549552d8423c2b35877b12c87f940b0c5b3d..ee04ce02afc7ef8f257c9344cdb86066a8280430 100644 --- a/src/plugins/qmlinspector/qmlinspectorconstants.h +++ b/src/plugins/qmljsinspector/qmljsinspectorconstants.h @@ -26,10 +26,10 @@ ** contact the sales department at http://qt.nokia.com/contact. ** **************************************************************************/ -#ifndef QMLINSPECTORCONSTANTS_H -#define QMLINSPECTORCONSTANTS_H +#ifndef QMLJSINSPECTORCONSTANTS_H +#define QMLJSINSPECTORCONSTANTS_H -namespace QmlInspector { +namespace QmlJSInspector { namespace Constants { const char * const RUN = "QmlInspector.Run"; const char * const STOP = "QmlInspector.Stop"; diff --git a/src/plugins/qmlinspector/inspectorcontext.cpp b/src/plugins/qmljsinspector/qmljsinspectorcontext.cpp similarity index 93% rename from src/plugins/qmlinspector/inspectorcontext.cpp rename to src/plugins/qmljsinspector/qmljsinspectorcontext.cpp index dee945e253c5e4497c4230110ca7c2109aa50cd7..3a687adf5c9fe570ed68326a5737d0aa22a091ac 100644 --- a/src/plugins/qmlinspector/inspectorcontext.cpp +++ b/src/plugins/qmljsinspector/qmljsinspectorcontext.cpp @@ -27,15 +27,15 @@ ** **************************************************************************/ -#include "inspectorcontext.h" -#include "qmlinspectorconstants.h" +#include "qmljsinspectorcontext.h" +#include "qmljsinspectorconstants.h" #include <coreplugin/icore.h> #include <QtGui/QWidget> #include <QtCore/QDebug> -using namespace QmlInspector::Internal; -using namespace QmlInspector::Constants; +using namespace QmlJSInspector::Internal; +using namespace QmlJSInspector::Constants; InspectorContext::InspectorContext(QWidget *widget) : IContext(widget), diff --git a/src/plugins/qmlinspector/inspectorcontext.h b/src/plugins/qmljsinspector/qmljsinspectorcontext.h similarity index 95% rename from src/plugins/qmlinspector/inspectorcontext.h rename to src/plugins/qmljsinspector/qmljsinspectorcontext.h index 5b7066efa66607deafef472b4faeb88cfd0a90cd..7a4e1dd2443d731099e6925e4ebfc583fb5a4644 100644 --- a/src/plugins/qmlinspector/inspectorcontext.h +++ b/src/plugins/qmljsinspector/qmljsinspectorcontext.h @@ -27,8 +27,8 @@ ** **************************************************************************/ -#ifndef INSPECTORCONTEXT_H -#define INSPECTORCONTEXT_H +#ifndef QMLJSINSPECTORCONTEXT_H +#define QMLJSINSPECTORCONTEXT_H #include <coreplugin/icontext.h> #include <QList> @@ -37,7 +37,7 @@ QT_BEGIN_NAMESPACE class QWidget; QT_END_NAMESPACE -namespace QmlInspector { +namespace QmlJSInspector { namespace Internal { class ObjectPropertiesView; @@ -72,4 +72,5 @@ private: } // Internal } // QmlInspector -#endif // DESIGNMODECONTEXT_H +#endif + diff --git a/src/plugins/qmlinspector/qmlinspectorplugin.cpp b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp similarity index 97% rename from src/plugins/qmlinspector/qmlinspectorplugin.cpp rename to src/plugins/qmljsinspector/qmljsinspectorplugin.cpp index b86f696d42724d28bfa146f9aa39130accaee4c7..82c7c5f7695b4a3c603e4cbe11cbaf3ecc4b83ee 100644 --- a/src/plugins/qmlinspector/qmlinspectorplugin.cpp +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp @@ -27,8 +27,8 @@ ** **************************************************************************/ -#include "qmlinspectorconstants.h" -#include "qmlinspectorplugin.h" +#include "qmljsinspectorconstants.h" +#include "qmljsinspectorplugin.h" #include <debugger/debuggeruiswitcher.h> #include <debugger/debuggerconstants.h> @@ -59,8 +59,8 @@ #include <QtCore/QDebug> -using namespace QmlInspector::Internal; -using namespace QmlInspector::Constants; +using namespace QmlJSInspector::Internal; +using namespace QmlJSInspector::Constants; namespace { QToolButton *createToolButton(QAction *action) diff --git a/src/plugins/qmlinspector/qmlinspectorplugin.h b/src/plugins/qmljsinspector/qmljsinspectorplugin.h similarity index 94% rename from src/plugins/qmlinspector/qmlinspectorplugin.h rename to src/plugins/qmljsinspector/qmljsinspectorplugin.h index e1dbf12911b139de11a8174f880f710dd101e22c..ddd55e09493df2bf4c6fc30c8ca16218eae4a6cd 100644 --- a/src/plugins/qmlinspector/qmlinspectorplugin.h +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.h @@ -26,8 +26,8 @@ ** contact the sales department at http://qt.nokia.com/contact. ** **************************************************************************/ -#ifndef QMLINSPECTORPLUGIN_H -#define QMLINSPECTORPLUGIN_H +#ifndef QMLJSINSPECTORPLUGIN_H +#define QMLJSINSPECTORPLUGIN_H #include <extensionsystem/iplugin.h> @@ -45,7 +45,7 @@ namespace ProjectExplorer { class Project; } -namespace QmlInspector { +namespace QmlJSInspector { namespace Internal { class QmlInspectorPlugin : public ExtensionSystem::IPlugin @@ -69,6 +69,6 @@ private slots: }; } // end of namespace Internal -} // end of namespace QmlInspector +} // end of QmlJSInspector #endif // QMLINSPECTORPLUGIN_H diff --git a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp index 16c5c49aa9fb26043d90b632741570224627e511..7461ef73f47be2c1e91646cc206d24636bbf4842 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp @@ -41,7 +41,7 @@ #include <debugger/debuggerconstants.h> #include <debugger/debuggeruiswitcher.h> -#include <qmlinspector/qmlinspectorconstants.h> +#include <qmljsinspector/qmljsinspectorconstants.h> #include <QDir> #include <QLabel> @@ -86,7 +86,7 @@ void QmlRunControl::start() // FIXME this line should be refactored out in order to remove the dependency between // debugger and qmlprojectmanager, because debugger also relies on cpptools. - Debugger::DebuggerUISwitcher::instance()->setActiveLanguage(QmlInspector::Constants::LANG_QML); + Debugger::DebuggerUISwitcher::instance()->setActiveLanguage(QmlJSInspector::Constants::LANG_QML); emit started(); emit appendMessage(this, tr("Starting %1 %2").arg(QDir::toNativeSeparators(m_executable),