diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-06-28 17:46:42 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-06-28 17:46:42 +0200 |
commit | a88a635e3d13c6731eca7d22e5d0aed2568d179a (patch) | |
tree | 663ca6c29974a389e8c14c68f38fb547c708a4b5 /src/plugins/qmlinspector | |
parent | 92e4fd9fd3fb681f621d66c536e8296dc7856710 (diff) | |
download | qt-creator-a88a635e3d13c6731eca7d22e5d0aed2568d179a.tar.gz |
Let's start from scratch with a new debugger for QmlJS.
Diffstat (limited to 'src/plugins/qmlinspector')
-rw-r--r-- | src/plugins/qmlinspector/QmlInspector.pluginspec | 30 | ||||
-rw-r--r-- | src/plugins/qmlinspector/images/logo.png | bin | 2662 -> 0 bytes | |||
-rw-r--r-- | src/plugins/qmlinspector/inspectorcontext.cpp | 82 | ||||
-rw-r--r-- | src/plugins/qmlinspector/inspectorcontext.h | 75 | ||||
-rw-r--r-- | src/plugins/qmlinspector/qmlinspector.pro | 27 | ||||
-rw-r--r-- | src/plugins/qmlinspector/qmlinspector.qrc | 6 | ||||
-rw-r--r-- | src/plugins/qmlinspector/qmlinspector_global.h | 40 | ||||
-rw-r--r-- | src/plugins/qmlinspector/qmlinspectorconstants.h | 55 | ||||
-rw-r--r-- | src/plugins/qmlinspector/qmlinspectorplugin.cpp | 198 | ||||
-rw-r--r-- | src/plugins/qmlinspector/qmlinspectorplugin.h | 74 |
10 files changed, 0 insertions, 587 deletions
diff --git a/src/plugins/qmlinspector/QmlInspector.pluginspec b/src/plugins/qmlinspector/QmlInspector.pluginspec deleted file mode 100644 index 5f217f9ed1..0000000000 --- a/src/plugins/qmlinspector/QmlInspector.pluginspec +++ /dev/null @@ -1,30 +0,0 @@ -<plugin name="QmlInspector" version="2.1.80" compatVersion="2.1.80"> - <vendor>Nokia Corporation</vendor> - <copyright>(C) 2010 Nokia Corporation</copyright> - <license> -Commercial Usage - -Licensees holding valid Qt Commercial licenses may use this plugin 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 plugin may be used under the terms of the GNU Lesser -General Public License version 2.1 as published by the Free Software -Foundation. 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.</license> - <category>Qt Quick</category> - <description>Debugger for QML files</description> - <url>http://qt.nokia.com</url> - <dependencyList> - <dependency name="QmlProjectManager" version="2.1.80"/> - <dependency name="ProjectExplorer" version="2.1.80"/> - <dependency name="CppTools" version="2.1.80"/> - <dependency name="CppEditor" version="2.1.80"/> - <dependency name="Debugger" version="2.1.80"/> - <dependency name="QmlJSEditor" version="2.1.80"/> - </dependencyList> -</plugin> diff --git a/src/plugins/qmlinspector/images/logo.png b/src/plugins/qmlinspector/images/logo.png Binary files differdeleted file mode 100644 index 5ac14a5a81..0000000000 --- a/src/plugins/qmlinspector/images/logo.png +++ /dev/null diff --git a/src/plugins/qmlinspector/inspectorcontext.cpp b/src/plugins/qmlinspector/inspectorcontext.cpp deleted file mode 100644 index dee945e253..0000000000 --- a/src/plugins/qmlinspector/inspectorcontext.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/************************************************************************** -** -** 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 "inspectorcontext.h" -#include "qmlinspectorconstants.h" - -#include <coreplugin/icore.h> -#include <QtGui/QWidget> -#include <QtCore/QDebug> - -using namespace QmlInspector::Internal; -using namespace QmlInspector::Constants; - -InspectorContext::InspectorContext(QWidget *widget) - : IContext(widget), - m_widget(widget), - m_context(C_INSPECTOR) -{ -} - -InspectorContext::~InspectorContext() -{ -} - -Core::Context InspectorContext::context() const -{ - return m_context; -} - -QWidget *InspectorContext::widget() -{ - return m_widget; -} - -void InspectorContext::setContextHelpId(const QString &helpId) -{ - m_contextHelpId = helpId; -} - -QString InspectorContext::contextHelpId() const -{ - return m_contextHelpId; -} - -QString InspectorContext::contextHelpIdForProperty(const QString &itemName, const QString &propName) -{ - // TODO this functionality is not supported yet as we don't have help id's for - // properties. - return QString("QML.").append(itemName).append(".").append(propName); -} - -QString InspectorContext::contextHelpIdForItem(const QString &itemName) -{ - return QString("QML.").append(itemName); -} - diff --git a/src/plugins/qmlinspector/inspectorcontext.h b/src/plugins/qmlinspector/inspectorcontext.h deleted file mode 100644 index 5b7066efa6..0000000000 --- a/src/plugins/qmlinspector/inspectorcontext.h +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************************** -** -** 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 INSPECTORCONTEXT_H -#define INSPECTORCONTEXT_H - -#include <coreplugin/icontext.h> -#include <QList> - -QT_BEGIN_NAMESPACE -class QWidget; -QT_END_NAMESPACE - -namespace QmlInspector { -namespace Internal { - -class ObjectPropertiesView; -class ObjectTree; -class DesignModeWidget; - -class InspectorContext : public Core::IContext -{ - Q_OBJECT - -public: - InspectorContext(QWidget *widget); - virtual ~InspectorContext(); - - // Core::IContext interface - virtual Core::Context context() const; - virtual QWidget *widget(); - virtual QString contextHelpId() const; - - static QString contextHelpIdForProperty(const QString &itemName, const QString &propName); - static QString contextHelpIdForItem(const QString &itemName); - -public slots: - void setContextHelpId(const QString &helpId); - -private: - QWidget *m_widget; - Core::Context m_context; - QString m_contextHelpId; -}; - -} // Internal -} // QmlInspector - -#endif // DESIGNMODECONTEXT_H diff --git a/src/plugins/qmlinspector/qmlinspector.pro b/src/plugins/qmlinspector/qmlinspector.pro deleted file mode 100644 index db07adbcb5..0000000000 --- a/src/plugins/qmlinspector/qmlinspector.pro +++ /dev/null @@ -1,27 +0,0 @@ -TEMPLATE = lib -TARGET = QmlInspector - -INCLUDEPATH += . -DEPENDPATH += . - -include(../../private_headers.pri) - -DEFINES += QMLINSPECTOR_LIBRARY - -HEADERS += qmlinspectorplugin.h \ - qmlinspectorconstants.h \ - qmlinspector_global.h \ - inspectorcontext.h \ - -SOURCES += qmlinspectorplugin.cpp \ - inspectorcontext.cpp - -OTHER_FILES += QmlInspector.pluginspec -RESOURCES += qmlinspector.qrc - -include(../../qtcreatorplugin.pri) -include(../../plugins/projectexplorer/projectexplorer.pri) -include(../../plugins/qmlprojectmanager/qmlprojectmanager.pri) -include(../../plugins/coreplugin/coreplugin.pri) -include(../../plugins/texteditor/texteditor.pri) -include(../../plugins/debugger/debugger.pri) diff --git a/src/plugins/qmlinspector/qmlinspector.qrc b/src/plugins/qmlinspector/qmlinspector.qrc deleted file mode 100644 index 45e8ddaad5..0000000000 --- a/src/plugins/qmlinspector/qmlinspector.qrc +++ /dev/null @@ -1,6 +0,0 @@ -<RCC> - <qresource prefix="/qmlinspector" > - <file>images/logo.png</file> - </qresource> -</RCC> - diff --git a/src/plugins/qmlinspector/qmlinspector_global.h b/src/plugins/qmlinspector/qmlinspector_global.h deleted file mode 100644 index bf82eb5303..0000000000 --- a/src/plugins/qmlinspector/qmlinspector_global.h +++ /dev/null @@ -1,40 +0,0 @@ -/************************************************************************** -** -** 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 QMLINSPECTOR_GLOBAL_H -#define QMLINSPECTOR_GLOBAL_H - -#include <QtCore/QtGlobal> - -#if defined(QMLINSPECTOR_LIBRARY) -# define QMLINSPECTOR_EXPORT Q_DECL_EXPORT -#else -# define QMLINSPECTOR_EXPORT Q_DECL_IMPORT -#endif - -#endif // QMLINSPECTOR_GLOBAL_H diff --git a/src/plugins/qmlinspector/qmlinspectorconstants.h b/src/plugins/qmlinspector/qmlinspectorconstants.h deleted file mode 100644 index 9e91549552..0000000000 --- a/src/plugins/qmlinspector/qmlinspectorconstants.h +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************** -** -** 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 QMLINSPECTORCONSTANTS_H -#define QMLINSPECTORCONSTANTS_H - -namespace QmlInspector { - namespace Constants { - const char * const RUN = "QmlInspector.Run"; - const char * const STOP = "QmlInspector.Stop"; - - const char * const C_INSPECTOR = "QmlInspector"; - const char * const COMPLETE_THIS = "QmlInspector.CompleteThis"; - - const char * const M_DEBUG_SIMULTANEOUSLY = "QmlInspector.Menu.SimultaneousDebug"; - - const char * const LANG_QML = "QML"; - - // settings - const char * const S_QML_INSPECTOR = "QML.Inspector"; - const char * const S_EXTERNALPORT_KEY = "ExternalPort"; - const char * const S_EXTERNALURL_KEY = "ExternalUrl"; - const char * const S_SHOW_UNINSPECTABLE_ITEMS = "ShowUninspectableProperties"; - const char * const S_SHOW_UNWATCHABLE_PROPERTIES = "ShowUninspectableItem"; - const char * const S_GROUP_PROPERTIES_BY_ITEM_TYPE = "GroupPropertiesByItemType"; - - } -} - -#endif diff --git a/src/plugins/qmlinspector/qmlinspectorplugin.cpp b/src/plugins/qmlinspector/qmlinspectorplugin.cpp deleted file mode 100644 index b86f696d42..0000000000 --- a/src/plugins/qmlinspector/qmlinspectorplugin.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/************************************************************************** -** -** 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 "qmlinspectorconstants.h" -#include "qmlinspectorplugin.h" - -#include <debugger/debuggeruiswitcher.h> -#include <debugger/debuggerconstants.h> - -#include <qmlprojectmanager/qmlproject.h> -#include <qmljseditor/qmljseditorconstants.h> - -#include <coreplugin/modemanager.h> -#include <projectexplorer/projectexplorer.h> -#include <extensionsystem/pluginmanager.h> -#include <coreplugin/icore.h> - -#include <projectexplorer/runconfiguration.h> -#include <projectexplorer/projectexplorer.h> -#include <projectexplorer/projectexplorerconstants.h> -#include <projectexplorer/project.h> - -#include <coreplugin/coreconstants.h> -#include <coreplugin/actionmanager/actionmanager.h> -#include <coreplugin/actionmanager/command.h> - -#include <QtCore/QStringList> -#include <QtCore/QtPlugin> -#include <QtCore/QTimer> - -#include <QtGui/QHBoxLayout> -#include <QtGui/QToolButton> - -#include <QtCore/QDebug> - -using namespace QmlInspector::Internal; -using namespace QmlInspector::Constants; - -namespace { -QToolButton *createToolButton(QAction *action) -{ - QToolButton *button = new QToolButton; - button->setDefaultAction(action); - return button; -} -} // end of anonymous namespace - -QmlInspectorPlugin::QmlInspectorPlugin() -{ - qDebug() << Q_FUNC_INFO; -} - -QmlInspectorPlugin::~QmlInspectorPlugin() -{ - qDebug() << Q_FUNC_INFO; -} - -void QmlInspectorPlugin::aboutToShutdown() -{ - qDebug() << Q_FUNC_INFO; -} - -bool QmlInspectorPlugin::initialize(const QStringList &arguments, QString *errorString) -{ - Q_UNUSED(arguments); - Q_UNUSED(errorString); - - qDebug() << Q_FUNC_INFO; - -#if 0 - Core::ICore *core = Core::ICore::instance(); - connect(Core::ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)), - SLOT(prepareDebugger(Core::IMode*))); - - ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance(); - Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>(); - - uiSwitcher->addLanguage(Qml::Constants::LANG_QML, Core::Context(Constants::C_INSPECTOR)); - m_inspector = new QmlInspector; - m_inspector->createDockWidgets(); - addObject(m_inspector); -#endif - - return true; -} - -void QmlInspectorPlugin::extensionsInitialized() -{ - qDebug() << Q_FUNC_INFO; - -#if 0 - ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance(); - Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>(); - - connect(uiSwitcher, SIGNAL(dockArranged(QString)), SLOT(setDockWidgetArrangement(QString))); - - ProjectExplorer::ProjectExplorerPlugin *pex = ProjectExplorer::ProjectExplorerPlugin::instance(); - if (pex) { - connect(pex, SIGNAL(aboutToExecuteProject(ProjectExplorer::Project*, QString)), - SLOT(activateDebuggerForProject(ProjectExplorer::Project*, QString))); - } - - QWidget *configBar = new QWidget; - configBar->setProperty("topBorder", true); - - QHBoxLayout *configBarLayout = new QHBoxLayout(configBar); - configBarLayout->setMargin(0); - configBarLayout->setSpacing(5); - - Core::ICore *core = Core::ICore::instance(); - Core::ActionManager *am = core->actionManager(); - configBarLayout->addWidget(createToolButton(am->command(ProjectExplorer::Constants::DEBUG)->action())); - configBarLayout->addWidget(createToolButton(am->command(ProjectExplorer::Constants::STOP)->action())); - - configBarLayout->addStretch(); - - uiSwitcher->setToolbar(Qml::Constants::LANG_QML, configBar); -#endif -} - -void QmlInspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode) -{ - Q_UNUSED(project); - Q_UNUSED(runMode); - - qDebug() << Q_FUNC_INFO; - -#if 0 - if (runMode == ProjectExplorer::Constants::DEBUGMODE) { - // FIXME we probably want to activate the debugger for other projects than QmlProjects, - // if they contain Qml files. Some kind of options should exist for this behavior. - QmlProjectManager::QmlProject *qmlproj = qobject_cast<QmlProjectManager::QmlProject*>(project); - if (qmlproj && m_inspector->setDebugConfigurationDataFromProject(qmlproj)) - m_inspector->startQmlProjectDebugger(); - } -#endif -} - -void QmlInspectorPlugin::prepareDebugger(Core::IMode *mode) -{ - Q_UNUSED(mode); - qDebug() << Q_FUNC_INFO; - -#if 0 - if (mode->id() != Debugger::Constants::MODE_DEBUG) - return; - - ProjectExplorer::ProjectExplorerPlugin *pex = ProjectExplorer::ProjectExplorerPlugin::instance(); - - if (pex->startupProject() && pex->startupProject()->id() == "QmlProjectManager.QmlProject") - { - ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance(); - Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>(); - uiSwitcher->setActiveLanguage(Qml::Constants::LANG_QML); - } -#endif -} - -void QmlInspectorPlugin::setDockWidgetArrangement(const QString &activeLanguage) -{ - Q_UNUSED(activeLanguage); - - qDebug() << Q_FUNC_INFO; - -#if 0 - if (activeLanguage == Qml::Constants::LANG_QML || activeLanguage.isEmpty()) - m_inspector->setSimpleDockWidgetArrangement(); -#endif -} - - -Q_EXPORT_PLUGIN(QmlInspectorPlugin) diff --git a/src/plugins/qmlinspector/qmlinspectorplugin.h b/src/plugins/qmlinspector/qmlinspectorplugin.h deleted file mode 100644 index e1dbf12911..0000000000 --- a/src/plugins/qmlinspector/qmlinspectorplugin.h +++ /dev/null @@ -1,74 +0,0 @@ -/************************************************************************** -** -** 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 QMLINSPECTORPLUGIN_H -#define QMLINSPECTORPLUGIN_H - -#include <extensionsystem/iplugin.h> - -#include <QtCore/QObject> -#include <QtCore/QPointer> -#include <QtCore/QTimer> - -QT_FORWARD_DECLARE_CLASS(QStringList) - -namespace Core { - class IMode; -} - -namespace ProjectExplorer { - class Project; -} - -namespace QmlInspector { -namespace Internal { - -class QmlInspectorPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - QmlInspectorPlugin(); - virtual ~QmlInspectorPlugin(); - - virtual bool initialize(const QStringList &arguments, QString *errorString); - virtual void extensionsInitialized(); - virtual void aboutToShutdown(); - -public slots: - void activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode); - void setDockWidgetArrangement(const QString &activeLanguage); - -private slots: - void prepareDebugger(Core::IMode *mode); -}; - -} // end of namespace Internal -} // end of namespace QmlInspector - -#endif // QMLINSPECTORPLUGIN_H |