Commit 4a596c8e authored by Eike Ziller's avatar Eike Ziller

Remove script manager and script debugger engine.

Doesn't really serve a purpose any more.

Change-Id: I8c3bc11bf7b05a15eafd2a22456a40b270cefadf
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 2f8f083b
......@@ -15,8 +15,7 @@ win32-msvc*:QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
INCLUDEPATH += dialogs \
actionmanager \
editormanager \
progressmanager \
scriptmanager
progressmanager
SOURCES += mainwindow.cpp \
editmode.cpp \
tabpositionindicator.cpp \
......@@ -55,7 +54,6 @@ SOURCES += mainwindow.cpp \
progressmanager/progressview.cpp \
progressmanager/progressbar.cpp \
progressmanager/futureprogress.cpp \
scriptmanager/scriptmanager.cpp \
statusbarwidget.cpp \
coreplugin.cpp \
variablemanager.cpp \
......@@ -155,9 +153,6 @@ HEADERS += mainwindow.h \
ifilewizardextension.h \
icorelistener.h \
versiondialog.h \
scriptmanager/metatypedeclarations.h \
scriptmanager/scriptmanager.h \
scriptmanager/scriptmanager_p.h \
core_global.h \
statusbarwidget.h \
coreplugin.h \
......
......@@ -20,7 +20,6 @@ QtcPlugin {
"dialogs",
"editormanager",
"progressmanager",
"scriptmanager",
"actionmanager"
])
......@@ -225,10 +224,6 @@ QtcPlugin {
"progressmanager/progressmanager_p.h",
"progressmanager/progressview.cpp",
"progressmanager/progressview.h",
"scriptmanager/metatypedeclarations.h",
"scriptmanager/scriptmanager.cpp",
"scriptmanager/scriptmanager.h",
"scriptmanager/scriptmanager_p.h",
]
Group {
......
......@@ -432,11 +432,6 @@ ProgressManager *ICore::progressManager()
return m_mainwindow->progressManager();
}
ScriptManager *ICore::scriptManager()
{
return m_mainwindow->scriptManager();
}
VariableManager *ICore::variableManager()
{
return m_mainwindow->variableManager();
......
......@@ -98,7 +98,6 @@ public:
static QT_DEPRECATED MessageManager *messageManager(); // Use MessageManager::... directly.
static EditorManager *editorManager();
static ProgressManager *progressManager();
static ScriptManager *scriptManager();
static QT_DEPRECATED VariableManager *variableManager(); // Use VariableManager::... directly.
static VcsManager *vcsManager();
static QT_DEPRECATED ModeManager *modeManager(); // Use ModeManager::... directly.
......
......@@ -53,7 +53,6 @@
#include "progressview.h"
#include "shortcutsettings.h"
#include "vcsmanager.h"
#include "scriptmanager_p.h"
#include "settingsdialog.h"
#include "variablemanager.h"
#include "versiondialog.h"
......@@ -130,7 +129,6 @@ MainWindow::MainWindow() :
m_editorManager(0),
m_externalToolManager(0),
m_progressManager(new ProgressManagerPrivate()),
m_scriptManager(new ScriptManagerPrivate(this)),
m_variableManager(new VariableManager),
m_vcsManager(new VcsManager),
m_statusBarManager(0),
......@@ -999,11 +997,6 @@ ProgressManager *MainWindow::progressManager() const
return m_progressManager;
}
ScriptManager *MainWindow::scriptManager() const
{
return m_scriptManager;
}
VariableManager *MainWindow::variableManager() const
{
return m_variableManager;
......
......@@ -61,7 +61,6 @@ class ModeManager;
class ProgressManager;
class NavigationWidget;
class RightPaneWidget;
class ScriptManager;
class SettingsDatabase;
class VariableManager;
class VcsManager;
......@@ -101,7 +100,6 @@ public:
Core::MessageManager *messageManager() const;
Core::EditorManager *editorManager() const;
Core::ProgressManager *progressManager() const;
Core::ScriptManager *scriptManager() const;
Core::VariableManager *variableManager() const;
Core::ModeManager *modeManager() const;
Core::MimeDatabase *mimeDatabase() const;
......@@ -183,7 +181,6 @@ private:
ExternalToolManager *m_externalToolManager;
MessageManager *m_messageManager;
ProgressManagerPrivate *m_progressManager;
ScriptManager *m_scriptManager;
VariableManager *m_variableManager;
VcsManager *m_vcsManager;
StatusBarManager *m_statusBarManager;
......
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef METATYPEDECLARATIONS_H
#define METATYPEDECLARATIONS_H
#include <coreplugin/messagemanager.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/idocument.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <QList>
#include <QMetaType>
QT_BEGIN_NAMESPACE
class QMainWindow;
class QStatusBar;
class QSettings;
QT_END_NAMESPACE
Q_DECLARE_METATYPE(Core::MessageManager*)
Q_DECLARE_METATYPE(Core::DocumentManager*)
Q_DECLARE_METATYPE(Core::IDocument*)
Q_DECLARE_METATYPE(QList<Core::IDocument*>)
Q_DECLARE_METATYPE(QList<Core::IEditor*>)
Q_DECLARE_METATYPE(Core::EditorManager*)
Q_DECLARE_METATYPE(Core::ICore*)
Q_DECLARE_METATYPE(QMainWindow*)
Q_DECLARE_METATYPE(QStatusBar*)
Q_DECLARE_METATYPE(QSettings*)
#endif // METATYPEDECLARATIONS_H
This diff is collapsed.
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef SCRIPTMANAGER_H
#define SCRIPTMANAGER_H
#include <coreplugin/core_global.h>
#include <QObject>
#include <QString>
#include <QSharedPointer>
QT_BEGIN_NAMESPACE
class QScriptEngine;
QT_END_NAMESPACE
namespace Core {
/* Script Manager.
* Provides a script engine that is initialized with
* Qt Creator's interfaces and allows for running scripts.
* @{todo} Should it actually manage script files, too? */
class CORE_EXPORT ScriptManager : public QObject
{
Q_OBJECT
public:
typedef QSharedPointer<QScriptEngine> QScriptEnginePtr;
// A stack frame as returned by a failed invocation (exception)
// fileName may be empty. lineNumber can be 0 for the top frame (goof-up?).
struct StackFrame {
QString function;
QString fileName;
int lineNumber;
};
typedef QList<StackFrame> Stack;
ScriptManager(QObject *parent = 0) : QObject(parent) {}
virtual ~ScriptManager() { }
// Run a script
virtual bool runScript(const QString &script, QString *errorMessage, Stack *errorStack) = 0;
virtual bool runScript(const QString &script, QString *errorMessage) = 0;
virtual QScriptEnginePtr scriptEngine() = 0;
};
} // namespace Core
#endif // SCRIPTMANAGER_H
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef SCRIPTMANAGER_P_H
#define SCRIPTMANAGER_P_H
#include "scriptmanager.h"
#include <QObject>
#include <QScriptEngine>
namespace Core {
namespace Internal {
class ScriptManagerPrivate : public Core::ScriptManager
{
Q_OBJECT
public:
explicit ScriptManagerPrivate(QObject *parent);
bool runScript(const QString &script, QString *errorMessage, Stack *stack);
bool runScript(const QString &script, QString *errorMessage);
virtual QScriptEnginePtr scriptEngine() { return ensureEngineInitialized(); }
static QString engineError(const QScriptEnginePtr &scriptEngine);
private:
QScriptEnginePtr ensureEngineInitialized();
QScriptEnginePtr m_engine;
};
} // namespace Internal
} // namespace Core
#endif // SCRIPTMANAGER_P_H
......@@ -141,7 +141,6 @@ LIBS *= -lole32 \
}
include(cdb/cdb.pri)
include(gdb/gdb.pri)
include(script/script.pri)
include(pdb/pdb.pri)
include(lldb/lldb.pri)
include(lldblib/lldbhost.pri)
......
......@@ -187,7 +187,6 @@ enum DebuggerEngineType
{
NoEngineType = 0,
GdbEngineType = 0x001,
ScriptEngineType = 0x002,
CdbEngineType = 0x004,
PdbEngineType = 0x008,
QmlEngineType = 0x020,
......@@ -195,7 +194,6 @@ enum DebuggerEngineType
LldbLibEngineType = 0x080,
LldbEngineType = 0x100,
AllEngineTypes = GdbEngineType
| ScriptEngineType
| CdbEngineType
| PdbEngineType
| QmlEngineType
......
......@@ -72,7 +72,6 @@ namespace Internal {
DebuggerEngine *createCdbEngine(const DebuggerStartParameters &sp, QString *error);
DebuggerEngine *createGdbEngine(const DebuggerStartParameters &sp);
DebuggerEngine *createScriptEngine(const DebuggerStartParameters &sp);
DebuggerEngine *createPdbEngine(const DebuggerStartParameters &sp);
DebuggerEngine *createQmlEngine(const DebuggerStartParameters &sp);
DebuggerEngine *createQmlCppEngine(const DebuggerStartParameters &sp, QString *error);
......@@ -86,8 +85,6 @@ static const char *engineTypeName(DebuggerEngineType et)
break;
case Debugger::GdbEngineType:
return "Gdb engine";
case Debugger::ScriptEngineType:
return "Script engine";
case Debugger::CdbEngineType:
return "Cdb engine";
case Debugger::PdbEngineType:
......@@ -428,11 +425,6 @@ static bool fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc,
if (sp.masterEngineType != NoEngineType)
return true;
if (sp.executable.endsWith(_(".js"))) {
sp.masterEngineType = ScriptEngineType;
return true;
}
if (sp.executable.endsWith(_(".py"))) {
sp.masterEngineType = PdbEngineType;
return true;
......@@ -518,8 +510,6 @@ DebuggerEngine *DebuggerRunControlFactory::createEngine(DebuggerEngineType et,
switch (et) {
case GdbEngineType:
return createGdbEngine(sp);
case ScriptEngineType:
return createScriptEngine(sp);
case CdbEngineType:
return createCdbEngine(sp, errorMessage);
case PdbEngineType:
......
HEADERS += \
$$PWD/scriptengine.h \
SOURCES += \
$$PWD/scriptengine.cpp \
FORMS +=
RESOURCES +=
This diff is collapsed.
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** 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.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef DEBUGGER_SCRIPTENGINE_H
#define DEBUGGER_SCRIPTENGINE_H
#include "debuggerengine.h"
#include <QSharedPointer>
#include <QHash>
QT_BEGIN_NAMESPACE
class QScriptEngine;
class QScriptValue;
QT_END_NAMESPACE
namespace Debugger {
namespace Internal {
class ScriptAgent;
class WatchData;
/* A debugger engine for a QScriptEngine implemented using a QScriptEngineAgent.
* listening on script events. The engine has a special execution model:
* The script is executed in the foreground, while the debugger runs in
* processEvents() triggered by QScriptEngine::setProcessEventsInterval().
* Stopping is emulated by manually calling processEvents() from the debugger engine. */
class ScriptEngine : public Debugger::DebuggerEngine
{
Q_OBJECT
public:
explicit ScriptEngine(const DebuggerStartParameters &startParameters);
virtual ~ScriptEngine();
private:
// DebuggerEngine implementation
void executeStep();
void executeStepOut();
void executeNext();
void executeStepI();
void executeNextI();
bool setToolTipExpression(const QPoint &mousePos,
TextEditor::ITextEditor *editor, const DebuggerToolTipContext &);
void setupEngine();
void setupInferior();
void runEngine();
void shutdownInferior();
void shutdownEngine();
void continueInferior();
void interruptInferior();
void executeRunToLine(const ContextData &data);
void executeRunToFunction(const QString &functionName);
void executeJumpToLine(const ContextData &data);
void activateFrame(int index);
void selectThread(ThreadId threadId);
bool acceptsBreakpoint(BreakpointModelId id) const;
void attemptBreakpointSynchronization();
void assignValueInDebugger(const WatchData *w,
const QString &expr, const QVariant &value);
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
void loadSymbols(const QString &moduleName);
void loadAllSymbols();
void requestModuleSymbols(const QString &moduleName);
void reloadModules();
void reloadRegisters() {}
void reloadSourceFiles() {}
void reloadFullStack() {}
bool checkForBreakCondition(bool byFunction);
void updateWatchData(const WatchData &data, const WatchUpdateFlags &flags);
void updateLocals();
void updateSubItem(const WatchData &data);
bool hasCapability(unsigned) const { return false; }
private:
friend class ScriptAgent;
void importExtensions();
QSharedPointer<QScriptEngine> m_scriptEngine;
QString m_scriptContents;
QString m_scriptFileName;
QScopedPointer<ScriptAgent> m_scriptAgent;
QHash<quint64,QScriptValue> m_watchIdToScriptValue;
quint64 m_watchIdCounter;
bool m_stopped;
bool m_stopOnNextLine;
};
} // namespace Internal
} // namespace Debugger
#endif // DEBUGGER_SCRIPTENGINE_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment