From 7091f201b15134e821a1efa0e0423ca06a78a132 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 26 Dec 2014 13:28:34 +0100 Subject: [PATCH 01/12] - Add Row, Column (UI layout). - Rename content view. --- mix/CodeEditorExtensionManager.cpp | 16 ++-- mix/CodeEditorExtensionManager.h | 12 +-- mix/ConstantCompilationControl.cpp | 2 +- mix/Extension.h | 4 +- mix/TransactionListView.cpp | 24 +++--- mix/qml/MainContent.qml | 129 +++++++++++++++-------------- 6 files changed, 96 insertions(+), 91 deletions(-) diff --git a/mix/CodeEditorExtensionManager.cpp b/mix/CodeEditorExtensionManager.cpp index 4a93352b1..2edec1d72 100644 --- a/mix/CodeEditorExtensionManager.cpp +++ b/mix/CodeEditorExtensionManager.cpp @@ -80,10 +80,10 @@ void CodeEditorExtensionManager::initExtension(std::shared_ptr _ext) { try { - if (_ext->getDisplayBehavior() == ExtensionDisplayBehavior::Tab) - _ext->addTabOn(m_tabView); - else if (_ext->getDisplayBehavior() == ExtensionDisplayBehavior::RightTab) - _ext->addTabOn(m_rightTabView); + if (_ext->getDisplayBehavior() == ExtensionDisplayBehavior::RightView) + _ext->addContentOn(m_rightView); + if (_ext->getDisplayBehavior() == ExtensionDisplayBehavior::HeaderView) + _ext->addContentOn(m_headerView); } catch (...) { @@ -110,12 +110,12 @@ void CodeEditorExtensionManager::setEditor(QQuickItem* _editor) } } -void CodeEditorExtensionManager::setRightTabView(QQuickItem* _tabView) +void CodeEditorExtensionManager::setRightView(QQuickItem* _rightView) { - m_rightTabView = _tabView; + m_rightView = _rightView; } -void CodeEditorExtensionManager::setTabView(QQuickItem* _tabView) +void CodeEditorExtensionManager::setHeaderView(QQuickItem* _headerView) { - m_tabView = _tabView; + m_headerView = _headerView; } diff --git a/mix/CodeEditorExtensionManager.h b/mix/CodeEditorExtensionManager.h index 22ba1acef..30ffc8d9d 100644 --- a/mix/CodeEditorExtensionManager.h +++ b/mix/CodeEditorExtensionManager.h @@ -44,8 +44,8 @@ class CodeEditorExtensionManager: public QObject Q_OBJECT Q_PROPERTY(QQuickItem* editor MEMBER m_editor WRITE setEditor) - Q_PROPERTY(QQuickItem* tabView MEMBER m_tabView WRITE setTabView) - Q_PROPERTY(QQuickItem* rightTabView MEMBER m_rightTabView WRITE setRightTabView) + Q_PROPERTY(QQuickItem* headerView MEMBER m_headerView WRITE setHeaderView) + Q_PROPERTY(QQuickItem* rightView MEMBER m_rightView WRITE setRightView) public: CodeEditorExtensionManager(); @@ -57,15 +57,15 @@ public: /// Set current text editor. void setEditor(QQuickItem*); /// Set current tab view - void setTabView(QQuickItem*); + void setHeaderView(QQuickItem*); /// Set current right tab view. - void setRightTabView(QQuickItem*); + void setRightView(QQuickItem*); private: QQuickItem* m_editor; QVector> m_features; - QQuickItem* m_tabView; - QQuickItem* m_rightTabView; + QQuickItem* m_headerView; + QQuickItem* m_rightView; QTextDocument* m_doc; AppContext* m_appContext; void loadEditor(QQuickItem* _editor); diff --git a/mix/ConstantCompilationControl.cpp b/mix/ConstantCompilationControl.cpp index 58f8df5f9..fb6fbc90e 100644 --- a/mix/ConstantCompilationControl.cpp +++ b/mix/ConstantCompilationControl.cpp @@ -34,7 +34,7 @@ using namespace dev::mix; -ConstantCompilationControl::ConstantCompilationControl(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::Tab) +ConstantCompilationControl::ConstantCompilationControl(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::HeaderView) { connect(_context->codeModel(), &CodeModel::compilationComplete, this, &ConstantCompilationControl::update); } diff --git a/mix/Extension.h b/mix/Extension.h index bbd2d206b..98daf2918 100644 --- a/mix/Extension.h +++ b/mix/Extension.h @@ -33,8 +33,8 @@ class AppContext; enum ExtensionDisplayBehavior { - Tab, - RightTab, + HeaderView, + RightView, ModalDialog }; diff --git a/mix/TransactionListView.cpp b/mix/TransactionListView.cpp index 55df90b8a..80b635243 100644 --- a/mix/TransactionListView.cpp +++ b/mix/TransactionListView.cpp @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-ethereum. - cpp-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + cpp-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + cpp-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + You should have received a copy of the GNU General Public License + along with cpp-ethereum. If not, see . */ /** @file TransactionListView.cpp * @author Arkadiy Paronyan arkadiy@ethdev.com @@ -29,7 +29,7 @@ #include "TransactionListModel.h" using namespace dev::mix; -TransactionListView::TransactionListView(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::RightTab) +TransactionListView::TransactionListView(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::RightView) { m_model.reset(new TransactionListModel(this, _context)); m_appEngine->rootContext()->setContextProperty("transactionListModel", m_model.get()); diff --git a/mix/qml/MainContent.qml b/mix/qml/MainContent.qml index 794e5746d..8669f191e 100644 --- a/mix/qml/MainContent.qml +++ b/mix/qml/MainContent.qml @@ -16,66 +16,71 @@ Rectangle { anchors.fill: parent height: parent.height width: parent.width; - id:root - SplitView { - orientation: Qt.Horizontal - anchors.fill: parent - SplitView { - //anchors.fill: parent - width: parent.width * 0.8 - orientation: Qt.Vertical - Rectangle { - anchors.top: parent.top - id: contentView - width: parent.width - height: parent.height * 0.7 - TextArea { - id: codeEditor - height: parent.height - font.family: "Monospace" - font.pointSize: 12 - width: parent.width - anchors.centerIn: parent - tabChangesFocus: false - Keys.onPressed: { - if (event.key === Qt.Key_Tab) { - codeEditor.insert(codeEditor.cursorPosition, "\t"); - event.accepted = true; - } - } - } - } - Rectangle { - anchors.bottom: parent.bottom - id: contextualView - width: parent.width - Layout.minimumHeight: 20 - height: parent.height * 0.3 - TabView { - id: contextualTabs - antialiasing: true - anchors.fill: parent - style: TabStyle {} - } - } - } - Rectangle { - anchors.right: parent.right - id: rightPaneView - width: parent.width * 0.2 - height: parent.height - Layout.minimumWidth: 20 - TabView { - id: rightPaneTabs - antialiasing: true - anchors.fill: parent - //style: TabStyle {} - } - } - CodeEditorExtensionManager { - tabView: contextualTabs - rightTabView: rightPaneTabs - editor: codeEditor - } - } + id:root + + CodeEditorExtensionManager { + headerView: headerView; + rightView: rightView; + editor: codeEditor + } + + Column { + anchors.fill: parent; + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + Rectangle { + id: headerView + height: 50 + width: parent.width; + } + Row { + anchors.fill: parent; + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + SplitView { + orientation: Qt.Vertical; + anchors.fill: parent; + Rectangle { + id: editorRect; + height: parent.height; + width: parent.width /2; + TextArea { + id: codeEditor + height: parent.height + width: parent.width + font.family: "Monospace" + font.pointSize: 12 + anchors.centerIn: parent + tabChangesFocus: false + Keys.onPressed: { + if (event.key === Qt.Key_Tab) { + codeEditor.insert(codeEditor.cursorPosition, "\t"); + event.accepted = true; + } + } + } + } + Rectangle { + id: rightView; + height: parent.height; + width: parent.width /2; + Rectangle { + id: debugWindow; + } + Rectangle { + anchors.right: parent.right + id: rightPaneView + width: parent.width * 0.2 + height: parent.height + Layout.minimumWidth: 20 + TabView { + id: rightPaneTabs + antialiasing: true + anchors.fill: parent + } + } + } + } + } + } } From 5be17f28c74277ad8c560039b3a055b9400a83b5 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 8 Jan 2015 13:31:38 +0100 Subject: [PATCH 02/12] uidesign --- mix/AssemblyDebuggerControl.cpp | 11 +- mix/CodeEditorExtensionManager.cpp | 4 +- mix/CodeModel.cpp | 22 +- mix/CodeModel.h | 24 +- mix/ConstantCompilationControl.cpp | 28 +- mix/ConstantCompilationControl.h | 3 + mix/DebuggingStateWrapper.cpp | 36 +- mix/DebuggingStateWrapper.h | 15 +- mix/qml.qrc | 19 ++ mix/qml/CompilationStatus.qml | 116 +++++-- mix/qml/DataDump.qml | 169 ++++----- mix/qml/DebugBasicInfo.qml | 127 +++++-- mix/qml/Debugger.qml | 511 ++++++++++++++++------------ mix/qml/ImageButton.qml | 135 ++------ mix/qml/MainContent.qml | 154 ++++++--- mix/qml/StepActionImage.qml | 103 +----- mix/qml/Storage.qml | 118 +++---- mix/qml/js/Debugger.js | 135 +++++++- mix/qml/js/ErrorLocationFormater.js | 186 +--------- mix/qml/js/main.js | 68 ---- mix/qml/main.qml | 13 +- 21 files changed, 996 insertions(+), 1001 deletions(-) diff --git a/mix/AssemblyDebuggerControl.cpp b/mix/AssemblyDebuggerControl.cpp index 528d965c3..53d5e068f 100644 --- a/mix/AssemblyDebuggerControl.cpp +++ b/mix/AssemblyDebuggerControl.cpp @@ -55,7 +55,7 @@ QString toQString(dev::u256 _value) return QString::fromStdString(s.str()); } -AssemblyDebuggerControl::AssemblyDebuggerControl(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::ModalDialog) +AssemblyDebuggerControl::AssemblyDebuggerControl(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::RightView) { qRegisterMetaType("QVariableDefinition*"); qRegisterMetaType("QVariableDefinitionList*"); @@ -128,7 +128,7 @@ void AssemblyDebuggerControl::callContract(TransactionSettings _tr, dev::Address { auto compilerRes = m_ctx->codeModel()->code(); if (!compilerRes->successfull()) - m_ctx->displayMessageDialog("debugger","compilation failed"); + return; else { ContractCallDataEncoder c; @@ -194,10 +194,11 @@ void AssemblyDebuggerControl::updateGUI(bool _success, DebuggingStatusResult con m_appEngine->rootContext()->setContextProperty("humanReadableExecutionCode", QVariant::fromValue(std::get<0>(_code))); m_appEngine->rootContext()->setContextProperty("bytesCodeMapping", QVariant::fromValue(std::get<1>(_code))); m_appEngine->rootContext()->setContextProperty("contractCallReturnParameters", QVariant::fromValue(new QVariableDefinitionList(_returnParam))); - this->addContentOn(this); } - else - m_ctx->displayMessageDialog(QApplication::tr("debugger"), QApplication::tr("compilation failed")); + + QVariant returnValue; + QObject* debugPanel = m_view->findChild("debugPanel", Qt::FindChildrenRecursively); + QMetaObject::invokeMethod(debugPanel, "init", Q_RETURN_ARG(QVariant, returnValue)); } void AssemblyDebuggerControl::runTransaction(TransactionSettings const& _tr) diff --git a/mix/CodeEditorExtensionManager.cpp b/mix/CodeEditorExtensionManager.cpp index b7e5680ff..31f9b480d 100644 --- a/mix/CodeEditorExtensionManager.cpp +++ b/mix/CodeEditorExtensionManager.cpp @@ -80,9 +80,9 @@ void CodeEditorExtensionManager::initExtension(std::shared_ptr _ext) try { if (_ext->getDisplayBehavior() == ExtensionDisplayBehavior::RightView) - _ext->addContentOn(m_rightView); + _ext->addTabOn(m_rightView); if (_ext->getDisplayBehavior() == ExtensionDisplayBehavior::HeaderView) - _ext->addContentOn(m_headerView); + _ext->addTabOn(m_headerView); } catch (...) { diff --git a/mix/CodeModel.cpp b/mix/CodeModel.cpp index bafc42faa..ff468ff18 100644 --- a/mix/CodeModel.cpp +++ b/mix/CodeModel.cpp @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-ethereum. - cpp-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + cpp-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + cpp-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + You should have received a copy of the GNU General Public License + along with cpp-ethereum. If not, see . */ /** @file CodeModel.cpp * @author Arkadiy Paronyan arkadiy@ethdev.com diff --git a/mix/CodeModel.h b/mix/CodeModel.h index c33110226..8cccd1943 100644 --- a/mix/CodeModel.h +++ b/mix/CodeModel.h @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of cpp-ethereum. - cpp-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + cpp-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + cpp-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + You should have received a copy of the GNU General Public License + along with cpp-ethereum. If not, see . */ /** @file CodeModel.h * @author Arkadiy Paronyan arkadiy@ethdev.com @@ -60,6 +60,8 @@ class CompilationResult : public QObject { Q_OBJECT Q_PROPERTY(QContractDefinition* contract READ contract) + Q_PROPERTY(QString compilerMessage READ compilerMessage CONSTANT) + Q_PROPERTY(bool successfull READ successfull CONSTANT) public: /// Empty compilation result constructor diff --git a/mix/ConstantCompilationControl.cpp b/mix/ConstantCompilationControl.cpp index 8543eeb26..a7326170c 100644 --- a/mix/ConstantCompilationControl.cpp +++ b/mix/ConstantCompilationControl.cpp @@ -37,11 +37,12 @@ using namespace dev::mix; ConstantCompilationControl::ConstantCompilationControl(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::HeaderView) { connect(_context->codeModel(), &CodeModel::compilationComplete, this, &ConstantCompilationControl::update); + _context->appEngine()->rootContext()->setContextProperty("constantCompilation", this); } QString ConstantCompilationControl::contentUrl() const { - return QStringLiteral("qrc:/qml/BasicContent.qml"); + return QStringLiteral("qrc:/qml/CompilationStatus.qml"); } QString ConstantCompilationControl::title() const @@ -53,30 +54,19 @@ void ConstantCompilationControl::start() const { } -void ConstantCompilationControl::update() +CompilationResult* ConstantCompilationControl::result() const { - auto result = m_ctx->codeModel()->code(); + return m_ctx->codeModel()->code(); +} - QObject* status = m_view->findChild("status", Qt::FindChildrenRecursively); - QObject* content = m_view->findChild("content", Qt::FindChildrenRecursively); - if (result->successfull()) - { - status->setProperty("text", "succeeded"); - status->setProperty("color", "green"); - content->setProperty("text", result->assemblyCode()); - } - else - { - status->setProperty("text", "failure"); - status->setProperty("color", "red"); - content->setProperty("text", result->compilerMessage()); - } +void ConstantCompilationControl::update() +{ + QObject* ctrl = m_view->findChild("constantCompilationStatus", Qt::FindChildrenRecursively); + QMetaObject::invokeMethod(ctrl, "update"); } void ConstantCompilationControl::resetOutPut() { QObject* status = m_view->findChild("status", Qt::FindChildrenRecursively); - QObject* content = m_view->findChild("content", Qt::FindChildrenRecursively); status->setProperty("text", ""); - content->setProperty("text", ""); } diff --git a/mix/ConstantCompilationControl.h b/mix/ConstantCompilationControl.h index fa056424e..8acde4f09 100644 --- a/mix/ConstantCompilationControl.h +++ b/mix/ConstantCompilationControl.h @@ -20,6 +20,7 @@ #pragma once #include "Extension.h" +#include "CodeModel.h" namespace dev { @@ -32,6 +33,7 @@ namespace mix class ConstantCompilationControl: public Extension { Q_OBJECT + Q_PROPERTY(CompilationResult* result READ result CONSTANT) public: ConstantCompilationControl(AppContext* _appContext); @@ -39,6 +41,7 @@ public: void start() const override; QString title() const override; QString contentUrl() const override; + CompilationResult* result() const; private: void resetOutPut(); diff --git a/mix/DebuggingStateWrapper.cpp b/mix/DebuggingStateWrapper.cpp index 72bb02ecd..95e7991ed 100644 --- a/mix/DebuggingStateWrapper.cpp +++ b/mix/DebuggingStateWrapper.cpp @@ -66,43 +66,46 @@ std::tuple, QQMLMap*> DebuggingStateWrapper::getHumanReadableCod return std::make_tuple(codeStr, QPointer(new QQMLMap(codeMapping))); } -QString DebuggingStateWrapper::gasLeft() +QString DebuggingStateWrapper::gasCost() { std::ostringstream ss; - ss << std::dec << (m_state.gas - m_state.gasCost); + ss << std::dec << m_state.gasCost; return QString::fromStdString(ss.str()); } -QString DebuggingStateWrapper::gasCost() +QString DebuggingStateWrapper::gas() { std::ostringstream ss; - ss << std::dec << m_state.gasCost; + ss << std::dec << m_state.gas; return QString::fromStdString(ss.str()); } -QString DebuggingStateWrapper::gas() +QString DebuggingStateWrapper::newMemSize() { std::ostringstream ss; - ss << std::dec << m_state.gas; + ss << std::dec << m_state.newMemSize; return QString::fromStdString(ss.str()); } -QString DebuggingStateWrapper::debugStack() +QStringList DebuggingStateWrapper::debugStack() { - QString stack; + QStringList stack; for (auto i: m_state.stack) - stack.prepend(QString::fromStdString(prettyU256(i)) + "\n"); + stack.append(QString::fromStdString(prettyU256(i))); return stack; } -QString DebuggingStateWrapper::debugStorage() +QStringList DebuggingStateWrapper::debugStorage() { - std::stringstream s; + QStringList storage; for (auto const& i: m_state.storage) + { + std::stringstream s; s << "@" << prettyU256(i.first) << " " << prettyU256(i.second); - - return QString::fromStdString(s.str()); + storage.append(QString::fromStdString(s.str())); + } + return storage; } QString DebuggingStateWrapper::debugMemory() @@ -136,6 +139,13 @@ QString DebuggingStateWrapper::headerInfo() return QString::fromStdString(ss.str()); } +QString DebuggingStateWrapper::instruction() +{ + std::ostringstream ss; + ss << dev::eth::instructionInfo(m_state.inst).name; + return QString::fromStdString(ss.str()); +} + QString DebuggingStateWrapper::endOfDebug() { if (m_state.gasCost > m_state.gas) diff --git a/mix/DebuggingStateWrapper.h b/mix/DebuggingStateWrapper.h index bf3efe34d..902986570 100644 --- a/mix/DebuggingStateWrapper.h +++ b/mix/DebuggingStateWrapper.h @@ -115,13 +115,14 @@ class DebuggingStateWrapper: public QObject Q_PROPERTY(int curPC READ curPC CONSTANT) Q_PROPERTY(QString gasCost READ gasCost CONSTANT) Q_PROPERTY(QString gas READ gas CONSTANT) - Q_PROPERTY(QString gasLeft READ gasLeft CONSTANT) - Q_PROPERTY(QString debugStack READ debugStack CONSTANT) - Q_PROPERTY(QString debugStorage READ debugStorage CONSTANT) + Q_PROPERTY(QString instruction READ instruction CONSTANT) + Q_PROPERTY(QStringList debugStack READ debugStack CONSTANT) + Q_PROPERTY(QStringList debugStorage READ debugStorage CONSTANT) Q_PROPERTY(QString debugMemory READ debugMemory CONSTANT) Q_PROPERTY(QString debugCallData READ debugCallData CONSTANT) Q_PROPERTY(QString headerInfo READ headerInfo CONSTANT) Q_PROPERTY(QString endOfDebug READ endOfDebug CONSTANT) + Q_PROPERTY(QString newMemSize READ newMemSize CONSTANT) Q_PROPERTY(QStringList levels READ levels CONSTANT) public: @@ -137,9 +138,9 @@ public: /// Get gas used. QString gas(); /// Get stack. - QString debugStack(); + QStringList debugStack(); /// Get storage. - QString debugStorage(); + QStringList debugStorage(); /// Get memory. QString debugMemory(); /// Get call data. @@ -148,6 +149,10 @@ public: QString headerInfo(); /// get end of debug information. QString endOfDebug(); + /// Get the new memory size. + QString newMemSize(); + /// Get current instruction + QString instruction(); /// Get all previous steps. QStringList levels(); /// Get the current processed machine state. diff --git a/mix/qml.qrc b/mix/qml.qrc index 7e731b6f4..f39442cef 100644 --- a/mix/qml.qrc +++ b/mix/qml.qrc @@ -12,5 +12,24 @@ qml/AlertMessageDialog.qml qml/StateDialog.qml qml/StateList.qml + qml/CompilationStatus.qml + qml/js/main.js + qml/img/jumpintoback.png + qml/img/jumpintoforward.png + qml/img/jumpoutback.png + qml/img/jumpoutforward.png + qml/img/jumpoverback.png + qml/img/jumpoverforward.png + qml/ImageButton.qml + qml/DataDump.qml + qml/Storage.qml + qml/StepActionImage.qml + qml/img/jumpintobackdisabled.png + qml/img/jumpintoforwarddisabled.png + qml/img/jumpoutbackdisabled.png + qml/img/jumpoutforwarddisabled.png + qml/img/jumpoverbackdisabled.png + qml/DebugBasicInfo.qml + qml/js/ErrorLocationFormater.js diff --git a/mix/qml/CompilationStatus.qml b/mix/qml/CompilationStatus.qml index ff31dc86f..424e4a3dd 100644 --- a/mix/qml/CompilationStatus.qml +++ b/mix/qml/CompilationStatus.qml @@ -1,35 +1,97 @@ import QtQuick 2.2 import QtQuick.Controls 1.1 +import "js/ErrorLocationFormater.js" as ErrorLocationFormater Rectangle { + id: constantCompilationStatus + objectName: "constantCompilationStatus" + function update() + { + if (constantCompilation.result.successfull) + { + image.state = ""; + status.state = ""; + status.text = qsTr("Compile without errors."); + logslink.visible = false; + } + else + { + image.state = "error"; + status.state = "error"; + var errorInfo = ErrorLocationFormater.extractErrorInfo(constantCompilation.result.compilerMessage, true); + status.text = errorInfo.errorLocation + " " + errorInfo.errorDetail; + logslink.visible = true; + } + } + anchors.fill: parent - width: parent.width - height: parent.height - color: "lightgray" - Text { - font.pointSize: 9 - anchors.left: parent.left - anchors.top: parent.top - anchors.topMargin: 3 - anchors.leftMargin: 3 - height: 9 - font.family: "Monospace" - objectName: "status" - id: status + gradient: Gradient { + GradientStop { position: 0.0; color: "#f1f1f1" } + GradientStop { position: 1.0; color: "#d9d7da" } } - TextArea { - readOnly: true - anchors.left: parent.left - anchors.leftMargin: 10 - anchors.top: status.bottom - anchors.topMargin: 3 - font.pointSize: 9 - font.family: "Monospace" - height: parent.height * 0.8 - width: parent.width - 20 - wrapMode: Text.Wrap - backgroundVisible: false - objectName: "content" - id: content + Rectangle { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + anchors.topMargin: 10 + anchors.bottomMargin: 10 + radius: 3 + width: 500 + height: 30 + color: "#fffcd5" + Row { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + spacing: 5 + Image + { + source: "qrc:/qml/img/compilsuceeded.png" + id: image + states:[ + State { + name: "error" + PropertyChanges { + target: image + source: "qrc:/qml/img/compilfailed.png" + } + } + ] + } + + Text { + font.pointSize: 10 + height: 9 + font.family: "sans serif" + objectName: "status" + id: status + states:[ + State { + name: "error" + PropertyChanges { + target: status + color: "red" + } + } + ] + } + + Text { + + visible: false + font.pointSize: 9 + height: 9 + text: qsTr("See log.") + font.family: "Monospace" + objectName: "status" + id: logslink + color: "#8c8a74" + MouseArea { + anchors.fill: parent + onClicked: { + mainContent.ensureRightView(); + debugModel.debugDeployment(); + } + } + } + } } } diff --git a/mix/qml/DataDump.qml b/mix/qml/DataDump.qml index 4c91ca022..85732fbca 100644 --- a/mix/qml/DataDump.qml +++ b/mix/qml/DataDump.qml @@ -2,118 +2,89 @@ import QtQuick 2.2 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.0 import QtQuick.Controls.Styles 1.1 -import CodeEditorExtensionManager 1.0 -Rectangle { - objectName: "mainContent" - signal keyPressed(variant event) - focus: true - Keys.enabled: true - Keys.onPressed: - { - root.keyPressed(event.key); - } - anchors.fill: parent - id: root +ColumnLayout { + property variant content; + property string title; + height: 250 - function ensureRightView() - { - if (!rightView.visible) - { - rightView.show(); + RowLayout { + + Image { + source: "qrc:/qml/img/jumpoverback.png" + width: 15 + sourceSize.width: 15 + id: imgArrow } - } - CodeEditorExtensionManager { - headerView: headerPaneTabs; - rightView: rightPaneTabs; - editor: codeEditor - } + Text { + color: "#8b8b8b" + text: title + id: listTitle + } - GridLayout - { - anchors.fill: parent - rows: 2 - flow: GridLayout.TopToBottom - columnSpacing: 0 - rowSpacing: 0 - Rectangle { - Layout.row: 0 - Layout.fillWidth: true - Layout.preferredHeight: 50 - id: headerView - TabView { - id: headerPaneTabs - tabsVisible: false - antialiasing: true - anchors.fill: parent - style: TabViewStyle { - frameOverlap: 1 - tab: Rectangle {} - frame: Rectangle {} - } + MouseArea + { + anchors.fill: parent + onClicked: { + if (listContainer.state === "collapsed") + listContainer.state = ""; + else + listContainer.state = "collapsed"; } } + } - SplitView { - resizing: false - Layout.row: 1 - orientation: Qt.Horizontal; - Layout.fillWidth: true - Layout.preferredHeight: root.height - headerView.height; - Rectangle { - id: editorRect; - height: parent.height; - width: parent.width; - TextArea { - id: codeEditor - anchors.fill: parent; - font.family: "Monospace" - font.pointSize: 12 - backgroundVisible: true; - textColor: "white" - tabChangesFocus: false - style: TextAreaStyle { - backgroundColor: "black" - } - Keys.onPressed: { - if (event.key === Qt.Key_Tab) { - codeEditor.insert(codeEditor.cursorPosition, "\t"); - event.accepted = true; - } - } - } + Rectangle + { + Layout.fillWidth: true + transitions: [ + Transition { + NumberAnimation { target: listContainer; property: "opacity"; duration: 400 } + NumberAnimation { target: listContainer; property: "height"; duration: 400 } + NumberAnimation { target: listContainer.parent; property: "height"; duration: 400 } + NumberAnimation { target: dumpList; property: "opacity"; duration: 400 } + NumberAnimation { target: dumpList; property: "height"; duration: 400 } } - Rectangle { - visible: false; - id: rightView; - property real panelRelWidth: 0.38 - function show() { - visible = true; - editorRect.width = parent.width * (1 - 0.38) - codeEditor.focus = false; - rightPaneTabs.focus = true; + ] + states: [ + State { + name: "collapsed" + PropertyChanges { + target: listContainer + height: 0 + opacity: 0 + } + PropertyChanges { + target: listContainer.parent + height: 20 } - height: parent.height; - width: Layout.minimumWidth - Layout.minimumWidth: parent.width * 0.38 - Rectangle { - anchors.fill: parent; - id: rightPaneView - TabView { - id: rightPaneTabs - tabsVisible: false - antialiasing: true - anchors.fill: parent - style: TabViewStyle { - frameOverlap: 1 - tab: Rectangle {} - frame: Rectangle {} - } - } + PropertyChanges { + target: dumpList + height: 0 + opacity: 0 } } + ] + id: listContainer + //border.width: 3 + //border.color: "#deddd9" + anchors.top: listTitle.bottom + height: 223 + anchors.topMargin: 5 + width: parent.width + color: "transparent" + TextArea { + readOnly: true + anchors.top: parent.top + anchors.left: parent.left + anchors.topMargin: 5 + anchors.leftMargin: 5 + width: parent.width + height: parent.height + id: dumpList + text: content } } } diff --git a/mix/qml/DebugBasicInfo.qml b/mix/qml/DebugBasicInfo.qml index 206100c7b..5cfea55ac 100644 --- a/mix/qml/DebugBasicInfo.qml +++ b/mix/qml/DebugBasicInfo.qml @@ -3,36 +3,107 @@ import QtQuick.Controls 1.1 import QtQuick.Layouts 1.0 import QtQuick.Controls.Styles 1.1 -Item { - id: button +ColumnLayout { + property string currentStep + property string mem + property string stepCost + property string gasSpent + spacing: 0 + RowLayout { + width: parent.width + height: parent.height / 4 + Rectangle { + width: parent.width / 2 + height: parent.height + color: "#e5e5e5" + Text + { + font.pixelSize: 12 + anchors.centerIn: parent + color: "#a2a2a2" + text: qsTr("Current step") + font.family: "Sans Serif" + } + } + Text + { + font.pixelSize: 13 + id: currentStepValue + text: currentStep + } + } - signal clicked - signal pressed - signal released + RowLayout { + width: parent.width + height: parent.height / 4 + Rectangle { + width: parent.width / 2 + height: parent.height + color: "#e5e5e5" + Text + { + font.pixelSize: 12 + anchors.centerIn: parent + color: "#a2a2a2" + text: qsTr("Adding memory") + font.family: "Sans Serif" + } + } - width: sprite.width - height: sprite.height + Text + { + font.pixelSize: 13 + id: memValue + text: mem + } + } + RowLayout { + width: parent.width + height: parent.height / 4 + Rectangle { + width: parent.width / 2 + height: parent.height + color: "#e5e5e5" + Text + { + font.pixelSize: 12 + anchors.centerIn: parent + color: "#a2a2a2" + text: qsTr("Step cost") + font.family: "Sans Serif" + } + } + Text + { + font.pixelSize: 13 + id: stepCostValue + text: stepCost + } + } - MouseArea { - id: mouseArea - enabled: button.enabled - anchors.fill: button - hoverEnabled: true - - onClicked: button.clicked() - onPressed: button.pressed() - onReleased: button.released() - } - - onClicked: { - } - - onPressed: { - opacity = 0.5 - } - - onReleased: { - opacity = 1.0 - } + RowLayout { + width: parent.width + height: parent.height / 4 + Rectangle { + width: parent.width / 2 + height: parent.height + color: "#e5e5e5" + Text + { + font.pixelSize: 12 + anchors.centerIn: parent + color: "#a2a2a2" + text: qsTr("Total gas spent") + font.family: "Sans Serif" + } + } + Text + { + font.pixelSize: 13 + id: gasSpentValue + text: gasSpent + } + } } + diff --git a/mix/qml/Debugger.qml b/mix/qml/Debugger.qml index 056126e16..f1c06c157 100644 --- a/mix/qml/Debugger.qml +++ b/mix/qml/Debugger.qml @@ -4,266 +4,329 @@ import QtQuick.Controls 1.1 import QtQuick.Dialogs 1.1 import QtQuick.Layouts 1.1 import "js/Debugger.js" as Debugger +import "js/ErrorLocationFormater.js" as ErrorLocationFormater Rectangle { + id: debugPanel + objectName: "debugPanel" anchors.fill: parent; - color: "lightgrey" - Component.onCompleted: Debugger.init(); - Rectangle { - color: "transparent" - id: headerInfo - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - height: 60 - anchors.top: parent.top - Column { - width: parent.width - height: parent.height - Rectangle { - color: "transparent" - width: parent.width - height: 30 - Label { - anchors.centerIn: parent - font.family: "Verdana" - font.pointSize: 9 - font.italic: true - id: headerInfoLabel - } - } - Rectangle { - color: "transparent" - width: parent.width - anchors.horizontalCenter: parent.horizontalCenter - height: 30 - ListView { - orientation: ListView.Horizontal - anchors.centerIn: parent; - width: parent.width - id: headerReturnList - delegate: renderDelegateReturnValues - } - Component { - id: renderDelegateReturnValues - Item { - id: wrapperItem - width: 80 - Text { - anchors.centerIn: parent - text: variable.declaration.name + " = " + variable.value - font.pointSize: 9 - } - } - } - } - } - } + color: "#ededed" - Keys.onPressed: { + Keys.onPressed: + { if (event.key === Qt.Key_F10) Debugger.moveSelection(1); else if (event.key === Qt.Key_F9) Debugger.moveSelection(-1); } - Rectangle { - color: "transparent" - id: stateListContainer - focus: true - anchors.topMargin: 10 - anchors.top: headerInfo.bottom - anchors.left: parent.left - height: parent.height - 70 - width: parent.width * 0.5 + function init() + { + if (constantCompilation.result.successfull) + { + Debugger.init(); + debugScrollArea.visible = true; + compilationErrorArea.visible = false; + machineStates.visible = true; + } + else + { + debugScrollArea.visible = false; + compilationErrorArea.visible = true; + machineStates.visible = false; + console.log(constantCompilation.result.compilerMessage); + var errorInfo = ErrorLocationFormater.extractErrorInfo(constantCompilation.result.compilerMessage, false); + errorLocation.text = errorInfo.errorLocation; + errorDetail.text = errorInfo.errorDetail; + errorLine.text = errorInfo.errorLine; + } + forceActiveFocus(); + } - ListView { + Rectangle + { + visible: false; + id: compilationErrorArea + width: parent.width - 20 + height: 500 + color: "#ededed" + anchors.left: parent.left + anchors.top: parent.top + anchors.margins: 10 + ColumnLayout + { + width: parent.width anchors.top: parent.top - height: parent.height * 0.60 - width: 200 - anchors.horizontalCenter: parent.horizontalCenter - id: statesList - model: humanReadableExecutionCode - delegate: renderDelegate - highlight: highlightBar - highlightFollowsCurrentItem: true - } + spacing: 25 + RowLayout + { + height: 100 + Image { + id: compileFailed + source: "qrc:/qml/img/compilfailed.png" + } + ColumnLayout + { + Text { + color: "red" + id: errorLocation + } + Text { + color: "#4a4a4a" + id: errorDetail + } + } + } - Component { - id: highlightBar - Rectangle { - height: statesList.currentItem.height - width: statesList.currentItem.width - border.color: "orange" - border.width: 1 - Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } } + Rectangle + { + width: parent.width - 6 + height: 2 + color: "#d0d0d0" } - } - Component { - id: renderDelegate - Item { - id: wrapperItem - height: 20 - width: parent.width - Text { - anchors.centerIn: parent - text: line - font.pointSize: 9 + RowLayout + { + Text + { + color: "#4a4a4a" + id: errorLine } } } + } - Rectangle { - id: callStackPanel - anchors.top: statesList.bottom - height: parent.height * 0.35 - width: parent.width + + Flickable { + id: debugScrollArea + flickableDirection: Flickable.VerticalFlick + anchors.fill: parent + contentHeight: machineStates.height + contentWidth: machineStates.width + + GridLayout + { + property int sideMargin: 10 + id: machineStates + anchors.top: parent.top anchors.topMargin: 15 - color: "transparent" - Label { - id: callStackLabel - anchors.bottomMargin: 10 - horizontalAlignment: "AlignHCenter" - font.family: "Verdana" - font.pointSize: 8 - font.letterSpacing: 2 - width: parent.width - height: 15 - text: qsTr("callstack") - } + anchors.left: parent.left; + anchors.leftMargin: machineStates.sideMargin + anchors.right: parent.right; + anchors.rightMargin: machineStates.sideMargin + flow: GridLayout.TopToBottom + //columnSpacing: 7 + rowSpacing: 15 + RowLayout { + // step button + slider + spacing: 10 + height: 27 + width: debugPanel.width + RowLayout { + id: jumpButtons + spacing: 15 + width: 250 + height: parent.height + + StepActionImage + { + id: jumpoutbackaction; + source: "qrc:/qml/img/jumpoutback.png" + disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png" + onClicked: Debugger.stepOutBack() + } - ListView { - height: parent.height - 15 - width: 200 - anchors.top: callStackLabel.bottom - anchors.horizontalCenter: parent.horizontalCenter - id: levelList - delegate: Component { - Item { - Text { - font.family: "Verdana" - font.pointSize: 8 - text: modelData + StepActionImage + { + id: jumpintobackaction + source: "qrc:/qml/img/jumpintoback.png" + disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png" + onClicked: Debugger.stepIntoBack() + } + + StepActionImage + { + id: jumpoverbackaction + source: "qrc:/qml/img/jumpoverback.png" + disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png" + onClicked: Debugger.stepOverBack() + } + + StepActionImage + { + id: jumpoverforwardaction + source: "qrc:/qml/img/jumpoverforward.png" + disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png" + onClicked: Debugger.stepOverForward() + } + + StepActionImage + { + id: jumpintoforwardaction + source: "qrc:/qml/img/jumpintoforward.png" + disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png" + onClicked: Debugger.stepIntoForward() + } + + StepActionImage + { + id: jumpoutforwardaction + source: "qrc:/qml/img/jumpoutforward.png" + disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png" + onClicked: Debugger.stepOutForward() + } + } + + Rectangle { + color: "transparent" + width: 250 + height: parent.height + Slider { + id: statesSlider + anchors.fill: parent + tickmarksEnabled: true + stepSize: 1.0 + height: parent.height + onValueChanged: Debugger.jumpTo(value); + style: SliderStyle { + groove: Rectangle { + implicitHeight: 3 + color: "#7da4cd" + radius: 8 + } + handle: Rectangle { + anchors.centerIn: parent + color: control.pressed ? "white" : "lightgray" + border.color: "gray" + border.width: 2 + implicitWidth: 10 + implicitHeight: 10 + radius: 12 + } } } } } - } - } - Rectangle { - color: "transparent" - anchors.topMargin: 5 - anchors.bottomMargin: 10 - anchors.rightMargin: 10 - height: parent.height - 30 - width: parent.width * 0.5 - anchors.right: parent.right - anchors.top: headerInfo.bottom - anchors.bottom: parent.bottom + RowLayout { + // Assembly code + width: debugPanel.width + height: 400 + spacing: 10 - Rectangle { - id: debugStack - anchors.top: parent.top - width: parent.width - height: parent.height * 0.25 - color: "transparent" - Label { - horizontalAlignment: "AlignHCenter" - font.family: "Verdana" - font.pointSize: 8 - width: parent.width - height: 15 - anchors.top : parent.top - text: qsTr("debug stack") - } - TextArea { - anchors.bottom: parent.bottom - width: parent.width - font.family: "Verdana" - font.pointSize: 8 - height: parent.height - 15 - id: debugStackTxt - readOnly: true; + Rectangle + { + width: 170 + height: parent.height + border.width: 3 + border.color: "#deddd9" + color: "white" + + ListView { + anchors.fill: parent + anchors.topMargin: 3 + anchors.bottomMargin: 3 + clip: true + id: statesList + delegate: renderDelegate + highlight: highlightBar + highlightFollowsCurrentItem: true + } + + Component { + id: highlightBar + Rectangle { + height: statesList.currentItem.height + width: statesList.currentItem.width + color: "#4b8fe2" + Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } } + } + } + + Component { + id: renderDelegate + Item { + id: wrapperItem + height: 20 + width: parent.width + Text { + color: parent.ListView.isCurrentItem ? "white" : "black" + anchors.centerIn: parent + text: line + font.pointSize: 9 + } + } + } + } + + ColumnLayout { + width: 250 + height: parent.height + Rectangle { + // Info + width: parent.width + id: basicInfoColumn + height: 150 + color: "transparent" + DebugBasicInfo { + id: basicInfo + width: parent.width + height: parent.height + } + } + + Rectangle { + // Stack + height: 250 + width: parent.width + color: "transparent" + + Storage { + id: stack + width: parent.width + title : qsTr("Stack") + } + } + } } - } - Rectangle { - id: debugMemory - anchors.top: debugStack.bottom - width: parent.width - height: parent.height * 0.25 - color: "transparent" - Label { - horizontalAlignment: "AlignHCenter" - font.family: "Verdana" - font.pointSize: 8 - width: parent.width - height: 15 - anchors.top : parent.top - text: qsTr("debug memory") + Rectangle { + width: debugPanel.width - 2 * machineStates.sideMargin + height: 2; + color: "#e3e3e3" + radius: 3 } - TextArea { - anchors.bottom: parent.bottom - width: parent.width - font.family: "Verdana" - font.pointSize: 8 - height: parent.height - 15 - id: debugMemoryTxt - readOnly: true; + + Storage { + id: storage + width: debugPanel.width - 2 * machineStates.sideMargin + title : qsTr("Storage") } - } - Rectangle { - id: debugStorage - anchors.top: debugMemory.bottom - width: parent.width - height: parent.height * 0.25 - color: "transparent" - Label { - horizontalAlignment: "AlignHCenter" - font.family: "Verdana" - font.pointSize: 8 - width: parent.width - height: 15 - anchors.top : parent.top - text: qsTr("debug storage") + Rectangle { + width: debugPanel.width - 2 * machineStates.sideMargin + height: 2; + color: "#e3e3e3" + radius: 3 } - TextArea { - anchors.bottom: parent.bottom - width: parent.width - font.family: "Verdana" - font.pointSize: 8 - height: parent.height - 15 - id: debugStorageTxt - readOnly: true; + + Storage { + id: memoryDump + width: debugPanel.width - 2 * machineStates.sideMargin + title: qsTr("Memory Dump") } - } - Rectangle { - id: debugCallData - anchors.top: debugStorage.bottom - width: parent.width - height: parent.height * 0.25 - color: "transparent" - Label { - horizontalAlignment: "AlignHCenter" - font.family: "Verdana" - font.pointSize: 8 - width: parent.width - height: 15 - anchors.top : parent.top - text: qsTr("debug calldata") + Rectangle { + width: debugPanel.width - 2 * machineStates.sideMargin + height: 2; + color: "#e3e3e3" + radius: 3 } - TextArea { - anchors.bottom: parent.bottom - width: parent.width - height: parent.height - 15 - font.family: "Verdana" - font.pointSize: 8 - font.letterSpacing: 2 - id: debugCallDataTxt - readOnly: true; + + Storage { + id: callDataDump + width: debugPanel.width; + title: qsTr("Call data") } } } diff --git a/mix/qml/ImageButton.qml b/mix/qml/ImageButton.qml index 4c91ca022..206100c7b 100644 --- a/mix/qml/ImageButton.qml +++ b/mix/qml/ImageButton.qml @@ -2,118 +2,37 @@ import QtQuick 2.2 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.0 import QtQuick.Controls.Styles 1.1 -import CodeEditorExtensionManager 1.0 -Rectangle { +Item { + id: button - objectName: "mainContent" - signal keyPressed(variant event) - focus: true - Keys.enabled: true - Keys.onPressed: - { - root.keyPressed(event.key); - } - anchors.fill: parent - id: root + signal clicked + signal pressed + signal released - function ensureRightView() - { - if (!rightView.visible) - { - rightView.show(); - } - } + width: sprite.width + height: sprite.height - CodeEditorExtensionManager { - headerView: headerPaneTabs; - rightView: rightPaneTabs; - editor: codeEditor - } - GridLayout - { - anchors.fill: parent - rows: 2 - flow: GridLayout.TopToBottom - columnSpacing: 0 - rowSpacing: 0 - Rectangle { - Layout.row: 0 - Layout.fillWidth: true - Layout.preferredHeight: 50 - id: headerView - TabView { - id: headerPaneTabs - tabsVisible: false - antialiasing: true - anchors.fill: parent - style: TabViewStyle { - frameOverlap: 1 - tab: Rectangle {} - frame: Rectangle {} - } - } - } + MouseArea { + id: mouseArea + enabled: button.enabled + anchors.fill: button + hoverEnabled: true - SplitView { - resizing: false - Layout.row: 1 - orientation: Qt.Horizontal; - Layout.fillWidth: true - Layout.preferredHeight: root.height - headerView.height; - Rectangle { - id: editorRect; - height: parent.height; - width: parent.width; - TextArea { - id: codeEditor - anchors.fill: parent; - font.family: "Monospace" - font.pointSize: 12 - backgroundVisible: true; - textColor: "white" - tabChangesFocus: false - style: TextAreaStyle { - backgroundColor: "black" - } - Keys.onPressed: { - if (event.key === Qt.Key_Tab) { - codeEditor.insert(codeEditor.cursorPosition, "\t"); - event.accepted = true; - } - } - } - } - Rectangle { - visible: false; - id: rightView; - property real panelRelWidth: 0.38 - function show() { - visible = true; - editorRect.width = parent.width * (1 - 0.38) - codeEditor.focus = false; - rightPaneTabs.focus = true; - } - height: parent.height; - width: Layout.minimumWidth - Layout.minimumWidth: parent.width * 0.38 - Rectangle { - anchors.fill: parent; - id: rightPaneView - TabView { - id: rightPaneTabs - tabsVisible: false - antialiasing: true - anchors.fill: parent - style: TabViewStyle { - frameOverlap: 1 - tab: Rectangle {} - frame: Rectangle {} - } - } - } - } - } - } + onClicked: button.clicked() + onPressed: button.pressed() + onReleased: button.released() + } + + onClicked: { + } + + onPressed: { + opacity = 0.5 + } + + onReleased: { + opacity = 1.0 + } } diff --git a/mix/qml/MainContent.qml b/mix/qml/MainContent.qml index 8669f191e..398ea6f47 100644 --- a/mix/qml/MainContent.qml +++ b/mix/qml/MainContent.qml @@ -5,6 +5,7 @@ import QtQuick.Controls.Styles 1.1 import CodeEditorExtensionManager 1.0 Rectangle { + objectName: "mainContent" signal keyPressed(variant event) focus: true @@ -14,69 +15,118 @@ Rectangle { root.keyPressed(event.key); } anchors.fill: parent - height: parent.height - width: parent.width; - id:root + id: root + + function ensureRightView() + { + if (!rightView.visible) + { + rightView.show(); + } + } + + function hideRightView() + { + if (rightView.visible) + { + rightView.hide(); + } + } CodeEditorExtensionManager { - headerView: headerView; - rightView: rightView; + headerView: headerPaneTabs; + rightView: rightPaneTabs; editor: codeEditor } - Column { - anchors.fill: parent; - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter + GridLayout + { + anchors.fill: parent + rows: 2 + flow: GridLayout.TopToBottom + columnSpacing: 0 + rowSpacing: 0 Rectangle { + Layout.row: 0 + Layout.fillWidth: true + Layout.preferredHeight: 50 id: headerView - height: 50 - width: parent.width; + TabView { + id: headerPaneTabs + tabsVisible: false + antialiasing: true + anchors.fill: parent + style: TabViewStyle { + frameOverlap: 1 + tab: Rectangle {} + frame: Rectangle {} + } + } } - Row { - anchors.fill: parent; - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - SplitView { - orientation: Qt.Vertical; - anchors.fill: parent; - Rectangle { - id: editorRect; - height: parent.height; - width: parent.width /2; - TextArea { - id: codeEditor - height: parent.height - width: parent.width - font.family: "Monospace" - font.pointSize: 12 - anchors.centerIn: parent - tabChangesFocus: false - Keys.onPressed: { - if (event.key === Qt.Key_Tab) { - codeEditor.insert(codeEditor.cursorPosition, "\t"); - event.accepted = true; - } + + SplitView { + resizing: false + Layout.row: 1 + orientation: Qt.Horizontal; + Layout.fillWidth: true + Layout.preferredHeight: root.height - headerView.height; + Rectangle { + id: editorRect; + height: parent.height; + width: parent.width; + TextArea { + id: codeEditor + anchors.fill: parent; + font.family: "Monospace" + font.pointSize: 12 + backgroundVisible: true; + textColor: "white" + tabChangesFocus: false + style: TextAreaStyle { + backgroundColor: "black" + } + Keys.onPressed: { + if (event.key === Qt.Key_Tab) { + codeEditor.insert(codeEditor.cursorPosition, "\t"); + event.accepted = true; } - } + } + } + } + Rectangle { + + Keys.onEscapePressed: + { + hide(); + } + + visible: false; + id: rightView; + property real panelRelWidth: 0.38 + function show() { + visible = true; + editorRect.width = parent.width * (1 - 0.38) } + + function hide() { + visible = false; + editorRect.width = parent.width; + } + height: parent.height; + width: Layout.minimumWidth + Layout.minimumWidth: parent.width * 0.38 Rectangle { - id: rightView; - height: parent.height; - width: parent.width /2; - Rectangle { - id: debugWindow; - } - Rectangle { - anchors.right: parent.right - id: rightPaneView - width: parent.width * 0.2 - height: parent.height - Layout.minimumWidth: 20 - TabView { - id: rightPaneTabs - antialiasing: true - anchors.fill: parent + anchors.fill: parent; + id: rightPaneView + TabView { + id: rightPaneTabs + tabsVisible: false + antialiasing: true + anchors.fill: parent + style: TabViewStyle { + frameOverlap: 1 + tab: Rectangle {} + frame: Rectangle {} } } } diff --git a/mix/qml/StepActionImage.qml b/mix/qml/StepActionImage.qml index a4cae74ab..ec262b36e 100644 --- a/mix/qml/StepActionImage.qml +++ b/mix/qml/StepActionImage.qml @@ -3,93 +3,24 @@ import QtQuick.Controls 1.1 import QtQuick.Layouts 1.0 import QtQuick.Controls.Styles 1.1 -ColumnLayout { - property string title - property variant listModel; - height: 250 - - RowLayout { - - Image { - source: "qrc:/qml/img/jumpoverback.png" - width: 15 - sourceSize.width: 15 - id: storageImgArrow - - } - - Text { - anchors.left: storageImgArrow.right - color: "#8b8b8b" - text: title - id: storageListTitle - } - - MouseArea - { - anchors.fill: parent - onClicked: { - if (storageContainer.state == "collapsed") - storageContainer.state = ""; - else - storageContainer.state = "collapsed"; - } - } - } - - Rectangle +Image { + id: jumpintobackimg + property string disableStateImg + signal clicked + width: 15 + sourceSize.width: 15 + MouseArea { - Layout.fillWidth: true - states: [ - State { - name: "collapsed" - PropertyChanges { - target: storageContainer - height: 0 - opacity: 0 - visible: false - } - PropertyChanges { - target: storageContainer.parent - height: 20 - } - PropertyChanges { - target: storageList - height: 0 - opacity: 0 - visible: false - } - + anchors.fill: parent + onClicked: jumpintobackimg.clicked(); + } + states: [ + State { + name: "disabled" + PropertyChanges { + target: jumpintobackimg + source: disableStateImg } - ] - id: storageContainer - border.width: 3 - border.color: "#deddd9" - anchors.top: storageListTitle.bottom - height: 223 - anchors.topMargin: 5 - width: parent.width - ListView { - anchors.top: parent.top - anchors.left: parent.left - anchors.topMargin: 5 - anchors.leftMargin: 5 - width: parent.width - height: parent.height - id: storageList - model: listModel - delegate: - Component { - Item { - height: 20 - width: parent.width - Text { - color: "#8b8b8b" - text: modelData - font.pointSize: 9 - } - } - } } - } + ] } diff --git a/mix/qml/Storage.qml b/mix/qml/Storage.qml index f944a0f4d..b68f8bc12 100644 --- a/mix/qml/Storage.qml +++ b/mix/qml/Storage.qml @@ -3,96 +3,96 @@ import QtQuick.Controls 1.1 import QtQuick.Layouts 1.0 import QtQuick.Controls.Styles 1.1 - ColumnLayout { + property string title property variant listModel; - property string title; - height: 250 - //width: width //debugPanel.width - //anchors.left: machineStates.left - //anchors.right: machineStates.right - //anchors.leftMargin: machineStates.sideMargin - - RowLayout { + height: 20 Image { source: "qrc:/qml/img/jumpoverback.png" width: 15 sourceSize.width: 15 - id: imgArrow + id: storageImgArrow } Text { + anchors.left: storageImgArrow.right color: "#8b8b8b" text: title - id: listTitle + id: storageListTitle } MouseArea { anchors.fill: parent onClicked: { - if (listContainer.state === "collapsed") - listContainer.state = ""; + if (storageContainer.state == "collapsed") + storageContainer.state = ""; else - listContainer.state = "collapsed"; + storageContainer.state = "collapsed"; } } } - Rectangle + RowLayout { - Layout.fillWidth: true - states: [ - State { - name: "collapsed" - PropertyChanges { - target: listContainer - height: 0 - opacity: 0 - visible: false - } - PropertyChanges { - target: listContainer.parent - height: 20 + Rectangle + { + border.width: 3 + border.color: "#deddd9" + height: 223; + Layout.fillWidth: true + transitions: [ + Transition { + NumberAnimation { target: storageContainer; property: "visible"; duration: 400 } + NumberAnimation { target: storageContainer; property: "height"; duration: 400 } } - PropertyChanges { - target: dumpList - height: 0 - opacity: 0 - visible: false + ] + states: [ + State { + name: "collapsed" + PropertyChanges { + target: storageContainer + height: 0 + //opacity: 0 + visible: false + } + PropertyChanges { + target: storageContainer.parent + height: 20 + } } + ] + id: storageContainer + + anchors.top: storageListTitle.bottom - } - ] - id: listContainer - border.width: 3 - border.color: "#deddd9" - anchors.top: listTitle.bottom - height: 223 - anchors.topMargin: 5 - width: parent.width - ListView { - anchors.top: parent.top - anchors.left: parent.left anchors.topMargin: 5 - anchors.leftMargin: 5 width: parent.width - height: parent.height - id: dumpList - delegate: Component { - Item { - height: 20 - width: parent.width - Text { - color: "#8b8b8b" - text: modelData - font.pointSize: 9 - } - } - } + ListView { + anchors.top: parent.top + anchors.left: parent.left + anchors.topMargin: 5 + anchors.leftMargin: 5 + width: parent.width + height: parent.height + id: storageList + model: listModel + delegate: + Component { + Item { + height: 20 + width: parent.width + Text { + color: "#8b8b8b" + text: modelData + font.pointSize: 9 + } + } + } + } } } } diff --git a/mix/qml/js/Debugger.js b/mix/qml/js/Debugger.js index d516abde6..6ebec2299 100644 --- a/mix/qml/js/Debugger.js +++ b/mix/qml/js/Debugger.js @@ -4,11 +4,20 @@ //statesList => ListView var currentSelectedState = null; +var jumpStartingPoint = null; function init() { + statesSlider.maximumValue = debugStates.length - 1; + statesList.model = humanReadableExecutionCode; currentSelectedState = 0; select(currentSelectedState); - displayReturnValue(); + //displayReturnValue(); + + jumpoutbackaction.state = "disabled"; + jumpintobackaction.state = "disabled"; + jumpintoforwardaction.state = "disabled" + jumpoutforwardaction.state = "disabled" + } function moveSelection(incr) @@ -21,20 +30,37 @@ function moveSelection(incr) } else { - endOfDebug(); + //endOfDebug(); } + statesSlider.value = currentSelectedState; } } function select(stateIndex) { + var codeLine = codeStr(stateIndex); var state = debugStates[stateIndex]; - var codeStr = bytesCodeMapping.getValue(state.curPC); - highlightSelection(codeStr); + highlightSelection(codeLine); currentSelectedState = stateIndex; completeCtxInformation(state); - levelList.model = state.levels; - levelList.update(); + //levelList.model = state.levels; + //levelList.update(); + + if (state.instruction === "JUMP") + jumpintoforwardaction.state = ""; + else + jumpintoforwardaction.state = "disabled"; + + if (state.instruction === "JUMPDEST") + jumpintobackaction.state = ""; + else + jumpintobackaction.state = "disabled"; +} + +function codeStr(stateIndex) +{ + var state = debugStates[stateIndex]; + return bytesCodeMapping.getValue(state.curPC); } function highlightSelection(index) @@ -44,11 +70,15 @@ function highlightSelection(index) function completeCtxInformation(state) { - debugStackTxt.text = state.debugStack; - debugStorageTxt.text = state.debugStorage; - debugMemoryTxt.text = state.debugMemory; - debugCallDataTxt.text = state.debugCallData; - headerInfoLabel.text = state.headerInfo + basicInfo.currentStep = state.step; + basicInfo.mem = state.newMemSize + " " + qsTr("words"); + basicInfo.stepCost = state.gasCost; + basicInfo.gasSpent = debugStates[0].gas - state.gas; + // This is available in all editors. + stack.listModel = state.debugStack; + storage.listModel = state.debugStorage; + memoryDump.listModel = state.debugMemory; + callDataDump.listModel = state.debugCallData; } function endOfDebug() @@ -66,3 +96,86 @@ function displayReturnValue() headerReturnList.model = contractCallReturnParameters; headerReturnList.update(); } + +function stepOutBack() +{ + if (jumpStartingPoint != null) + { + select(jumpStartingPoint); + jumpStartingPoint = null; + jumpoutbackaction.state = "disabled"; + jumpoutforwardaction.state = "disabled"; + } +} + +function stepIntoBack() +{ + moveSelection(-1); +} + +function stepOverBack() +{ + var state = debugStates[currentSelectedState]; + if (state.instruction === "JUMPDEST") + { + for (var k = currentSelectedState; k > 0; k--) + { + var line = bytesCodeMapping.getValue(debugStates[k].curPC); + if (line === statesList.currentIndex - 2) + { + select(k); + break; + } + } + } + else + moveSelection(-1); +} + +function stepOverForward() +{ + var state = debugStates[currentSelectedState]; + if (state.instruction === "JUMP") + { + for (var k = currentSelectedState; k < debugStates.length; k++) + { + var line = bytesCodeMapping.getValue(debugStates[k].curPC); + if (line === statesList.currentIndex + 2) + { + select(k); + break; + } + } + } + else + moveSelection(1); +} + +function stepIntoForward() +{ + var state = debugStates[currentSelectedState]; + if (state.instruction === "JUMP") + { + jumpStartingPoint = currentSelectedState; + moveSelection(1); + jumpoutbackaction.state = ""; + jumpoutforwardaction.state = ""; + } +} + +function stepOutForward() +{ + if (jumpStartingPoint != null) + { + stepOutBack(); + stepOverForward(); + jumpoutbackaction.state = "disabled"; + jumpoutforwardaction.state = "disabled"; + } +} + +function jumpTo(value) +{ + currentSelectedState = value; + select(currentSelectedState); +} diff --git a/mix/qml/js/ErrorLocationFormater.js b/mix/qml/js/ErrorLocationFormater.js index 6ebec2299..8c83e6b15 100644 --- a/mix/qml/js/ErrorLocationFormater.js +++ b/mix/qml/js/ErrorLocationFormater.js @@ -1,181 +1,27 @@ -//humanReadableExecutionCode => contain human readable code. -//debugStates => contain all debug states. -//bytesCodeMapping => mapping between humanReadableExecutionCode and bytesCode. -//statesList => ListView - -var currentSelectedState = null; -var jumpStartingPoint = null; -function init() -{ - statesSlider.maximumValue = debugStates.length - 1; - statesList.model = humanReadableExecutionCode; - currentSelectedState = 0; - select(currentSelectedState); - //displayReturnValue(); - - jumpoutbackaction.state = "disabled"; - jumpintobackaction.state = "disabled"; - jumpintoforwardaction.state = "disabled" - jumpoutforwardaction.state = "disabled" - -} - -function moveSelection(incr) -{ - if (currentSelectedState + incr >= 0) - { - if (currentSelectedState + incr < debugStates.length) - { - select(currentSelectedState + incr); - } - else - { - //endOfDebug(); - } - statesSlider.value = currentSelectedState; - } -} - -function select(stateIndex) -{ - var codeLine = codeStr(stateIndex); - var state = debugStates[stateIndex]; - highlightSelection(codeLine); - currentSelectedState = stateIndex; - completeCtxInformation(state); - //levelList.model = state.levels; - //levelList.update(); - - if (state.instruction === "JUMP") - jumpintoforwardaction.state = ""; - else - jumpintoforwardaction.state = "disabled"; - - if (state.instruction === "JUMPDEST") - jumpintobackaction.state = ""; - else - jumpintobackaction.state = "disabled"; -} - -function codeStr(stateIndex) -{ - var state = debugStates[stateIndex]; - return bytesCodeMapping.getValue(state.curPC); -} - -function highlightSelection(index) -{ - statesList.currentIndex = index; -} - -function completeCtxInformation(state) -{ - basicInfo.currentStep = state.step; - basicInfo.mem = state.newMemSize + " " + qsTr("words"); - basicInfo.stepCost = state.gasCost; - basicInfo.gasSpent = debugStates[0].gas - state.gas; - // This is available in all editors. - stack.listModel = state.debugStack; - storage.listModel = state.debugStorage; - memoryDump.listModel = state.debugMemory; - callDataDump.listModel = state.debugCallData; -} - -function endOfDebug() +function formatLocation(raw, shortMessage) { - var state = debugStates[debugStates.length - 1]; - debugStorageTxt.text = ""; - debugCallDataTxt.text = ""; - debugStackTxt.text = ""; - debugMemoryTxt.text = state.endOfDebug; - headerInfoLabel.text = "EXIT | GAS: " + state.gasLeft; -} - -function displayReturnValue() -{ - headerReturnList.model = contractCallReturnParameters; - headerReturnList.update(); -} - -function stepOutBack() -{ - if (jumpStartingPoint != null) - { - select(jumpStartingPoint); - jumpStartingPoint = null; - jumpoutbackaction.state = "disabled"; - jumpoutforwardaction.state = "disabled"; - } -} - -function stepIntoBack() -{ - moveSelection(-1); -} - -function stepOverBack() -{ - var state = debugStates[currentSelectedState]; - if (state.instruction === "JUMPDEST") - { - for (var k = currentSelectedState; k > 0; k--) - { - var line = bytesCodeMapping.getValue(debugStates[k].curPC); - if (line === statesList.currentIndex - 2) - { - select(k); - break; - } - } - } + var splitted = raw.split(':'); + if (!shortMessage) + return qsTr("Error in line ") + splitted[1] + ", " + qsTr("character ") + splitted[2]; else - moveSelection(-1); + return "L" + splitted[1] + "," + "C" + splitted[2]; } -function stepOverForward() +function extractErrorInfo(raw, shortMessage) { - var state = debugStates[currentSelectedState]; - if (state.instruction === "JUMP") + var _return = {}; + var detail = raw.split('\n')[0]; + var reg = detail.match(/:\d+:\d+:/g); + if (reg !== null) { - for (var k = currentSelectedState; k < debugStates.length; k++) - { - var line = bytesCodeMapping.getValue(debugStates[k].curPC); - if (line === statesList.currentIndex + 2) - { - select(k); - break; - } - } + _return.errorLocation = ErrorLocationFormater.formatLocation(reg[0], shortMessage); + _return.errorDetail = detail.replace(reg[0], ""); } else - moveSelection(1); -} - -function stepIntoForward() -{ - var state = debugStates[currentSelectedState]; - if (state.instruction === "JUMP") { - jumpStartingPoint = currentSelectedState; - moveSelection(1); - jumpoutbackaction.state = ""; - jumpoutforwardaction.state = ""; + _return.errorLocation = ""; + _return.errorDetail = detail; } -} - -function stepOutForward() -{ - if (jumpStartingPoint != null) - { - stepOutBack(); - stepOverForward(); - jumpoutbackaction.state = "disabled"; - jumpoutforwardaction.state = "disabled"; - } -} - -function jumpTo(value) -{ - currentSelectedState = value; - select(currentSelectedState); + _return.errorLine = raw.split('\n')[1]; + return _return; } diff --git a/mix/qml/js/main.js b/mix/qml/js/main.js index d516abde6..e69de29bb 100644 --- a/mix/qml/js/main.js +++ b/mix/qml/js/main.js @@ -1,68 +0,0 @@ -//humanReadableExecutionCode => contain human readable code. -//debugStates => contain all debug states. -//bytesCodeMapping => mapping between humanReadableExecutionCode and bytesCode. -//statesList => ListView - -var currentSelectedState = null; -function init() -{ - currentSelectedState = 0; - select(currentSelectedState); - displayReturnValue(); -} - -function moveSelection(incr) -{ - if (currentSelectedState + incr >= 0) - { - if (currentSelectedState + incr < debugStates.length) - { - select(currentSelectedState + incr); - } - else - { - endOfDebug(); - } - } -} - -function select(stateIndex) -{ - var state = debugStates[stateIndex]; - var codeStr = bytesCodeMapping.getValue(state.curPC); - highlightSelection(codeStr); - currentSelectedState = stateIndex; - completeCtxInformation(state); - levelList.model = state.levels; - levelList.update(); -} - -function highlightSelection(index) -{ - statesList.currentIndex = index; -} - -function completeCtxInformation(state) -{ - debugStackTxt.text = state.debugStack; - debugStorageTxt.text = state.debugStorage; - debugMemoryTxt.text = state.debugMemory; - debugCallDataTxt.text = state.debugCallData; - headerInfoLabel.text = state.headerInfo -} - -function endOfDebug() -{ - var state = debugStates[debugStates.length - 1]; - debugStorageTxt.text = ""; - debugCallDataTxt.text = ""; - debugStackTxt.text = ""; - debugMemoryTxt.text = state.endOfDebug; - headerInfoLabel.text = "EXIT | GAS: " + state.gasLeft; -} - -function displayReturnValue() -{ - headerReturnList.model = contractCallReturnParameters; - headerReturnList.update(); -} diff --git a/mix/qml/main.qml b/mix/qml/main.qml index e44144f61..9aac44c45 100644 --- a/mix/qml/main.qml +++ b/mix/qml/main.qml @@ -15,7 +15,7 @@ ApplicationWindow { minimumHeight: 300 title: qsTr("mix") - menuBar: MenuBar { + /*menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { @@ -28,15 +28,19 @@ ApplicationWindow { MenuItem { action: debugRunAction } MenuItem { action: debugResetStateAction } } - } + }*/ + Component.onCompleted: { setX(Screen.width / 2 - width / 2); setY(Screen.height / 2 - height / 2); } MainContent { + id: mainContent; + anchors.fill: parent } + ModalDialog { objectName: "dialog" id: dialog @@ -51,7 +55,10 @@ ApplicationWindow { id: debugRunAction text: "&Run" shortcut: "F5" - onTriggered: debugModel.debugDeployment(); + onTriggered: { + mainContent.ensureRightView(); + debugModel.debugDeployment(); + } } Action { From 286ba769e835657071b306fe9d63e6052fb92ebd Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 8 Jan 2015 19:08:11 +0100 Subject: [PATCH 03/12] ui redesign --- mix/qml/main.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mix/qml/main.qml b/mix/qml/main.qml index 85a7a1ec1..65eae4788 100644 --- a/mix/qml/main.qml +++ b/mix/qml/main.qml @@ -15,7 +15,7 @@ ApplicationWindow { minimumHeight: 300 title: qsTr("mix") - /*menuBar: MenuBar { + menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { @@ -28,7 +28,7 @@ ApplicationWindow { MenuItem { action: debugRunAction } MenuItem { action: debugResetStateAction } } - }*/ + } Component.onCompleted: { setX(Screen.width / 2 - width / 2); From 4bc3d48ab4dcba5b654013af74d017a2d0f0969e Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 12 Jan 2015 13:55:52 +0100 Subject: [PATCH 04/12] - debug pane design --- libdevcore/CommonIO.cpp | 6 +- libdevcore/CommonIO.h | 2 +- mix/AssemblyDebuggerControl.cpp | 14 +- mix/AssemblyDebuggerControl.h | 7 +- mix/CodeEditorExtensionManager.cpp | 6 +- mix/CodeModel.cpp | 2 +- mix/ConstantCompilationControl.cpp | 16 -- mix/ConstantCompilationControl.h | 1 - mix/DebuggingStateWrapper.cpp | 25 ++- mix/DebuggingStateWrapper.h | 9 +- mix/qml.qrc | 9 +- mix/qml/CompilationStatus.qml | 21 ++- mix/qml/DataDump.qml | 90 ----------- mix/qml/Debugger.qml | 193 +++++++++++++++++++++--- mix/qml/ImageButton.qml | 38 ----- mix/qml/ItemDelegateDataDump.qml | 68 +++++++++ mix/qml/MainContent.qml | 114 ++++++++++++-- mix/qml/StateList.qml | 7 +- mix/qml/StepActionImage.qml | 45 ++++-- mix/qml/Storage.qml | 98 ------------ mix/qml/img/bugiconactive.png | Bin 0 -> 1194 bytes mix/qml/img/bugiconinactive.png | Bin 0 -> 1084 bytes mix/qml/img/closedtriangleindicator.png | Bin 0 -> 422 bytes mix/qml/img/opentriangleindicator.png | Bin 0 -> 425 bytes mix/qml/js/Debugger.js | 4 + mix/qml/main.qml | 12 +- 26 files changed, 447 insertions(+), 340 deletions(-) delete mode 100644 mix/qml/DataDump.qml delete mode 100644 mix/qml/ImageButton.qml create mode 100644 mix/qml/ItemDelegateDataDump.qml delete mode 100644 mix/qml/Storage.qml create mode 100644 mix/qml/img/bugiconactive.png create mode 100644 mix/qml/img/bugiconinactive.png create mode 100644 mix/qml/img/closedtriangleindicator.png create mode 100644 mix/qml/img/opentriangleindicator.png diff --git a/libdevcore/CommonIO.cpp b/libdevcore/CommonIO.cpp index ec8ca605c..366601a27 100644 --- a/libdevcore/CommonIO.cpp +++ b/libdevcore/CommonIO.cpp @@ -26,14 +26,14 @@ using namespace std; using namespace dev; -string dev::memDump(bytes const& _b, unsigned _w, bool _html) +string dev::memDump(bytes const& _b, unsigned _w, bool _html, string _separator) { stringstream ret; if (_html) ret << "
";
 	for (unsigned i = 0; i < _b.size(); i += _w)
 	{
-		ret << hex << setw(4) << setfill('0') << i << " ";
+		ret << hex << setw(4) << setfill('0') << i << _separator;
 		for (unsigned j = i; j < i + _w; ++j)
 			if (j < _b.size())
 				if (_b[j] >= 32 && _b[j] < 127)
@@ -47,7 +47,7 @@ string dev::memDump(bytes const& _b, unsigned _w, bool _html)
 					ret << '?';
 			else
 				ret << ' ';
-		ret << " ";
+		ret << _separator;
 		for (unsigned j = i; j < i + _w && j < _b.size(); ++j)
 			ret << setfill('0') << setw(2) << hex << (unsigned)_b[j] << " ";
 		ret << "\n";
diff --git a/libdevcore/CommonIO.h b/libdevcore/CommonIO.h
index 11422db9a..faf8e0886 100644
--- a/libdevcore/CommonIO.h
+++ b/libdevcore/CommonIO.h
@@ -47,7 +47,7 @@ bytes contents(std::string const& _file);
 void writeFile(std::string const& _file, bytes const& _data);
 
 /// Nicely renders the given bytes to a string, optionally as HTML.
-std::string memDump(bytes const& _b, unsigned _w = 8, bool _html = false);
+std::string memDump(bytes const& _b, unsigned _w = 8, bool _html = false, std::string _separator = " ");
 
 // Stream I/O functions.
 // Provides templated stream I/O for all STL collections so they can be shifted on to any iostream-like interface.
diff --git a/mix/AssemblyDebuggerControl.cpp b/mix/AssemblyDebuggerControl.cpp
index e9d240e11..4c0fdda0c 100644
--- a/mix/AssemblyDebuggerControl.cpp
+++ b/mix/AssemblyDebuggerControl.cpp
@@ -51,7 +51,7 @@ QString toQString(dev::u256 _value)
 }
 
 AssemblyDebuggerControl::AssemblyDebuggerControl(AppContext* _context):
-	Extension(_context, ExtensionDisplayBehavior::ModalDialog), m_running(false)
+	Extension(_context, ExtensionDisplayBehavior::RightView), m_running(false)
 {
 	qRegisterMetaType("QVariableDefinition*");
 	qRegisterMetaType("QVariableDefinitionList*");
@@ -82,7 +82,7 @@ void AssemblyDebuggerControl::start() const
 
 void AssemblyDebuggerControl::debugDeployment()
 {
-	executeSequence(std::vector(), 0);
+	executeSequence(std::vector(), 10000000 * ether);
 }
 
 void AssemblyDebuggerControl::debugState(QVariantMap _state)
@@ -166,7 +166,7 @@ void AssemblyDebuggerControl::executeSequence(std::vector c
 			for (unsigned i = 0; i < _sequence.size(); ++i)
 				debuggingContent = m_modelDebugger->callContract(address, transactonData.at(i), _sequence.at(i));
 
-			if (f)
+			if (f && (_sequence.size() > 0))
 				debuggingContent.returnParameters = c.decode(f->returnParameters(), debuggingContent.returnValue);
 
 			//we need to wrap states in a QObject before sending to QML.
@@ -186,7 +186,6 @@ void AssemblyDebuggerControl::executeSequence(std::vector c
 		{
 			emit runFailed(QString::fromStdString(boost::current_exception_diagnostic_information()));
 		}
-
 		catch(std::exception const& e)
 		{
 			emit runFailed(e.what());
@@ -198,15 +197,18 @@ void AssemblyDebuggerControl::executeSequence(std::vector c
 
 void AssemblyDebuggerControl::showDebugger(QList const& _returnParam, QList const& _wStates, AssemblyDebuggerData const& _code)
 {
-	Q_UNUSED(_reason);
 	m_appEngine->rootContext()->setContextProperty("debugStates", QVariant::fromValue(_wStates));
 	m_appEngine->rootContext()->setContextProperty("humanReadableExecutionCode", QVariant::fromValue(std::get<0>(_code)));
 	m_appEngine->rootContext()->setContextProperty("bytesCodeMapping", QVariant::fromValue(std::get<1>(_code)));
 	m_appEngine->rootContext()->setContextProperty("contractCallReturnParameters", QVariant::fromValue(new QVariableDefinitionList(_returnParam)));
+	updateDebugPanel();
+}
+
+void AssemblyDebuggerControl::updateDebugPanel()
+{
 	QVariant returnValue;
 	QObject* debugPanel = m_view->findChild("debugPanel", Qt::FindChildrenRecursively);
 	QMetaObject::invokeMethod(debugPanel, "init", Q_RETURN_ARG(QVariant, returnValue));
-
 }
 
 void AssemblyDebuggerControl::showDebugError(QString const& _error)
diff --git a/mix/AssemblyDebuggerControl.h b/mix/AssemblyDebuggerControl.h
index b4dff38f5..fdfa94cde 100644
--- a/mix/AssemblyDebuggerControl.h
+++ b/mix/AssemblyDebuggerControl.h
@@ -42,6 +42,7 @@ namespace mix
 class AssemblyDebuggerControl: public Extension
 {
 	Q_OBJECT
+	Q_PROPERTY(bool running MEMBER m_running NOTIFY stateChanged)
 
 public:
 	AssemblyDebuggerControl(AppContext* _context);
@@ -49,8 +50,8 @@ public:
 	void start() const override;
 	QString title() const override;
 	QString contentUrl() const override;
-
-	Q_PROPERTY(bool running MEMBER m_running NOTIFY stateChanged)
+	/// Display without managing machine states result. Displayed in the right side tab.
+	Q_INVOKABLE void updateDebugPanel();
 
 private:
 	void executeSequence(std::vector const& _sequence, u256 _balance);
@@ -66,7 +67,7 @@ public slots:
 	void debugState(QVariantMap _state);
 
 private slots:
-	/// Update UI with machine states result. Display a modal dialog.
+	/// Update UI with machine states result. Displayed in the right side tab.
 	void showDebugger(QList const& _returnParams = QList(), QList const& _wStates = QList(), AssemblyDebuggerData const& _code = AssemblyDebuggerData());
 	/// Update UI with transaction run error.
 	void showDebugError(QString const& _error);
diff --git a/mix/CodeEditorExtensionManager.cpp b/mix/CodeEditorExtensionManager.cpp
index 9976f3b6c..ae6cfec87 100644
--- a/mix/CodeEditorExtensionManager.cpp
+++ b/mix/CodeEditorExtensionManager.cpp
@@ -68,7 +68,7 @@ void CodeEditorExtensionManager::initExtensions()
 	std::shared_ptr debug = std::make_shared(m_appContext);
 	std::shared_ptr stateList = std::make_shared(m_appContext);
 	QObject::connect(m_doc, &QTextDocument::contentsChange, this, &CodeEditorExtensionManager::onCodeChange);
-	QObject::connect(debug.get(), &AssemblyDebuggerControl::runFailed, output.get(), &ConstantCompilationControl::displayError);
+	//QObject::connect(debug.get(), &AssemblyDebuggerControl::runFailed, output.get(), &ConstantCompilationControl::displayError);
 	QObject::connect(m_appContext->codeModel(), &CodeModel::compilationComplete, this, &CodeEditorExtensionManager::applyCodeHighlight);
 
 	initExtension(output);
@@ -123,9 +123,9 @@ void CodeEditorExtensionManager::applyCodeHighlight()
 	m_appContext->codeModel()->updateFormatting(m_doc);
 }
 
-void CodeEditorExtensionManager::setRightTabView(QQuickItem* _tabView)
+void CodeEditorExtensionManager::setRightView(QQuickItem* _rightView)
 {
-	m_rightView = _tabView;
+	m_rightView = _rightView;
 }
 
 void CodeEditorExtensionManager::setHeaderView(QQuickItem* _headerView)
diff --git a/mix/CodeModel.cpp b/mix/CodeModel.cpp
index dc2fedd58..35fe3440a 100644
--- a/mix/CodeModel.cpp
+++ b/mix/CodeModel.cpp
@@ -168,7 +168,7 @@ void CodeModel::onCompilationComplete(CompilationResult*_newResult)
 
 bool CodeModel::hasContract() const
 {
-	return m_result->contract()->functionsList().size() > 0;
+	return m_result->successfull();
 }
 
 void CodeModel::updateFormatting(QTextDocument* _document)
diff --git a/mix/ConstantCompilationControl.cpp b/mix/ConstantCompilationControl.cpp
index 7b3d1cd4b..c4f365238 100644
--- a/mix/ConstantCompilationControl.cpp
+++ b/mix/ConstantCompilationControl.cpp
@@ -64,19 +64,3 @@ void ConstantCompilationControl::update()
 	QObject* ctrl = m_view->findChild("constantCompilationStatus", Qt::FindChildrenRecursively);
 	QMetaObject::invokeMethod(ctrl, "update");
 }
-
-void ConstantCompilationControl::resetOutPut()
-{
-	QObject* status = m_view->findChild("status", Qt::FindChildrenRecursively);
-	status->setProperty("text", "");
-}
-
-
-void ConstantCompilationControl::displayError(QString const& _error)
-{
-	QObject* status = m_view->findChild("status", Qt::FindChildrenRecursively);
-	QObject* content = m_view->findChild("content", Qt::FindChildrenRecursively);
-	status->setProperty("text", "failure");
-	status->setProperty("color", "red");
-	content->setProperty("text", _error);
-}
diff --git a/mix/ConstantCompilationControl.h b/mix/ConstantCompilationControl.h
index 112ef7362..8acde4f09 100644
--- a/mix/ConstantCompilationControl.h
+++ b/mix/ConstantCompilationControl.h
@@ -48,7 +48,6 @@ private:
 
 public slots:
 	void update();
-	void displayError(QString const& _error);
 };
 
 }
diff --git a/mix/DebuggingStateWrapper.cpp b/mix/DebuggingStateWrapper.cpp
index 95e7991ed..f12a0b9ef 100644
--- a/mix/DebuggingStateWrapper.cpp
+++ b/mix/DebuggingStateWrapper.cpp
@@ -93,7 +93,7 @@ QStringList DebuggingStateWrapper::debugStack()
 	for (auto i: m_state.stack)
 		stack.append(QString::fromStdString(prettyU256(i)));
 
-	return stack;
+	return fillList(stack, "");
 }
 
 QStringList DebuggingStateWrapper::debugStorage()
@@ -105,17 +105,30 @@ QStringList DebuggingStateWrapper::debugStorage()
 		s << "@" << prettyU256(i.first) << " " << prettyU256(i.second);
 		storage.append(QString::fromStdString(s.str()));
 	}
-	return storage;
+	return fillList(storage, "@- -");
 }
 
-QString DebuggingStateWrapper::debugMemory()
+QStringList DebuggingStateWrapper::debugMemory()
 {
-	return QString::fromStdString(memDump(m_state.memory, 16, false));
+	QStringList re = QString::fromStdString(memDump(m_state.memory, 16, false, "_separator_")).split('\n');
+	return fillList(re, " ");
 }
 
-QString DebuggingStateWrapper::debugCallData()
+QStringList DebuggingStateWrapper::debugCallData()
 {
-	return QString::fromStdString(memDump(m_data, 16, false));
+	qDebug() << QString::fromStdString(memDump(m_data, 16, false, "_separator_"));
+	QStringList re = QString::fromStdString(memDump(m_data, 16, false, "_separator_")).split('\n');
+	return fillList(re, " ");
+}
+
+QStringList DebuggingStateWrapper::fillList(QStringList _list, QString _emptyValue)
+{
+	if (_list.size() < 20)
+	{
+		for (int k = _list.size(); k < 20 - _list.size(); k++)
+			_list.append(_emptyValue);
+	}
+	return _list;
 }
 
 QStringList DebuggingStateWrapper::levels()
diff --git a/mix/DebuggingStateWrapper.h b/mix/DebuggingStateWrapper.h
index 902986570..76795f132 100644
--- a/mix/DebuggingStateWrapper.h
+++ b/mix/DebuggingStateWrapper.h
@@ -118,8 +118,8 @@ class DebuggingStateWrapper: public QObject
 	Q_PROPERTY(QString instruction READ instruction CONSTANT)
 	Q_PROPERTY(QStringList debugStack READ debugStack CONSTANT)
 	Q_PROPERTY(QStringList debugStorage READ debugStorage CONSTANT)
-	Q_PROPERTY(QString debugMemory READ debugMemory CONSTANT)
-	Q_PROPERTY(QString debugCallData READ debugCallData CONSTANT)
+	Q_PROPERTY(QStringList debugMemory READ debugMemory CONSTANT)
+	Q_PROPERTY(QStringList debugCallData READ debugCallData CONSTANT)
 	Q_PROPERTY(QString headerInfo READ headerInfo CONSTANT)
 	Q_PROPERTY(QString endOfDebug READ endOfDebug CONSTANT)
 	Q_PROPERTY(QString newMemSize READ newMemSize CONSTANT)
@@ -142,9 +142,9 @@ public:
 	/// Get storage.
 	QStringList debugStorage();
 	/// Get memory.
-	QString debugMemory();
+	QStringList debugMemory();
 	/// Get call data.
-	QString debugCallData();
+	QStringList debugCallData();
 	/// Get info to be displayed in the header.
 	QString headerInfo();
 	/// get end of debug information.
@@ -166,6 +166,7 @@ private:
 	DebuggingState m_state;
 	bytes m_code;
 	bytes m_data;
+	QStringList fillList(QStringList _list, QString _emptyValue);
 };
 
 }
diff --git a/mix/qml.qrc b/mix/qml.qrc
index f39442cef..0d0314785 100644
--- a/mix/qml.qrc
+++ b/mix/qml.qrc
@@ -20,9 +20,6 @@
         qml/img/jumpoutforward.png
         qml/img/jumpoverback.png
         qml/img/jumpoverforward.png
-        qml/ImageButton.qml
-        qml/DataDump.qml
-        qml/Storage.qml
         qml/StepActionImage.qml
         qml/img/jumpintobackdisabled.png
         qml/img/jumpintoforwarddisabled.png
@@ -31,5 +28,11 @@
         qml/img/jumpoverbackdisabled.png
         qml/DebugBasicInfo.qml
         qml/js/ErrorLocationFormater.js
+        qml/img/closedtriangleindicator.png
+        qml/img/opentriangleindicator.png
+        qml/img/bugiconactive.png
+        qml/img/bugiconinactive.png
+        qml/DebugInfoList.qml
+        qml/ItemDelegateDataDump.qml
     
 
diff --git a/mix/qml/CompilationStatus.qml b/mix/qml/CompilationStatus.qml
index 424e4a3dd..da77e70cd 100644
--- a/mix/qml/CompilationStatus.qml
+++ b/mix/qml/CompilationStatus.qml
@@ -1,5 +1,6 @@
 import QtQuick 2.2
 import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.1
 import "js/ErrorLocationFormater.js" as ErrorLocationFormater
 
 Rectangle {
@@ -23,22 +24,17 @@ Rectangle {
 			logslink.visible = true;
 		}
 	}
-
+	color: "transparent"
 	anchors.fill: parent
-	gradient: Gradient {
-		GradientStop { position: 0.0; color: "#f1f1f1" }
-		GradientStop { position: 1.0; color: "#d9d7da" }
-	}
 	Rectangle {
+		id: statusContainer
 		anchors.horizontalCenter: parent.horizontalCenter
 		anchors.verticalCenter: parent.verticalCenter
-		anchors.topMargin: 10
-		anchors.bottomMargin: 10
 		radius: 3
 		width: 500
 		height: 30
-		color: "#fffcd5"
-		Row {
+		color: "#fcfbfc"
+		RowLayout {
 			anchors.horizontalCenter: parent.horizontalCenter
 			anchors.verticalCenter: parent.verticalCenter
 			spacing: 5
@@ -53,6 +49,10 @@ Rectangle {
 							target: image
 							source: "qrc:/qml/img/compilfailed.png"
 						}
+						PropertyChanges {
+							target: statusContainer
+							color: "#fffcd5"
+						}
 					}
 				]
 			}
@@ -75,7 +75,6 @@ Rectangle {
 			}
 
 			Text {
-
 				visible: false
 				font.pointSize: 9
 				height: 9
@@ -88,7 +87,7 @@ Rectangle {
 					anchors.fill: parent
 					onClicked: {
 						mainContent.ensureRightView();
-						debugModel.debugDeployment();
+						debugModel.updateDebugPanel();
 					}
 				}
 			}
diff --git a/mix/qml/DataDump.qml b/mix/qml/DataDump.qml
deleted file mode 100644
index 85732fbca..000000000
--- a/mix/qml/DataDump.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-import QtQuick 2.2
-import QtQuick.Controls 1.1
-import QtQuick.Layouts 1.0
-import QtQuick.Controls.Styles 1.1
-
-
-ColumnLayout {
-	property variant content;
-	property string title;
-	height: 250
-
-	RowLayout {
-
-		Image {
-			source: "qrc:/qml/img/jumpoverback.png"
-			width: 15
-			sourceSize.width: 15
-			id: imgArrow
-		}
-
-		Text {
-			color: "#8b8b8b"
-			text: title
-			id: listTitle
-		}
-
-		MouseArea
-		{
-			anchors.fill: parent
-			onClicked: {
-				if (listContainer.state === "collapsed")
-					listContainer.state = "";
-				else
-					listContainer.state = "collapsed";
-			}
-		}
-	}
-
-	Rectangle
-	{
-		Layout.fillWidth: true
-		transitions: [
-			Transition {
-				NumberAnimation { target: listContainer; property: "opacity"; duration: 400 }
-				NumberAnimation { target: listContainer; property: "height"; duration: 400 }
-				NumberAnimation { target: listContainer.parent; property: "height"; duration: 400 }
-				NumberAnimation { target: dumpList; property: "opacity"; duration: 400 }
-				NumberAnimation { target: dumpList; property: "height"; duration: 400 }
-			}
-		]
-		states: [
-			State {
-				name: "collapsed"
-				PropertyChanges {
-					target: listContainer
-					height: 0
-					opacity: 0
-				}
-				PropertyChanges {
-					target: listContainer.parent
-					height: 20
-				}
-				PropertyChanges {
-					target: dumpList
-					height: 0
-					opacity: 0
-				}
-			}
-		]
-		id: listContainer
-		//border.width: 3
-		//border.color: "#deddd9"
-		anchors.top: listTitle.bottom
-		height: 223
-		anchors.topMargin: 5
-		width: parent.width
-		color: "transparent"
-		TextArea {
-			readOnly: true
-			anchors.top: parent.top
-			anchors.left: parent.left
-			anchors.topMargin: 5
-			anchors.leftMargin: 5
-			width: parent.width
-			height: parent.height
-			id: dumpList
-			text: content
-		}
-	}
-}
diff --git a/mix/qml/Debugger.qml b/mix/qml/Debugger.qml
index f1c06c157..41567f997 100644
--- a/mix/qml/Debugger.qml
+++ b/mix/qml/Debugger.qml
@@ -11,7 +11,7 @@ Rectangle {
 	objectName: "debugPanel"
 	anchors.fill: parent;
 	color: "#ededed"
-
+	clip: true
 	Keys.onPressed:
 	{
 		if (event.key === Qt.Key_F10)
@@ -101,7 +101,7 @@ Rectangle {
 		id: debugScrollArea
 		flickableDirection: Flickable.VerticalFlick
 		anchors.fill: parent
-		contentHeight: machineStates.height
+		contentHeight: machineStates.height + 300
 		contentWidth: machineStates.width
 
 		GridLayout
@@ -115,7 +115,6 @@ Rectangle {
 			anchors.right: parent.right;
 			anchors.rightMargin: machineStates.sideMargin
 			flow: GridLayout.TopToBottom
-			//columnSpacing: 7
 			rowSpacing: 15
 			RowLayout {
 				// step button + slider
@@ -131,7 +130,7 @@ Rectangle {
 					StepActionImage
 					{
 						id: jumpoutbackaction;
-						source: "qrc:/qml/img/jumpoutback.png"
+						enabledStateImg: "qrc:/qml/img/jumpoutback.png"
 						disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png"
 						onClicked: Debugger.stepOutBack()
 					}
@@ -139,7 +138,7 @@ Rectangle {
 					StepActionImage
 					{
 						id: jumpintobackaction
-						source: "qrc:/qml/img/jumpintoback.png"
+						enabledStateImg: "qrc:/qml/img/jumpintoback.png"
 						disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png"
 						onClicked: Debugger.stepIntoBack()
 					}
@@ -147,7 +146,7 @@ Rectangle {
 					StepActionImage
 					{
 						id: jumpoverbackaction
-						source: "qrc:/qml/img/jumpoverback.png"
+						enabledStateImg: "qrc:/qml/img/jumpoverback.png"
 						disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png"
 						onClicked: Debugger.stepOverBack()
 					}
@@ -155,7 +154,7 @@ Rectangle {
 					StepActionImage
 					{
 						id: jumpoverforwardaction
-						source: "qrc:/qml/img/jumpoverforward.png"
+						enabledStateImg: "qrc:/qml/img/jumpoverforward.png"
 						disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png"
 						onClicked: Debugger.stepOverForward()
 					}
@@ -163,7 +162,7 @@ Rectangle {
 					StepActionImage
 					{
 						id: jumpintoforwardaction
-						source: "qrc:/qml/img/jumpintoforward.png"
+						enabledStateImg: "qrc:/qml/img/jumpintoforward.png"
 						disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png"
 						onClicked: Debugger.stepIntoForward()
 					}
@@ -171,7 +170,7 @@ Rectangle {
 					StepActionImage
 					{
 						id: jumpoutforwardaction
-						source: "qrc:/qml/img/jumpoutforward.png"
+						enabledStateImg: "qrc:/qml/img/jumpoutforward.png"
 						disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png"
 						onClicked: Debugger.stepOutForward()
 					}
@@ -211,7 +210,7 @@ Rectangle {
 			RowLayout {
 				// Assembly code
 				width: debugPanel.width
-				height: 400
+				height: 405
 				spacing: 10
 
 				Rectangle
@@ -221,9 +220,11 @@ Rectangle {
 					border.width: 3
 					border.color: "#deddd9"
 					color: "white"
-
+					anchors.top: parent.top
 					ListView {
 						anchors.fill: parent
+						anchors.leftMargin: 3
+						anchors.rightMargin: 3
 						anchors.topMargin: 3
 						anchors.bottomMargin: 3
 						clip: true
@@ -236,8 +237,9 @@ Rectangle {
 					Component {
 						id: highlightBar
 						Rectangle {
+							radius: 4
 							height: statesList.currentItem.height
-							width: statesList.currentItem.width
+							width: statesList.currentItem.width;
 							color: "#4b8fe2"
 							Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } }
 						}
@@ -245,14 +247,26 @@ Rectangle {
 
 					Component {
 						id: renderDelegate
-						Item {
+						RowLayout {
 							id: wrapperItem
 							height: 20
 							width: parent.width
+							spacing: 5
+							Text {
+								anchors.left: parent.left
+								anchors.leftMargin: 10
+								width: 15
+								color: "#b2b3ae"
+								text: line.split(' ')[0]
+								font.pointSize: 9
+								id: id
+								wrapMode: Text.NoWrap
+							}
 							Text {
+								wrapMode: Text.NoWrap
 								color: parent.ListView.isCurrentItem ? "white" : "black"
-								anchors.centerIn: parent
-								text: line
+								text: line.replace(line.split(' ')[0], '')
+								anchors.left: id.right
 								font.pointSize: 9
 							}
 						}
@@ -266,25 +280,80 @@ Rectangle {
 						// Info
 						width: parent.width
 						id: basicInfoColumn
-						height: 150
+						height: 125
 						color: "transparent"
 						DebugBasicInfo {
 							id: basicInfo
-							width: parent.width
 							height: parent.height
+							width: parent.width
 						}
 					}
 
 					Rectangle {
 						// Stack
-						height: 250
+						height: 275
 						width: parent.width
 						color: "transparent"
 
-						Storage {
+						DebugInfoList
+						{
 							id: stack
 							width: parent.width
+							height: parent.height
+							collapsible: false
 							title : qsTr("Stack")
+							itemDelegate: Item {
+								id: renderedItem
+								height: 27
+								width: parent.width
+								RowLayout
+								{
+									anchors.fill: parent
+									Rectangle
+									{
+										id: indexColumn
+										color: "#f7f7f7"
+										Layout.fillWidth: true
+										Layout.minimumWidth: 30
+										Layout.preferredWidth: 30
+										Layout.maximumWidth: 30
+										Layout.minimumHeight: parent.height
+										Text {
+											anchors.centerIn: parent
+											anchors.leftMargin: 5
+											color: "#8b8b8b"
+											text: model.index;
+											font.pointSize: 9
+										}
+									}
+
+									Rectangle
+									{
+										anchors.left: indexColumn.right
+										Layout.fillWidth: true
+										Layout.minimumWidth: 15
+										Layout.preferredWidth: 15
+										Layout.maximumWidth: 60
+										Layout.minimumHeight: parent.height
+										Text {
+											anchors.left: parent.left
+											anchors.leftMargin: 5
+											anchors.verticalCenter: parent.verticalCenter
+											color: "#8b8b8b"
+											text: modelData
+											font.pointSize: 9
+										}
+									}
+								}
+
+								Rectangle {
+								   id: separator
+								   width: parent.width;
+								   height: 1;
+								   color: "#cccccc"
+								   anchors.bottom: parent.bottom
+								 }
+							}
 						}
 					}
 				}
@@ -297,10 +366,70 @@ Rectangle {
 				radius: 3
 			}
 
-			Storage {
+			DebugInfoList
+			{
 				id: storage
 				width: debugPanel.width - 2 * machineStates.sideMargin
+				height: 223
+				collapsible: true
 				title : qsTr("Storage")
+				itemDelegate:
+					Item {
+					height: 27
+					width: parent.width;
+					RowLayout
+					{
+						id: row
+						width: parent.width
+						height: 26
+						Rectangle
+						{
+							color: "#f7f7f7"
+							Layout.fillWidth: true
+							Layout.minimumWidth: parent.width / 2
+							Layout.preferredWidth: parent.width / 2
+							Layout.maximumWidth: parent.width / 2
+							Layout.minimumHeight: parent.height
+							Layout.maximumHeight: parent.height
+							Text {
+								anchors.verticalCenter: parent.verticalCenter
+								anchors.left: parent.left
+								anchors.leftMargin: 5
+								color: "#8b8b8b"
+								text: modelData.split(' ')[0].substring(0, 10);
+								font.pointSize: 9
+							}
+						}
+						Rectangle
+						{
+							color: "transparent"
+							Layout.fillWidth: true
+							Layout.minimumWidth: parent.width / 2
+							Layout.preferredWidth: parent.width / 2
+							Layout.maximumWidth: parent.width / 2
+							Layout.minimumHeight: parent.height
+							Layout.maximumHeight: parent.height
+							Text {
+								anchors.leftMargin: 5
+								width: parent.width - 5
+								wrapMode: Text.Wrap
+								anchors.left: parent.left
+								anchors.verticalCenter: parent.verticalCenter
+								color: "#8b8b8b"
+								text: modelData.split(' ')[1].substring(0, 10);
+								font.pointSize: 9
+							}
+						}
+					}
+
+					Rectangle {
+						anchors.top: row.bottom
+						width: parent.width;
+						height: 1;
+						color: "#cccccc"
+						anchors.bottom: parent.bottom
+					 }
+				}
 			}
 
 			Rectangle {
@@ -310,10 +439,20 @@ Rectangle {
 				radius: 3
 			}
 
-			Storage {
+
+
+			DebugInfoList {
 				id: memoryDump
 				width: debugPanel.width - 2 * machineStates.sideMargin
+				height: 223
+				collapsible: true
 				title: qsTr("Memory Dump")
+				itemDelegate:
+					Item {
+					height: 29
+					width: parent.width - 3;
+					ItemDelegateDataDump {}
+				}
 			}
 
 			Rectangle {
@@ -323,10 +462,18 @@ Rectangle {
 				radius: 3
 			}
 
-			Storage {
+			DebugInfoList {
 				id: callDataDump
-				width: debugPanel.width;
+				width: debugPanel.width - 2 * machineStates.sideMargin
+				height: 223
+				collapsible: true
 				title: qsTr("Call data")
+				itemDelegate:
+					Item {
+					height: 29
+					width: parent.width - 3;
+					ItemDelegateDataDump {}
+				}
 			}
 		}
 	}
diff --git a/mix/qml/ImageButton.qml b/mix/qml/ImageButton.qml
deleted file mode 100644
index 206100c7b..000000000
--- a/mix/qml/ImageButton.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-import QtQuick 2.2
-import QtQuick.Controls 1.1
-import QtQuick.Layouts 1.0
-import QtQuick.Controls.Styles 1.1
-
-Item {
-  id: button
-
-  signal clicked
-  signal pressed
-  signal released
-
-  width: sprite.width
-  height: sprite.height
-
-
-  MouseArea {
-	id: mouseArea
-	enabled: button.enabled
-	anchors.fill: button
-	hoverEnabled: true
-
-	onClicked: button.clicked()
-	onPressed: button.pressed()
-	onReleased: button.released()
-  }
-
-  onClicked: {
-  }
-
-  onPressed: {
-	opacity = 0.5
-  }
-
-  onReleased: {
-	opacity = 1.0
-  }
-}
diff --git a/mix/qml/ItemDelegateDataDump.qml b/mix/qml/ItemDelegateDataDump.qml
new file mode 100644
index 000000000..da7159779
--- /dev/null
+++ b/mix/qml/ItemDelegateDataDump.qml
@@ -0,0 +1,68 @@
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.0
+import QtQuick.Controls.Styles 1.1
+
+Rectangle {
+	anchors.fill: parent
+	RowLayout
+	{
+		anchors.fill: parent
+		spacing: 2
+		Rectangle
+		{
+			color: "#f7f7f7"
+			Layout.fillWidth: true
+			Layout.minimumWidth: 35
+			Layout.preferredWidth: 35
+			Layout.maximumWidth: 35
+			Layout.minimumHeight: parent.height
+			Text {
+				anchors.centerIn: parent
+				anchors.leftMargin: 5
+				color: "#8b8b8b"
+				text: modelData.split("_separator_")[0]
+				font.pointSize: 9
+			}
+
+		}
+		Rectangle
+		{
+			anchors.left: firstCol.right
+			Layout.fillWidth: true
+			Layout.minimumWidth: 90
+			Layout.preferredWidth: 90
+			Layout.maximumWidth: 90
+			Layout.minimumHeight: parent.height
+			Text {
+				anchors.left: parent.left
+				anchors.verticalCenter: parent.verticalCenter
+				color: "#8b8b8b"
+				text: modelData.split("_separator_")[1]
+				font.pointSize: 9
+			}
+		}
+
+		Rectangle
+		{
+			Layout.fillWidth: true
+			Layout.minimumWidth: 50
+			Layout.minimumHeight: parent.height
+			Text {
+				anchors.left: parent.left
+				anchors.verticalCenter: parent.verticalCenter
+				color: "#ededed"
+				font.bold: true
+				text: modelData.split("_separator_")[2]
+				font.pointSize: 10
+			}
+		}
+	}
+
+	Rectangle {
+		width: parent.width;
+		height: 1;
+		color: "#cccccc"
+		anchors.bottom: parent.bottom
+	}
+}
diff --git a/mix/qml/MainContent.qml b/mix/qml/MainContent.qml
index 0cf54b94e..b80e5bc53 100644
--- a/mix/qml/MainContent.qml
+++ b/mix/qml/MainContent.qml
@@ -17,6 +17,19 @@ Rectangle {
 	anchors.fill: parent
 	id: root
 
+	function toggleRightView()
+	{
+		if (!rightView.visible)
+		{
+			rightView.show();
+			debugModel.updateDebugPanel();
+		}
+		else
+		{
+			rightView.hide();
+		}
+	}
+
 	function ensureRightView()
 	{
 		if (!rightView.visible)
@@ -47,19 +60,71 @@ Rectangle {
 		columnSpacing: 0
 		rowSpacing: 0
 		Rectangle {
+			width: parent.width
+			height: 50
 			Layout.row: 0
 			Layout.fillWidth: true
 			Layout.preferredHeight: 50
 			id: headerView
-			TabView {
-				id: headerPaneTabs
-				tabsVisible: false
-				antialiasing: true
+			Rectangle
+			{
+				gradient: Gradient {
+					GradientStop { position: 0.0; color: "#f1f1f1" }
+					GradientStop { position: 1.0; color: "#d9d7da" }
+				}
+				id: headerPaneContainer
 				anchors.fill: parent
-				style: TabViewStyle {
-					frameOverlap: 1
-					tab: Rectangle {}
-					frame: Rectangle {}
+				TabView {
+					id: headerPaneTabs
+					tabsVisible: false
+					antialiasing: true
+					anchors.fill: parent
+					style: TabViewStyle {
+						frameOverlap: 1
+						tab: Rectangle {}
+						frame: Rectangle { color: "transparent" }
+					}
+				}
+			}
+
+			Rectangle
+			{
+				color: "transparent"
+				width: 100
+				height: parent.height
+				anchors.top: headerView.top
+				anchors.right: headerView.right
+				RowLayout
+				{
+					anchors.fill: parent
+					Rectangle {
+						color: "transparent"
+						anchors.fill: parent
+						Button
+						{
+							anchors.right: parent.right
+							anchors.rightMargin: 15
+							anchors.verticalCenter: parent.verticalCenter
+							id: debugImg
+							iconSource: "qrc:/qml/img/bugiconinactive.png"
+							action: debugRunActionIcon
+						}
+						Action {
+							id: debugRunActionIcon
+							shortcut: "F5"
+							onTriggered: {
+								mainContent.ensureRightView();
+								debugModel.debugDeployment();
+							}
+							enabled: codeModel.hasContract && !debugModel.running;
+							onEnabledChanged: {
+								if (enabled)
+									debugImg.iconSource = "qrc:/qml/img/bugiconactive.png"
+								else
+									debugImg.iconSource = "qrc:/qml/img/bugiconinactive.png"
+							}
+						}
+					}
 				}
 			}
 		}
@@ -133,27 +198,26 @@ Rectangle {
 						}
 					}
 				}
-
 			}
-			Rectangle {
 
+			Rectangle {
 				Keys.onEscapePressed:
 				{
 					hide();
 				}
-
 				visible: false;
 				id: rightView;
 				property real panelRelWidth: 0.38
 				function show() {
 					visible = true;
-					editorRect.width = parent.width * (1 - 0.38)
+					contentView.width = parent.width * (1 - 0.38)
 				}
 
 				function hide() {
 					visible = false;
-					editorRect.width = parent.width;
+					contentView.width = parent.width;
 				}
+
 				height: parent.height;
 				width: Layout.minimumWidth
 				Layout.minimumWidth: parent.width * 0.38
@@ -162,13 +226,31 @@ Rectangle {
 					id: rightPaneView
 					TabView {
 						id: rightPaneTabs
-						tabsVisible: false
+						tabsVisible: true
 						antialiasing: true
 						anchors.fill: parent
 						style: TabViewStyle {
 							frameOverlap: 1
-							tab: Rectangle {}
-							frame: Rectangle {}
+
+							tabBar:
+								Rectangle {
+									color: "#ededed"
+									id: background
+
+								}
+							tab: Rectangle {
+								color: "#ededed"
+								implicitWidth: 80
+								implicitHeight: 20
+								radius: 2
+								Text {
+									anchors.centerIn: parent
+									text: styleData.title
+									color: styleData.selected ? "#7da4cd" : "#202020"
+								}
+							}
+							frame: Rectangle {
+							}
 						}
 					}
 				}
diff --git a/mix/qml/StateList.qml b/mix/qml/StateList.qml
index 0d4b6e5c6..52a49b450 100644
--- a/mix/qml/StateList.qml
+++ b/mix/qml/StateList.qml
@@ -5,7 +5,7 @@ import QtQuick.Dialogs 1.1
 import QtQuick.Layouts 1.1
 
 Rectangle {
-	color: "transparent"
+	color: "#ededed"
 	id: stateListContainer
 	focus: true
 	anchors.topMargin: 10
@@ -115,7 +115,10 @@ Rectangle {
 				ToolButton {
 					text: qsTr("Run");
 					Layout.fillHeight: true
-					onClicked: stateListModel.runState(index);
+					onClicked:
+					{
+						stateListModel.runState(index)
+					}
 				}
 			}
 		}
diff --git a/mix/qml/StepActionImage.qml b/mix/qml/StepActionImage.qml
index ec262b36e..13a8968a0 100644
--- a/mix/qml/StepActionImage.qml
+++ b/mix/qml/StepActionImage.qml
@@ -3,24 +3,43 @@ import QtQuick.Controls 1.1
 import QtQuick.Layouts 1.0
 import QtQuick.Controls.Styles 1.1
 
-Image {
-	id: jumpintobackimg
+
+Rectangle {
+	id: buttonActionContainer
 	property string disableStateImg
+	property string enabledStateImg
 	signal clicked
 	width: 15
-	sourceSize.width: 15
-	MouseArea
+	height: 15
+	color: "transparent"
+	Button
 	{
 		anchors.fill: parent
-		onClicked: jumpintobackimg.clicked();
-	}
-	states: [
-		State {
-			name: "disabled"
-			PropertyChanges {
-				target: jumpintobackimg
-				source: disableStateImg
+		id: debugImg
+		iconSource: enabledStateImg
+		action: buttonAction
+		style: ButtonStyle {
+			background: Component {
+				Rectangle {
+					color: "transparent"
+					border.width: 0
+					width: 15
+					height: 15
+				}
 			}
 		}
-	]
+	}
+	Action {
+		id: buttonAction
+		onTriggered: {
+			buttonActionContainer.clicked();
+		}
+		enabled: codeModel.hasContract && !debugModel.running;
+		onEnabledChanged: {
+			if (enabled)
+				iconSource = enabledStateImg
+			else
+				iconSource = disableStateImg
+		}
+	}
 }
diff --git a/mix/qml/Storage.qml b/mix/qml/Storage.qml
deleted file mode 100644
index b68f8bc12..000000000
--- a/mix/qml/Storage.qml
+++ /dev/null
@@ -1,98 +0,0 @@
-import QtQuick 2.2
-import QtQuick.Controls 1.1
-import QtQuick.Layouts 1.0
-import QtQuick.Controls.Styles 1.1
-
-ColumnLayout {
-	property string title
-	property variant listModel;
-	RowLayout {
-		height: 20
-
-		Image {
-			source: "qrc:/qml/img/jumpoverback.png"
-			width: 15
-			sourceSize.width: 15
-			id: storageImgArrow
-
-		}
-
-		Text {
-			anchors.left: storageImgArrow.right
-			color: "#8b8b8b"
-			text: title
-			id: storageListTitle
-		}
-
-		MouseArea
-		{
-			anchors.fill: parent
-			onClicked: {
-				if (storageContainer.state == "collapsed")
-					storageContainer.state = "";
-				else
-					storageContainer.state = "collapsed";
-			}
-		}
-	}
-
-	RowLayout
-	{
-		Rectangle
-		{
-			border.width: 3
-			border.color: "#deddd9"
-			height: 223;
-			Layout.fillWidth: true
-			transitions: [
-				Transition {
-					NumberAnimation { target: storageContainer; property: "visible"; duration: 400 }
-					NumberAnimation { target: storageContainer; property: "height"; duration: 400 }
-				}
-			]
-			states: [
-				State {
-					name: "collapsed"
-					PropertyChanges {
-						target: storageContainer
-						height: 0
-						//opacity: 0
-						visible: false
-					}
-					PropertyChanges {
-						target: storageContainer.parent
-						height: 20
-					}
-				}
-			]
-			id: storageContainer
-
-			anchors.top: storageListTitle.bottom
-
-			anchors.topMargin: 5
-			width: parent.width
-			ListView {
-				anchors.top: parent.top
-				anchors.left: parent.left
-				anchors.topMargin: 5
-				anchors.leftMargin: 5
-				width: parent.width
-				height: parent.height
-				id: storageList
-				model: listModel
-				delegate:
-					Component {
-					Item {
-						height: 20
-						width: parent.width
-						Text {
-							color: "#8b8b8b"
-							text: modelData
-							font.pointSize: 9
-						}
-					}
-				}
-			}
-		}
-	}
-}
diff --git a/mix/qml/img/bugiconactive.png b/mix/qml/img/bugiconactive.png
new file mode 100644
index 0000000000000000000000000000000000000000..ec72938a44308f9c53910088a152d6a67591503e
GIT binary patch
literal 1194
zcmV;b1XcTqP)Px(WJyFpR7ef&Rb6NtRTMsFX0u6lZEzcFle*icD*hn;Kz$IDMv%O0cCigupA<`j
zQ8b%?_~2h@C2c`pvfF6Mi!C-HSkYoOd8pVIZIOaR?L)08o8E3Tk^O>UkMgjM$hvTqpZ#2|^}=QQ
zF~txqM7Sc_3X|FO78M7<876k>B(?)!8hoDrFqlIGL7i36Voe
z+yh+MG?F>l(9j^|g|by>vTdi8KZY2Q^BR}_LlcdI_4SQE=L`8`2EupgzQ{|$)raeh
zl_M0Y8%_rDQ2EK~q+`!4(!GU%MtiVEHJ}3vwF(s~0kJr5?836((zS|zP#|wmK-NCXEUq(rh4&K8
zv$Bp4=K^-op5Xl5V~I_l3+6REcdUrM#>NS2t}q{(;XPGHwLPxdBDdYvT0ZwpW;WpS
z{dLwVR-avocOIF%v0N&@&L2q=_b;;N3qd~D>-7L-N8ifcC-(Sr;ja}YbMAXCHpeVj
z#gS+-ljo!2s?w~#-oN+bXIp+(TvuY-Zx*10U!Vbv+)2nr3~*Fi)|zVOfJqf3Gg{D9
zUAqzsmow)H@w7>>z-@!C2No*Ynt&_uCwn%`v2R541HW~LXh}=N>Y@~yx0dEHyf>A!Ekwq%Myqbu@g(F;vkyz0XE#=qenjOcJxrZE}
zr+q%?8tvVD@i_@%07*qo
IM6N<$f)aK`761SM

literal 0
HcmV?d00001

diff --git a/mix/qml/img/bugiconinactive.png b/mix/qml/img/bugiconinactive.png
new file mode 100644
index 0000000000000000000000000000000000000000..976175b06143be400bbf5510c03be8060a5f76c3
GIT binary patch
literal 1084
zcmV-C1jGA@P)Px&_DMuRR7ef&l}%`rM;OQVBP8jj2}T=16x_suO3@b5LqRcxlFMd8k_Gh?h#1sM
zQ4kMmD^dIay;vy)FKr+Rf+%6;f
zl=N5~80MM(^MC%&%ro=O>+`*D|Mv>`|H}rOo104}CMLd6YqR#bnqe*n0*C2Olpdc_5dJ$Qu_!qBF#l1parayS1LRA(#%T|jYhvi
z=wg3=|D$XqMq^{+hIBf8246MPzvyO%>#;vZ{Ex!I!sETYy?-;$w)*<|N_>an@%X_k
zh~e6CTU%QI(hhd=p-pONXxK74JKGO-FBA%Wj!0x+VBmndY+>?=Bd#4QEon;I#tZBT
z&V{xMXLTJg1+eS}VoH-f0NZg7Zw;2Gi(Th2yvh
zvCbx8hv+)bx3ydBuEZueS~qP>c3xsia|Qg%SS+^AkO{tn;5IW~Y7__Vu<=U+tj5ta
z@Z$KoW)@7z&JnPg%d&T7W~Lso!^}TnJWY?&pA;7ttGqrgT-p5m{2KgG`nULg4hDl~
zi;9XKCX>l_lHTVY9JS;ZP1hM4Cy&DE@$vERNqP;TRS15=_z`0boSKD&h0xU0luD|F
z&(Kr&CK=DugPij(EM}aTyV3&7Yo0qcEFOy;1YhRXe%jsLoffWFE0s!x*p1HJS5Q!p
zDlILY?&|7NVjrJRh@`{BwQ?D+3-fB8J2pf_hgtngR;`=6*qrBa$tSY9x;i~HG&IR#
zvuAB$?a`IEsi|o-XLbrg8Kujx@)B0Q!VWMt)%Z*{PvxHm(>OLZMu>j}N6`r#i^Kj2a*aR@s+Iy$-v{D}$D2p)6huEgTvOS0~3T(T)fKYiNK
z&Puov_x1I?z|)!aVzBC31h!)4CU!jtCPrM6{6i%!8O&?U`;I+G351$Fa8JnLCOn-M
zxMX5(XO!LkO4&BTuhmb&it{ubPOV}TD-BN~pl4zpkb|uJEM@zF+Zo}!J9%@DEhS=b
zal}=OVx=K1(>I9^_a5cl&3ingd2W*yTvt+Y@)C14
zt>JKZELXtHodljq496a;s;VB0jEuC}*n9iksK6`H$;^QQbF7H~0000Px$U`a$lR7eeDU>F6XAuu9Cz{|^Pk%NN+4>di{M5JM{TwGk|+}+)ch*VEd8L<|F
z3{qugWFK!z81y0p%*HECs>NW#7#SJ8I5{~l
z0Uh9k*K|CRWLXR{4`{h05bp+B-U9SJ3m!YLN|9|b)HEib<<-E1cMzEJ<+0j;Ly%I7
zVa8ek85e+-2g3vi(bTdSWRCz4uK`*`E695SS0+;G(JNW0)N?KYaL*
z2;<h|s1*WghDm!g)%$ABhA0WEz9H<Px$V@X6oR7ef&RIy6LKoCt-tZl86{DHNtB=`YxoZ4JvcZI!`jbC74qaR=+3F%VZ
zFIXf&tgaD~LK8Sl*0+#_Wp5{JECgW}mYsR?-c0r_#BuDh4p;}Q1OLqdm-^r+iXKrr
zr|J{%r#Ox;RQ`?%h`ecDF*>{@BZ^Vv{WO8RutVBP|Mp?4e$rQKq{
z6_`$q-&k&u=lN?81c$(mud&u0ajhtOI_V!)&c9lpE>XY632S;
TplQRi00000NkvXXu0mjfZRW#V

literal 0
HcmV?d00001

diff --git a/mix/qml/js/Debugger.js b/mix/qml/js/Debugger.js
index 6ebec2299..7fb840fab 100644
--- a/mix/qml/js/Debugger.js
+++ b/mix/qml/js/Debugger.js
@@ -7,7 +7,11 @@ var currentSelectedState = null;
 var jumpStartingPoint = null;
 function init()
 {
+	if (debugStates === undefined)
+		return;
+
 	statesSlider.maximumValue = debugStates.length - 1;
+	statesSlider.value = 0;
 	statesList.model = humanReadableExecutionCode;
 	currentSelectedState = 0;
 	select(currentSelectedState);
diff --git a/mix/qml/main.qml b/mix/qml/main.qml
index 65eae4788..75c1166da 100644
--- a/mix/qml/main.qml
+++ b/mix/qml/main.qml
@@ -28,6 +28,10 @@ ApplicationWindow {
 			MenuItem { action: debugRunAction }
 			MenuItem { action: debugResetStateAction }
 		}
+		Menu {
+			title: qsTr("Windows")
+			MenuItem { action: showHideRightPanel }
+		}
 	}
 
 	Component.onCompleted: {
@@ -40,7 +44,6 @@ ApplicationWindow {
 		anchors.fill: parent
 	}
 
-
 	ModalDialog {
 		objectName: "dialog"
 		id: dialog
@@ -69,5 +72,10 @@ ApplicationWindow {
 		onTriggered: debugModel.resetState();
 	}
 
-
+	Action {
+		id: showHideRightPanel
+		text: "Show/Hide right view"
+		shortcut: "F7"
+		onTriggered: mainContent.toggleRightView();
+	}
 }

From 49467ed8e286ac4303c8438ca3011f3291160d79 Mon Sep 17 00:00:00 2001
From: yann300 
Date: Mon, 12 Jan 2015 14:32:54 +0100
Subject: [PATCH 05/12]  - rename init() => update() in AssemblyDebuggerControl
  - rename ConstantCompilationControl.cpp => StatusPane.cpp

---
 mix/AssemblyDebuggerControl.cpp               |  2 +-
 mix/CodeEditorExtensionManager.cpp            |  5 ++---
 mix/CodeEditorExtensionManager.h              |  2 +-
 mix/DebuggingStateWrapper.cpp                 |  2 +-
 ...tCompilationControl.cpp => StatusPane.cpp} | 22 +++++++++----------
 ...stantCompilationControl.h => StatusPane.h} |  6 ++---
 mix/qml.qrc                                   |  2 +-
 mix/qml/Debugger.qml                          |  6 ++---
 .../{CompilationStatus.qml => StatusPane.qml} |  6 ++---
 9 files changed, 26 insertions(+), 27 deletions(-)
 rename mix/{ConstantCompilationControl.cpp => StatusPane.cpp} (63%)
 rename mix/{ConstantCompilationControl.h => StatusPane.h} (89%)
 rename mix/qml/{CompilationStatus.qml => StatusPane.qml} (90%)

diff --git a/mix/AssemblyDebuggerControl.cpp b/mix/AssemblyDebuggerControl.cpp
index 4c0fdda0c..12dfe533b 100644
--- a/mix/AssemblyDebuggerControl.cpp
+++ b/mix/AssemblyDebuggerControl.cpp
@@ -208,7 +208,7 @@ void AssemblyDebuggerControl::updateDebugPanel()
 {
 	QVariant returnValue;
 	QObject* debugPanel = m_view->findChild("debugPanel", Qt::FindChildrenRecursively);
-	QMetaObject::invokeMethod(debugPanel, "init", Q_RETURN_ARG(QVariant, returnValue));
+	QMetaObject::invokeMethod(debugPanel, "update", Q_RETURN_ARG(QVariant, returnValue));
 }
 
 void AssemblyDebuggerControl::showDebugError(QString const& _error)
diff --git a/mix/CodeEditorExtensionManager.cpp b/mix/CodeEditorExtensionManager.cpp
index ae6cfec87..6c5b23af7 100644
--- a/mix/CodeEditorExtensionManager.cpp
+++ b/mix/CodeEditorExtensionManager.cpp
@@ -25,7 +25,7 @@
 #include 
 #include 
 #include 
-#include "ConstantCompilationControl.h"
+#include "StatusPane.h"
 #include "AssemblyDebuggerControl.h"
 #include "StateListView.h"
 #include "AppContext.h"
@@ -64,11 +64,10 @@ void CodeEditorExtensionManager::loadEditor(QQuickItem* _editor)
 
 void CodeEditorExtensionManager::initExtensions()
 {
-	std::shared_ptr output = std::make_shared(m_appContext);
+	std::shared_ptr output = std::make_shared(m_appContext);
 	std::shared_ptr debug = std::make_shared(m_appContext);
 	std::shared_ptr stateList = std::make_shared(m_appContext);
 	QObject::connect(m_doc, &QTextDocument::contentsChange, this, &CodeEditorExtensionManager::onCodeChange);
-	//QObject::connect(debug.get(), &AssemblyDebuggerControl::runFailed, output.get(), &ConstantCompilationControl::displayError);
 	QObject::connect(m_appContext->codeModel(), &CodeModel::compilationComplete, this, &CodeEditorExtensionManager::applyCodeHighlight);
 
 	initExtension(output);
diff --git a/mix/CodeEditorExtensionManager.h b/mix/CodeEditorExtensionManager.h
index b7d0e3074..da7d0486d 100644
--- a/mix/CodeEditorExtensionManager.h
+++ b/mix/CodeEditorExtensionManager.h
@@ -26,7 +26,7 @@
 #include 
 #include 
 #include 
-#include "ConstantCompilationControl.h"
+#include "StatusPane.h"
 
 namespace dev
 {
diff --git a/mix/DebuggingStateWrapper.cpp b/mix/DebuggingStateWrapper.cpp
index f12a0b9ef..6c5a9b047 100644
--- a/mix/DebuggingStateWrapper.cpp
+++ b/mix/DebuggingStateWrapper.cpp
@@ -105,7 +105,7 @@ QStringList DebuggingStateWrapper::debugStorage()
 		s << "@" << prettyU256(i.first) << " " << prettyU256(i.second);
 		storage.append(QString::fromStdString(s.str()));
 	}
-	return fillList(storage, "@- -");
+	return fillList(storage, "@ -");
 }
 
 QStringList DebuggingStateWrapper::debugMemory()
diff --git a/mix/ConstantCompilationControl.cpp b/mix/StatusPane.cpp
similarity index 63%
rename from mix/ConstantCompilationControl.cpp
rename to mix/StatusPane.cpp
index c4f365238..e1a33f1a9 100644
--- a/mix/ConstantCompilationControl.cpp
+++ b/mix/StatusPane.cpp
@@ -27,40 +27,40 @@
 #include 
 #include 
 #include 
-#include "ConstantCompilationControl.h"
+#include "StatusPane.h"
 #include "QContractDefinition.h"
 #include "AppContext.h"
 #include "CodeModel.h"
 
 using namespace dev::mix;
 
-ConstantCompilationControl::ConstantCompilationControl(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::HeaderView)
+StatusPane::StatusPane(AppContext* _context): Extension(_context, ExtensionDisplayBehavior::HeaderView)
 {
-	connect(_context->codeModel(), &CodeModel::compilationComplete, this, &ConstantCompilationControl::update);
-	_context->appEngine()->rootContext()->setContextProperty("constantCompilation", this);
+	connect(_context->codeModel(), &CodeModel::compilationComplete, this, &StatusPane::update);
+	_context->appEngine()->rootContext()->setContextProperty("statusPane", this);
 }
 
-QString ConstantCompilationControl::contentUrl() const
+QString StatusPane::contentUrl() const
 {
-	return QStringLiteral("qrc:/qml/CompilationStatus.qml");
+	return QStringLiteral("qrc:/qml/StatusPane.qml");
 }
 
-QString ConstantCompilationControl::title() const
+QString StatusPane::title() const
 {
 	return QApplication::tr("compiler");
 }
 
-void ConstantCompilationControl::start() const
+void StatusPane::start() const
 {
 }
 
-CompilationResult* ConstantCompilationControl::result() const
+CompilationResult* StatusPane::result() const
 {
 	return m_ctx->codeModel()->code();
 }
 
-void ConstantCompilationControl::update()
+void StatusPane::update()
 {
-	QObject* ctrl = m_view->findChild("constantCompilationStatus", Qt::FindChildrenRecursively);
+	QObject* ctrl = m_view->findChild("statusPane", Qt::FindChildrenRecursively);
 	QMetaObject::invokeMethod(ctrl, "update");
 }
diff --git a/mix/ConstantCompilationControl.h b/mix/StatusPane.h
similarity index 89%
rename from mix/ConstantCompilationControl.h
rename to mix/StatusPane.h
index 8acde4f09..c0db286a3 100644
--- a/mix/ConstantCompilationControl.h
+++ b/mix/StatusPane.h
@@ -30,14 +30,14 @@ namespace mix
 /**
  * @brief Extension which display assembly code of the contract being edited.
  */
-class ConstantCompilationControl: public Extension
+class StatusPane: public Extension
 {
 	Q_OBJECT
 	Q_PROPERTY(CompilationResult* result READ result CONSTANT)
 
 public:
-	ConstantCompilationControl(AppContext* _appContext);
-	~ConstantCompilationControl() {}
+	StatusPane(AppContext* _appContext);
+	~StatusPane() {}
 	void start() const override;
 	QString title() const override;
 	QString contentUrl() const override;
diff --git a/mix/qml.qrc b/mix/qml.qrc
index 0d0314785..29d890417 100644
--- a/mix/qml.qrc
+++ b/mix/qml.qrc
@@ -12,7 +12,6 @@
         qml/AlertMessageDialog.qml
         qml/StateDialog.qml
         qml/StateList.qml
-        qml/CompilationStatus.qml
         qml/js/main.js
         qml/img/jumpintoback.png
         qml/img/jumpintoforward.png
@@ -34,5 +33,6 @@
         qml/img/bugiconinactive.png
         qml/DebugInfoList.qml
         qml/ItemDelegateDataDump.qml
+        qml/StatusPane.qml
     
 
diff --git a/mix/qml/Debugger.qml b/mix/qml/Debugger.qml
index 41567f997..822c7346a 100644
--- a/mix/qml/Debugger.qml
+++ b/mix/qml/Debugger.qml
@@ -20,9 +20,9 @@ Rectangle {
 			Debugger.moveSelection(-1);
 	}
 
-	function init()
+	function update()
 	{
-		if (constantCompilation.result.successfull)
+		if (statusPane.result.successfull)
 		{
 			Debugger.init();
 			debugScrollArea.visible = true;
@@ -35,7 +35,7 @@ Rectangle {
 			compilationErrorArea.visible = true;
 			machineStates.visible = false;
 			console.log(constantCompilation.result.compilerMessage);
-			var errorInfo = ErrorLocationFormater.extractErrorInfo(constantCompilation.result.compilerMessage, false);
+			var errorInfo = ErrorLocationFormater.extractErrorInfo(statusPane.result.compilerMessage, false);
 			errorLocation.text = errorInfo.errorLocation;
 			errorDetail.text = errorInfo.errorDetail;
 			errorLine.text = errorInfo.errorLine;
diff --git a/mix/qml/CompilationStatus.qml b/mix/qml/StatusPane.qml
similarity index 90%
rename from mix/qml/CompilationStatus.qml
rename to mix/qml/StatusPane.qml
index da77e70cd..0a828a0d0 100644
--- a/mix/qml/CompilationStatus.qml
+++ b/mix/qml/StatusPane.qml
@@ -5,10 +5,10 @@ import "js/ErrorLocationFormater.js" as ErrorLocationFormater
 
 Rectangle {
 	id: constantCompilationStatus
-	objectName: "constantCompilationStatus"
+	objectName: "statusPane"
 	function update()
 	{
-		if (constantCompilation.result.successfull)
+		if (statusPane.result.successfull)
 		{
 			image.state = "";
 			status.state = "";
@@ -19,7 +19,7 @@ Rectangle {
 		{
 			image.state = "error";
 			status.state = "error";
-			var errorInfo = ErrorLocationFormater.extractErrorInfo(constantCompilation.result.compilerMessage, true);
+			var errorInfo = ErrorLocationFormater.extractErrorInfo(statusPane.result.compilerMessage, true);
 			status.text = errorInfo.errorLocation + " " + errorInfo.errorDetail;
 			logslink.visible = true;
 		}

From 25279f0f8c1ae3a75ac969fef270943add786628 Mon Sep 17 00:00:00 2001
From: yann300 
Date: Mon, 12 Jan 2015 16:22:15 +0100
Subject: [PATCH 06/12]  - fix design bug

---
 mix/AssemblyDebuggerControl.h    |  2 +-
 mix/StatusPane.cpp               |  2 +-
 mix/StatusPane.h                 |  3 --
 mix/qml/Debugger.qml             |  1 -
 mix/qml/ItemDelegateDataDump.qml | 18 +++++++---
 mix/qml/MainContent.qml          | 57 +++-----------------------------
 mix/qml/StatusPane.qml           | 48 +++++++++++++++++++++++++--
 mix/qml/StepActionImage.qml      | 17 ++++++----
 mix/qml/js/Debugger.js           | 50 +++++++++-------------------
 9 files changed, 93 insertions(+), 105 deletions(-)

diff --git a/mix/AssemblyDebuggerControl.h b/mix/AssemblyDebuggerControl.h
index fdfa94cde..b8bd344e5 100644
--- a/mix/AssemblyDebuggerControl.h
+++ b/mix/AssemblyDebuggerControl.h
@@ -50,7 +50,7 @@ public:
 	void start() const override;
 	QString title() const override;
 	QString contentUrl() const override;
-	/// Display without managing machine states result. Displayed in the right side tab.
+	/// show panel without managing machine states result. Displayed in the right side tab.
 	Q_INVOKABLE void updateDebugPanel();
 
 private:
diff --git a/mix/StatusPane.cpp b/mix/StatusPane.cpp
index e1a33f1a9..f74b8f22b 100644
--- a/mix/StatusPane.cpp
+++ b/mix/StatusPane.cpp
@@ -62,5 +62,5 @@ CompilationResult* StatusPane::result() const
 void StatusPane::update()
 {
 	QObject* ctrl = m_view->findChild("statusPane", Qt::FindChildrenRecursively);
-	QMetaObject::invokeMethod(ctrl, "update");
+	QMetaObject::invokeMethod(ctrl, "updateStatus");
 }
diff --git a/mix/StatusPane.h b/mix/StatusPane.h
index c0db286a3..ee65252b5 100644
--- a/mix/StatusPane.h
+++ b/mix/StatusPane.h
@@ -43,9 +43,6 @@ public:
 	QString contentUrl() const override;
 	CompilationResult* result() const;
 
-private:
-	void resetOutPut();
-
 public slots:
 	void update();
 };
diff --git a/mix/qml/Debugger.qml b/mix/qml/Debugger.qml
index 822c7346a..ed9134cdd 100644
--- a/mix/qml/Debugger.qml
+++ b/mix/qml/Debugger.qml
@@ -34,7 +34,6 @@ Rectangle {
 			debugScrollArea.visible = false;
 			compilationErrorArea.visible = true;
 			machineStates.visible = false;
-			console.log(constantCompilation.result.compilerMessage);
 			var errorInfo = ErrorLocationFormater.extractErrorInfo(statusPane.result.compilerMessage, false);
 			errorLocation.text = errorInfo.errorLocation;
 			errorDetail.text = errorInfo.errorDetail;
diff --git a/mix/qml/ItemDelegateDataDump.qml b/mix/qml/ItemDelegateDataDump.qml
index da7159779..fefd482f9 100644
--- a/mix/qml/ItemDelegateDataDump.qml
+++ b/mix/qml/ItemDelegateDataDump.qml
@@ -7,10 +7,20 @@ Rectangle {
 	anchors.fill: parent
 	RowLayout
 	{
+		id: row;
+		function formatData(data, index)
+		{
+			if (data.indexOf("_separator_") !== -1)
+				return modelData.split("_separator_")[index];
+			else
+				return "";
+		}
+
 		anchors.fill: parent
 		spacing: 2
 		Rectangle
 		{
+			id: firstCol;
 			color: "#f7f7f7"
 			Layout.fillWidth: true
 			Layout.minimumWidth: 35
@@ -21,8 +31,8 @@ Rectangle {
 				anchors.centerIn: parent
 				anchors.leftMargin: 5
 				color: "#8b8b8b"
-				text: modelData.split("_separator_")[0]
-				font.pointSize: 9
+				text: row.formatData(modelData, 0)
+				font.pointSize: 9;
 			}
 
 		}
@@ -38,7 +48,7 @@ Rectangle {
 				anchors.left: parent.left
 				anchors.verticalCenter: parent.verticalCenter
 				color: "#8b8b8b"
-				text: modelData.split("_separator_")[1]
+				text: row.formatData(modelData, 1)
 				font.pointSize: 9
 			}
 		}
@@ -53,7 +63,7 @@ Rectangle {
 				anchors.verticalCenter: parent.verticalCenter
 				color: "#ededed"
 				font.bold: true
-				text: modelData.split("_separator_")[2]
+				text: row.formatData(modelData, 2)
 				font.pointSize: 10
 			}
 		}
diff --git a/mix/qml/MainContent.qml b/mix/qml/MainContent.qml
index b80e5bc53..568fd7d0d 100644
--- a/mix/qml/MainContent.qml
+++ b/mix/qml/MainContent.qml
@@ -25,25 +25,19 @@ Rectangle {
 			debugModel.updateDebugPanel();
 		}
 		else
-		{
 			rightView.hide();
-		}
 	}
 
 	function ensureRightView()
 	{
 		if (!rightView.visible)
-		{
 			rightView.show();
-		}
 	}
 
 	function hideRightView()
 	{
 		if (rightView.visible)
-		{
 			rightView.hide();
-		}
 	}
 
 	CodeEditorExtensionManager {
@@ -86,47 +80,6 @@ Rectangle {
 					}
 				}
 			}
-
-			Rectangle
-			{
-				color: "transparent"
-				width: 100
-				height: parent.height
-				anchors.top: headerView.top
-				anchors.right: headerView.right
-				RowLayout
-				{
-					anchors.fill: parent
-					Rectangle {
-						color: "transparent"
-						anchors.fill: parent
-						Button
-						{
-							anchors.right: parent.right
-							anchors.rightMargin: 15
-							anchors.verticalCenter: parent.verticalCenter
-							id: debugImg
-							iconSource: "qrc:/qml/img/bugiconinactive.png"
-							action: debugRunActionIcon
-						}
-						Action {
-							id: debugRunActionIcon
-							shortcut: "F5"
-							onTriggered: {
-								mainContent.ensureRightView();
-								debugModel.debugDeployment();
-							}
-							enabled: codeModel.hasContract && !debugModel.running;
-							onEnabledChanged: {
-								if (enabled)
-									debugImg.iconSource = "qrc:/qml/img/bugiconactive.png"
-								else
-									debugImg.iconSource = "qrc:/qml/img/bugiconinactive.png"
-							}
-						}
-					}
-				}
-			}
 		}
 
 		SplitView {
@@ -188,7 +141,6 @@ Rectangle {
 						font.family: "Monospace"
 						font.pointSize: 12
 						width: parent.width
-						//anchors.centerIn: parent
 						tabChangesFocus: false
 						Keys.onPressed: {
 							if (event.key === Qt.Key_Tab) {
@@ -201,13 +153,16 @@ Rectangle {
 			}
 
 			Rectangle {
+				visible: false;
+				id: rightView;
+
 				Keys.onEscapePressed:
 				{
 					hide();
 				}
-				visible: false;
-				id: rightView;
+
 				property real panelRelWidth: 0.38
+
 				function show() {
 					visible = true;
 					contentView.width = parent.width * (1 - 0.38)
@@ -231,12 +186,10 @@ Rectangle {
 						anchors.fill: parent
 						style: TabViewStyle {
 							frameOverlap: 1
-
 							tabBar:
 								Rectangle {
 									color: "#ededed"
 									id: background
-
 								}
 							tab: Rectangle {
 								color: "#ededed"
diff --git a/mix/qml/StatusPane.qml b/mix/qml/StatusPane.qml
index 0a828a0d0..36820a6e6 100644
--- a/mix/qml/StatusPane.qml
+++ b/mix/qml/StatusPane.qml
@@ -4,9 +4,10 @@ import QtQuick.Layouts 1.1
 import "js/ErrorLocationFormater.js" as ErrorLocationFormater
 
 Rectangle {
-	id: constantCompilationStatus
+	id: statusHeader
 	objectName: "statusPane"
-	function update()
+
+	function updateStatus()
 	{
 		if (statusPane.result.successfull)
 		{
@@ -23,7 +24,9 @@ Rectangle {
 			status.text = errorInfo.errorLocation + " " + errorInfo.errorDetail;
 			logslink.visible = true;
 		}
+		debugRunActionIcon.enabled = statusPane.result.successfull;
 	}
+
 	color: "transparent"
 	anchors.fill: parent
 	Rectangle {
@@ -93,4 +96,45 @@ Rectangle {
 			}
 		}
 	}
+
+	Rectangle
+	{
+		color: "transparent"
+		width: 100
+		height: parent.height
+		anchors.top: statusHeader.top
+		anchors.right: statusHeader.right
+		RowLayout
+		{
+			anchors.fill: parent
+			Rectangle {
+				color: "transparent"
+				anchors.fill: parent
+				Button
+				{
+					anchors.right: parent.right
+					anchors.rightMargin: 15
+					anchors.verticalCenter: parent.verticalCenter
+					id: debugImg
+					iconSource: "qrc:/qml/img/bugiconinactive.png"
+					action: debugRunActionIcon
+				}
+				Action {
+					id: debugRunActionIcon
+					onTriggered: {
+						mainContent.ensureRightView();
+						debugModel.debugDeployment();
+					}
+					enabled: false
+					onEnabledChanged: {
+						console.log(debugRunActionIcon.enabled)
+						if (debugRunActionIcon.enabled)
+							debugImg.iconSource = "qrc:/qml/img/bugiconactive.png"
+						else
+							debugImg.iconSource = "qrc:/qml/img/bugiconinactive.png"
+					}
+				}
+			}
+		}
+	}
 }
diff --git a/mix/qml/StepActionImage.qml b/mix/qml/StepActionImage.qml
index 13a8968a0..bd39d7959 100644
--- a/mix/qml/StepActionImage.qml
+++ b/mix/qml/StepActionImage.qml
@@ -9,6 +9,16 @@ Rectangle {
 	property string disableStateImg
 	property string enabledStateImg
 	signal clicked
+
+	function enabled(state)
+	{
+		buttonAction.enabled = state;
+		if (state)
+			debugImg.iconSource = enabledStateImg;
+		else
+			debugImg.iconSource = disableStateImg;
+	}
+
 	width: 15
 	height: 15
 	color: "transparent"
@@ -34,12 +44,5 @@ Rectangle {
 		onTriggered: {
 			buttonActionContainer.clicked();
 		}
-		enabled: codeModel.hasContract && !debugModel.running;
-		onEnabledChanged: {
-			if (enabled)
-				iconSource = enabledStateImg
-			else
-				iconSource = disableStateImg
-		}
 	}
 }
diff --git a/mix/qml/js/Debugger.js b/mix/qml/js/Debugger.js
index 7fb840fab..ebdd77873 100644
--- a/mix/qml/js/Debugger.js
+++ b/mix/qml/js/Debugger.js
@@ -17,11 +17,10 @@ function init()
 	select(currentSelectedState);
 	//displayReturnValue();
 
-	jumpoutbackaction.state = "disabled";
-	jumpintobackaction.state = "disabled";
-	jumpintoforwardaction.state = "disabled"
-	jumpoutforwardaction.state = "disabled"
-
+	jumpoutbackaction.enabled(false);
+	jumpintobackaction.enabled(false);
+	jumpintoforwardaction.enabled(false);
+	jumpoutforwardaction.enabled(false);
 }
 
 function moveSelection(incr)
@@ -29,13 +28,8 @@ function moveSelection(incr)
 	if (currentSelectedState + incr >= 0)
 	{
 		if (currentSelectedState + incr < debugStates.length)
-		{
 			select(currentSelectedState + incr);
-		}
-		else
-		{
-			//endOfDebug();
-		}
+
 		statesSlider.value = currentSelectedState;
 	}
 }
@@ -47,18 +41,16 @@ function select(stateIndex)
 	highlightSelection(codeLine);
 	currentSelectedState = stateIndex;
 	completeCtxInformation(state);
-	//levelList.model = state.levels;
-	//levelList.update();
 
 	if (state.instruction === "JUMP")
-		jumpintoforwardaction.state = "";
+		jumpintoforwardaction.enabled(true);
 	else
-		jumpintoforwardaction.state = "disabled";
+		jumpintoforwardaction.enabled(false);
 
 	if (state.instruction === "JUMPDEST")
-		jumpintobackaction.state = "";
+		jumpintobackaction.enabled(true);
 	else
-		jumpintobackaction.state = "disabled";
+		jumpintobackaction.enabled(false);
 }
 
 function codeStr(stateIndex)
@@ -78,23 +70,13 @@ function completeCtxInformation(state)
 	basicInfo.mem = state.newMemSize + " " + qsTr("words");
 	basicInfo.stepCost = state.gasCost;
 	basicInfo.gasSpent = debugStates[0].gas - state.gas;
-	// This is available in all editors.
+
 	stack.listModel = state.debugStack;
 	storage.listModel = state.debugStorage;
 	memoryDump.listModel = state.debugMemory;
 	callDataDump.listModel = state.debugCallData;
 }
 
-function endOfDebug()
-{
-	var state = debugStates[debugStates.length - 1];
-	debugStorageTxt.text = "";
-	debugCallDataTxt.text = "";
-	debugStackTxt.text = "";
-	debugMemoryTxt.text = state.endOfDebug;
-	headerInfoLabel.text = "EXIT  |  GAS: " + state.gasLeft;
-}
-
 function displayReturnValue()
 {
 	headerReturnList.model = contractCallReturnParameters;
@@ -107,8 +89,8 @@ function stepOutBack()
 	{
 		select(jumpStartingPoint);
 		jumpStartingPoint = null;
-		jumpoutbackaction.state = "disabled";
-		jumpoutforwardaction.state = "disabled";
+		jumpoutbackaction.enabled(false);
+		jumpoutforwardaction.enabled(false);
 	}
 }
 
@@ -162,8 +144,8 @@ function stepIntoForward()
 	{
 		jumpStartingPoint = currentSelectedState;
 		moveSelection(1);
-		jumpoutbackaction.state = "";
-		jumpoutforwardaction.state = "";
+		jumpoutbackaction.enabled(true);
+		jumpoutforwardaction.enabled(true);
 	}
 }
 
@@ -173,8 +155,8 @@ function stepOutForward()
 	{
 		stepOutBack();
 		stepOverForward();
-		jumpoutbackaction.state = "disabled";
-		jumpoutforwardaction.state = "disabled";
+		jumpoutbackaction.enabled(false);
+		jumpoutforwardaction.enabled(false);
 	}
 }
 

From e0c5cfae5c67da274aea700adf83df8f1ff20c86 Mon Sep 17 00:00:00 2001
From: yann300 
Date: Mon, 12 Jan 2015 16:25:07 +0100
Subject: [PATCH 07/12] add DebugInfoList.qml

---
 mix/qml/DebugInfoList.qml | 83 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)
 create mode 100644 mix/qml/DebugInfoList.qml

diff --git a/mix/qml/DebugInfoList.qml b/mix/qml/DebugInfoList.qml
new file mode 100644
index 000000000..6f65cc30d
--- /dev/null
+++ b/mix/qml/DebugInfoList.qml
@@ -0,0 +1,83 @@
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.0
+import QtQuick.Controls.Styles 1.1
+
+ColumnLayout {
+	property string title
+	property variant listModel;
+	property bool collapsible;
+	property Component itemDelegate
+	spacing: 0
+	RowLayout {
+		height: 25
+		id: header
+		Image {
+			source: "qrc:/qml/img/opentriangleindicator.png"
+			width: 15
+			sourceSize.width: 15
+			id: storageImgArrow
+			visible: collapsible
+		}
+
+		Text {
+			anchors.left: storageImgArrow.right
+			color: "#8b8b8b"
+			text: title
+			id: storageListTitle
+		}
+
+		MouseArea
+		{
+			enabled: collapsible
+			anchors.fill: parent
+			onClicked: {
+				if (storageContainer.state == "collapsed")
+					storageContainer.state = "";
+				else
+					storageContainer.state = "collapsed";
+			}
+		}
+	}
+
+	RowLayout
+	{
+		height: parent.height - header.height
+		clip: true
+		Rectangle
+		{
+			height: parent.height
+			border.width: 3
+			border.color: "#deddd9"
+			Layout.fillWidth: true
+			states: [
+				State {
+					name: "collapsed"
+					PropertyChanges {
+						target: storageContainer.parent
+						height: 0
+						visible: false
+					}
+					PropertyChanges {
+						target: storageImgArrow
+						source: "qrc:/qml/img/closedtriangleindicator.png"
+					}
+				}
+			]
+			id: storageContainer
+			width: parent.width
+			ListView {
+				clip: true;
+				anchors.top: parent.top
+				anchors.left: parent.left
+				anchors.topMargin: 3
+				anchors.leftMargin: 3
+				width: parent.width - 3
+				height: parent.height - 6
+				id: storageList
+				model: listModel
+				delegate: itemDelegate
+			}
+		}
+	}
+}

From fc09c2692b3db631a952a4f16813d2ce954994ac Mon Sep 17 00:00:00 2001
From: yann300 
Date: Tue, 13 Jan 2015 13:54:20 +0100
Subject: [PATCH 08/12]  - small UI changes.  - change on
 DebuggingStateWrapper::fillList

---
 mix/DebuggingStateWrapper.cpp    |   2 +-
 mix/DebuggingStateWrapper.h      |   2 +-
 mix/qml/Debugger.qml             | 114 ++++++++++++++++---------------
 mix/qml/ItemDelegateDataDump.qml |   3 +-
 mix/qml/MainContent.qml          |  17 ++---
 mix/qml/StatusPane.qml           |   4 +-
 mix/qml/StepActionImage.qml      |  16 ++---
 7 files changed, 74 insertions(+), 84 deletions(-)

diff --git a/mix/DebuggingStateWrapper.cpp b/mix/DebuggingStateWrapper.cpp
index 6c5a9b047..87c040a35 100644
--- a/mix/DebuggingStateWrapper.cpp
+++ b/mix/DebuggingStateWrapper.cpp
@@ -121,7 +121,7 @@ QStringList DebuggingStateWrapper::debugCallData()
 	return fillList(re, " ");
 }
 
-QStringList DebuggingStateWrapper::fillList(QStringList _list, QString _emptyValue)
+QStringList DebuggingStateWrapper::fillList(QStringList& _list, QString const& _emptyValue)
 {
 	if (_list.size() < 20)
 	{
diff --git a/mix/DebuggingStateWrapper.h b/mix/DebuggingStateWrapper.h
index 931aac284..8a34c252a 100644
--- a/mix/DebuggingStateWrapper.h
+++ b/mix/DebuggingStateWrapper.h
@@ -134,7 +134,7 @@ private:
 	MachineState m_state;
 	bytes m_code;
 	bytes m_data;
-	QStringList fillList(QStringList _list, QString _emptyValue);
+	QStringList fillList(QStringList& _list, QString const& _emptyValue);
 };
 
 }
diff --git a/mix/qml/Debugger.qml b/mix/qml/Debugger.qml
index c0a1dc4ba..f5e41a605 100644
--- a/mix/qml/Debugger.qml
+++ b/mix/qml/Debugger.qml
@@ -101,6 +101,8 @@ Rectangle {
 
 
 	Flickable {
+		property int firstColumnWidth: 170
+		property int secondColumnWidth: 250
 		id: debugScrollArea
 		flickableDirection: Flickable.VerticalFlick
 		anchors.fill: parent
@@ -121,74 +123,76 @@ Rectangle {
 			rowSpacing: 15
 			RowLayout {
 				// step button + slider
-				spacing: 10
+				spacing: machineStates.sideMargin
 				height: 27
 				width: debugPanel.width
-				RowLayout {
-					id: jumpButtons
-					spacing: 15
-					width: 250
+				Rectangle
+				{
 					height: parent.height
+					color: "transparent"
+					width: debugScrollArea.firstColumnWidth
+					RowLayout {
+						anchors.horizontalCenter: parent.horizontalCenter
+						id: jumpButtons
+						spacing: 3
+						StepActionImage
+						{
+							id: jumpoutbackaction;
+							enabledStateImg: "qrc:/qml/img/jumpoutback.png"
+							disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png"
+							onClicked: Debugger.stepOutBack()
+						}
 
-					StepActionImage
-					{
-						id: jumpoutbackaction;
-						enabledStateImg: "qrc:/qml/img/jumpoutback.png"
-						disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png"
-						onClicked: Debugger.stepOutBack()
-					}
-
-					StepActionImage
-					{
-						id: jumpintobackaction
-						enabledStateImg: "qrc:/qml/img/jumpintoback.png"
-						disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png"
-						onClicked: Debugger.stepIntoBack()
-					}
+						StepActionImage
+						{
+							id: jumpintobackaction
+							enabledStateImg: "qrc:/qml/img/jumpintoback.png"
+							disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png"
+							onClicked: Debugger.stepIntoBack()
+						}
 
-					StepActionImage
-					{
-						id: jumpoverbackaction
-						enabledStateImg: "qrc:/qml/img/jumpoverback.png"
-						disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png"
-						onClicked: Debugger.stepOverBack()
-					}
+						StepActionImage
+						{
+							id: jumpoverbackaction
+							enabledStateImg: "qrc:/qml/img/jumpoverback.png"
+							disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png"
+							onClicked: Debugger.stepOverBack()
+						}
 
-					StepActionImage
-					{
-						id: jumpoverforwardaction
-						enabledStateImg: "qrc:/qml/img/jumpoverforward.png"
-						disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png"
-						onClicked: Debugger.stepOverForward()
-					}
+						StepActionImage
+						{
+							id: jumpoverforwardaction
+							enabledStateImg: "qrc:/qml/img/jumpoverforward.png"
+							disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png"
+							onClicked: Debugger.stepOverForward()
+						}
 
-					StepActionImage
-					{
-						id: jumpintoforwardaction
-						enabledStateImg: "qrc:/qml/img/jumpintoforward.png"
-						disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png"
-						onClicked: Debugger.stepIntoForward()
-					}
+						StepActionImage
+						{
+							id: jumpintoforwardaction
+							enabledStateImg: "qrc:/qml/img/jumpintoforward.png"
+							disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png"
+							onClicked: Debugger.stepIntoForward()
+						}
 
-					StepActionImage
-					{
-						id: jumpoutforwardaction
-						enabledStateImg: "qrc:/qml/img/jumpoutforward.png"
-						disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png"
-						onClicked: Debugger.stepOutForward()
+						StepActionImage
+						{
+							id: jumpoutforwardaction
+							enabledStateImg: "qrc:/qml/img/jumpoutforward.png"
+							disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png"
+							onClicked: Debugger.stepOutForward()
+						}
 					}
 				}
-
 				Rectangle {
 					color: "transparent"
-					width: 250
+					width: debugScrollArea.secondColumnWidth
 					height: parent.height
 					Slider {
 						id: statesSlider
 						anchors.fill: parent
 						tickmarksEnabled: true
 						stepSize: 1.0
-						height: parent.height
 						onValueChanged: Debugger.jumpTo(value);
 						style: SliderStyle {
 							groove: Rectangle {
@@ -214,11 +218,11 @@ Rectangle {
 				// Assembly code
 				width: debugPanel.width
 				height: 405
-				spacing: 10
+				spacing: machineStates.sideMargin
 
 				Rectangle
 				{
-					width: 170
+					width: debugScrollArea.firstColumnWidth
 					height: parent.height
 					border.width: 3
 					border.color: "#deddd9"
@@ -243,7 +247,7 @@ Rectangle {
 							radius: 4
 							height: statesList.currentItem.height
 							width: statesList.currentItem.width;
-							color: "#4b8fe2"
+							color: "#4A90E2"
 							Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } }
 						}
 					}
@@ -277,7 +281,7 @@ Rectangle {
 				}
 
 				ColumnLayout {
-					width: 250
+					width: debugScrollArea.secondColumnWidth
 					height: parent.height
 					Rectangle {
 						// Info
@@ -458,8 +462,6 @@ Rectangle {
 				radius: 3
 			}
 
-
-
 			DebugInfoList {
 				id: memoryDump
 				width: debugPanel.width - 2 * machineStates.sideMargin
diff --git a/mix/qml/ItemDelegateDataDump.qml b/mix/qml/ItemDelegateDataDump.qml
index fefd482f9..c36859094 100644
--- a/mix/qml/ItemDelegateDataDump.qml
+++ b/mix/qml/ItemDelegateDataDump.qml
@@ -34,8 +34,8 @@ Rectangle {
 				text: row.formatData(modelData, 0)
 				font.pointSize: 9;
 			}
-
 		}
+
 		Rectangle
 		{
 			anchors.left: firstCol.right
@@ -46,6 +46,7 @@ Rectangle {
 			Layout.minimumHeight: parent.height
 			Text {
 				anchors.left: parent.left
+				anchors.leftMargin: 7
 				anchors.verticalCenter: parent.verticalCenter
 				color: "#8b8b8b"
 				text: row.formatData(modelData, 1)
diff --git a/mix/qml/MainContent.qml b/mix/qml/MainContent.qml
index 75c93034c..2b0b50ce5 100644
--- a/mix/qml/MainContent.qml
+++ b/mix/qml/MainContent.qml
@@ -86,16 +86,15 @@ Rectangle {
 			Layout.preferredHeight: root.height - headerView.height;
 
 			ProjectList	{
-				width: parent.width * 0.2
+				id: projectList
+				width: 200
 				height: parent.height
 				Layout.minimumWidth: 200
 			}
 
 			Rectangle {
-
-				anchors.top: parent.top
 				id: contentView
-				width: parent.width
+				width: parent.width - projectList.width
 				height: parent.height
 				CodeEditorView {
 								height: parent.height
@@ -113,21 +112,19 @@ Rectangle {
 					hide();
 				}
 
-				property real panelRelWidth: 0.38
-
 				function show() {
 					visible = true;
-					contentView.width = parent.width * (1 - 0.38)
+					contentView.width = parent.width - projectList.width - rightView.width;
 				}
 
 				function hide() {
 					visible = false;
-					contentView.width = parent.width;
+					contentView.width = parent.width - projectList.width;
 				}
 
 				height: parent.height;
-				width: Layout.minimumWidth
-				Layout.minimumWidth: parent.width * 0.38
+				width: 450
+				Layout.minimumWidth: 450
 				Rectangle {
 					anchors.fill: parent;
 					id: rightPaneView
diff --git a/mix/qml/StatusPane.qml b/mix/qml/StatusPane.qml
index e40c1101a..3dd5e1850 100644
--- a/mix/qml/StatusPane.qml
+++ b/mix/qml/StatusPane.qml
@@ -90,8 +90,6 @@ Rectangle {
 					anchors.fill: parent
 					onClicked: {
 						mainContent.ensureRightView();
-						//clientModel.showDebugger();
-						//debugModel.updateDebugPanel();
 					}
 				}
 			}
@@ -114,7 +112,7 @@ Rectangle {
 				Button
 				{
 					anchors.right: parent.right
-					anchors.rightMargin: 15
+					anchors.rightMargin: 7
 					anchors.verticalCenter: parent.verticalCenter
 					id: debugImg
 					iconSource: "qrc:/qml/img/bugiconinactive.png"
diff --git a/mix/qml/StepActionImage.qml b/mix/qml/StepActionImage.qml
index bd39d7959..238c9ecb4 100644
--- a/mix/qml/StepActionImage.qml
+++ b/mix/qml/StepActionImage.qml
@@ -19,8 +19,8 @@ Rectangle {
 			debugImg.iconSource = disableStateImg;
 	}
 
-	width: 15
-	height: 15
+	width: debugImg.width + 4
+	height: debugImg.height
 	color: "transparent"
 	Button
 	{
@@ -28,16 +28,8 @@ Rectangle {
 		id: debugImg
 		iconSource: enabledStateImg
 		action: buttonAction
-		style: ButtonStyle {
-			background: Component {
-				Rectangle {
-					color: "transparent"
-					border.width: 0
-					width: 15
-					height: 15
-				}
-			}
-		}
+		width: 17
+		height: 27
 	}
 	Action {
 		id: buttonAction

From 6845bb908ee2f45e26245f267c57c3d9b040a2af Mon Sep 17 00:00:00 2001
From: yann300 
Date: Tue, 13 Jan 2015 16:58:53 +0100
Subject: [PATCH 09/12]  - store memory dump in list instead of raw string, use
 the list as QML model.  - UI: layout of step button.

---
 libdevcore/CommonIO.cpp            | 43 ++++++++++++++++++++++++++--
 libdevcore/CommonIO.h              |  4 ++-
 mix/AssemblyDebuggerControl.cpp    | 11 --------
 mix/CodeEditorExtensionManager.cpp |  1 -
 mix/DebuggingStateWrapper.cpp      | 45 +++++++++++++++++++++++++-----
 mix/DebuggingStateWrapper.h        | 10 ++++---
 mix/qml/CodeEditor.qml             |  1 -
 mix/qml/CodeEditorView.qml         |  1 -
 mix/qml/Debugger.qml               | 12 ++++++++
 mix/qml/ItemDelegateDataDump.qml   | 14 ++--------
 mix/qml/StepActionImage.qml        |  7 ++---
 11 files changed, 105 insertions(+), 44 deletions(-)

diff --git a/libdevcore/CommonIO.cpp b/libdevcore/CommonIO.cpp
index 366601a27..4f02ea3f7 100644
--- a/libdevcore/CommonIO.cpp
+++ b/libdevcore/CommonIO.cpp
@@ -26,14 +26,51 @@
 using namespace std;
 using namespace dev;
 
-string dev::memDump(bytes const& _b, unsigned _w, bool _html, string _separator)
+std::list> dev::memDumpToList(bytes const& _b, unsigned _w)
+{
+	std::list> dump;
+	for (unsigned i = 0; i < _b.size(); i += _w)
+	{
+		stringstream ret;
+		std::list dumpLine;
+		ret << hex << setw(4) << setfill('0') << i << " ";
+		dumpLine.push_back(ret.str());
+		ret.str(std::string());
+		ret.clear();
+
+		for (unsigned j = i; j < i + _w; ++j)
+			if (j < _b.size())
+				if (_b[j] >= 32 && _b[j] < 127)
+					if ((char)_b[j] == '<')
+						ret << "<";
+					else if ((char)_b[j] == '&')
+						ret << "&";
+					else
+						ret << (char)_b[j];
+				else
+					ret << '?';
+			else
+				ret << ' ';
+		dumpLine.push_back(ret.str());
+		ret.str(std::string());
+		ret.clear();
+
+		for (unsigned j = i; j < i + _w && j < _b.size(); ++j)
+			ret << setfill('0') << setw(2) << hex << (unsigned)_b[j] << " ";
+		dumpLine.push_back(ret.str());
+		dump.push_back(dumpLine);
+	}
+	return dump;
+}
+
+string dev::memDump(bytes const& _b, unsigned _w, bool _html)
 {
 	stringstream ret;
 	if (_html)
 		ret << "
";
 	for (unsigned i = 0; i < _b.size(); i += _w)
 	{
-		ret << hex << setw(4) << setfill('0') << i << _separator;
+		ret << hex << setw(4) << setfill('0') << i << " ";
 		for (unsigned j = i; j < i + _w; ++j)
 			if (j < _b.size())
 				if (_b[j] >= 32 && _b[j] < 127)
@@ -47,7 +84,7 @@ string dev::memDump(bytes const& _b, unsigned _w, bool _html, string _separator)
 					ret << '?';
 			else
 				ret << ' ';
-		ret << _separator;
+		ret << " ";
 		for (unsigned j = i; j < i + _w && j < _b.size(); ++j)
 			ret << setfill('0') << setw(2) << hex << (unsigned)_b[j] << " ";
 		ret << "\n";
diff --git a/libdevcore/CommonIO.h b/libdevcore/CommonIO.h
index faf8e0886..1223646f6 100644
--- a/libdevcore/CommonIO.h
+++ b/libdevcore/CommonIO.h
@@ -47,7 +47,9 @@ bytes contents(std::string const& _file);
 void writeFile(std::string const& _file, bytes const& _data);
 
 /// Nicely renders the given bytes to a string, optionally as HTML.
-std::string memDump(bytes const& _b, unsigned _w = 8, bool _html = false, std::string _separator = " ");
+std::string memDump(bytes const& _b, unsigned _w = 8, bool _html = false);
+/// Nicely renders the given bytes to a string, store the content in an array.
+std::list> memDumpToList(bytes const& _b, unsigned _w);
 
 // Stream I/O functions.
 // Provides templated stream I/O for all STL collections so they can be shifted on to any iostream-like interface.
diff --git a/mix/AssemblyDebuggerControl.cpp b/mix/AssemblyDebuggerControl.cpp
index a3553043d..f68ddc792 100644
--- a/mix/AssemblyDebuggerControl.cpp
+++ b/mix/AssemblyDebuggerControl.cpp
@@ -29,17 +29,6 @@ using namespace dev::mix;
 AssemblyDebuggerControl::AssemblyDebuggerControl(AppContext* _context):
 	Extension(_context, ExtensionDisplayBehavior::RightView)
 {
-	/*
-	qRegisterMetaType("QVariableDefinition*");
-	qRegisterMetaType("QVariableDefinitionList*");
-	qRegisterMetaType>("QList");
-	qRegisterMetaType>("QList");
-	qRegisterMetaType("QVariableDeclaration*");
-	qRegisterMetaType("AssemblyDebuggerData");
-	connect(this, &AssemblyDebuggerControl::dataAvailable, this, &AssemblyDebuggerControl::showDebugger, Qt::QueuedConnection);
-	m_modelDebugger = std::unique_ptr(new AssemblyDebuggerModel);
-	_context->appEngine()->rootContext()->setContextProperty("debugModel", this);*/
-
 	connect(_context->clientModel(), &ClientModel::showDebuggerWindow, this, &AssemblyDebuggerControl::showDebugger, Qt::QueuedConnection);
 }
 
diff --git a/mix/CodeEditorExtensionManager.cpp b/mix/CodeEditorExtensionManager.cpp
index f47dcf4ed..2b1f03ff4 100644
--- a/mix/CodeEditorExtensionManager.cpp
+++ b/mix/CodeEditorExtensionManager.cpp
@@ -59,7 +59,6 @@ void CodeEditorExtensionManager::initExtensions()
 	std::shared_ptr output = std::make_shared(m_appContext);
 	std::shared_ptr debug = std::make_shared(m_appContext);
 	std::shared_ptr stateList = std::make_shared(m_appContext);
-	//QObject::connect(m_appContext->clientModel(), &ClientModel::runFailed, output.get(), &sta::displayError);
 	QObject::connect(m_appContext->codeModel(), &CodeModel::compilationComplete, this, &CodeEditorExtensionManager::applyCodeHighlight);
 
 	initExtension(output);
diff --git a/mix/DebuggingStateWrapper.cpp b/mix/DebuggingStateWrapper.cpp
index 87c040a35..732934659 100644
--- a/mix/DebuggingStateWrapper.cpp
+++ b/mix/DebuggingStateWrapper.cpp
@@ -108,17 +108,37 @@ QStringList DebuggingStateWrapper::debugStorage()
 	return fillList(storage, "@ -");
 }
 
-QStringList DebuggingStateWrapper::debugMemory()
+QVariantList DebuggingStateWrapper::debugMemory()
 {
-	QStringList re = QString::fromStdString(memDump(m_state.memory, 16, false, "_separator_")).split('\n');
-	return fillList(re, " ");
+	std::list> dump = memDumpToList(m_state.memory, 16);
+	QStringList filled;
+	filled.append(" ");
+	filled.append(" ");
+	filled.append(" ");
+	return fillList(qVariantDump(dump), QVariant(filled));
 }
 
-QStringList DebuggingStateWrapper::debugCallData()
+QVariantList DebuggingStateWrapper::debugCallData()
 {
-	qDebug() << QString::fromStdString(memDump(m_data, 16, false, "_separator_"));
-	QStringList re = QString::fromStdString(memDump(m_data, 16, false, "_separator_")).split('\n');
-	return fillList(re, " ");
+	std::list> dump = memDumpToList(m_data, 16);
+	QStringList filled;
+	filled.append(" ");
+	filled.append(" ");
+	filled.append(" ");
+	return fillList(qVariantDump(dump), QVariant(filled));
+}
+
+QVariantList DebuggingStateWrapper::qVariantDump(std::list> const& dump)
+{
+	QVariantList ret;
+	for (std::list line: dump)
+	{
+		QStringList qLine;
+		for (std::string cell: line)
+			qLine.push_back(QString::fromStdString(cell));
+		ret.append(QVariant(qLine));
+	}
+	return ret;
 }
 
 QStringList DebuggingStateWrapper::fillList(QStringList& _list, QString const& _emptyValue)
@@ -131,6 +151,17 @@ QStringList DebuggingStateWrapper::fillList(QStringList& _list, QString const& _
 	return _list;
 }
 
+QVariantList DebuggingStateWrapper::fillList(QVariantList _list, QVariant const& _emptyValue)
+{
+	if (_list.size() < 20)
+	{
+		for (int k = _list.size(); k < 20 - _list.size(); k++)
+			_list.append(_emptyValue);
+	}
+	return _list;
+}
+
+
 QStringList DebuggingStateWrapper::levels()
 {
 	QStringList levelsStr;
diff --git a/mix/DebuggingStateWrapper.h b/mix/DebuggingStateWrapper.h
index 8a34c252a..32bc3b9c8 100644
--- a/mix/DebuggingStateWrapper.h
+++ b/mix/DebuggingStateWrapper.h
@@ -86,8 +86,8 @@ class DebuggingStateWrapper: public QObject
 	Q_PROPERTY(QString instruction READ instruction CONSTANT)
 	Q_PROPERTY(QStringList debugStack READ debugStack CONSTANT)
 	Q_PROPERTY(QStringList debugStorage READ debugStorage CONSTANT)
-	Q_PROPERTY(QStringList debugMemory READ debugMemory CONSTANT)
-	Q_PROPERTY(QStringList debugCallData READ debugCallData CONSTANT)
+	Q_PROPERTY(QVariantList debugMemory READ debugMemory CONSTANT)
+	Q_PROPERTY(QVariantList debugCallData READ debugCallData CONSTANT)
 	Q_PROPERTY(QString headerInfo READ headerInfo CONSTANT)
 	Q_PROPERTY(QString endOfDebug READ endOfDebug CONSTANT)
 	Q_PROPERTY(QString newMemSize READ newMemSize CONSTANT)
@@ -110,9 +110,9 @@ public:
 	/// Get storage.
 	QStringList debugStorage();
 	/// Get memory.
-	QStringList debugMemory();
+	QVariantList debugMemory();
 	/// Get call data.
-	QStringList debugCallData();
+	QVariantList debugCallData();
 	/// Get info to be displayed in the header.
 	QString headerInfo();
 	/// get end of debug information.
@@ -135,6 +135,8 @@ private:
 	bytes m_code;
 	bytes m_data;
 	QStringList fillList(QStringList& _list, QString const& _emptyValue);
+	QVariantList fillList(QVariantList _list, QVariant const& _emptyValue);
+	QVariantList qVariantDump(std::list> const& dump);
 };
 
 }
diff --git a/mix/qml/CodeEditor.qml b/mix/qml/CodeEditor.qml
index 78b44074b..77e60ee66 100644
--- a/mix/qml/CodeEditor.qml
+++ b/mix/qml/CodeEditor.qml
@@ -73,7 +73,6 @@ Component {
 				}
 			}
 			onTextChanged: {
-				console.log("textchange")
 				editorTextChanged();
 			}
 
diff --git a/mix/qml/CodeEditorView.qml b/mix/qml/CodeEditorView.qml
index 3fce9aec6..4e95bd49c 100644
--- a/mix/qml/CodeEditorView.qml
+++ b/mix/qml/CodeEditorView.qml
@@ -32,7 +32,6 @@ Item {
 
 	function doLoadDocument(editor, document) {
 		var data = fileIo.readFile(document.path);
-		console.log(document.isContract)
 		if (document.isContract)
 			editor.onEditorTextChanged.connect(function() {
 				codeModel.registerCodeChange(editor.getText());
diff --git a/mix/qml/Debugger.qml b/mix/qml/Debugger.qml
index f5e41a605..e8177c8c6 100644
--- a/mix/qml/Debugger.qml
+++ b/mix/qml/Debugger.qml
@@ -141,6 +141,8 @@ Rectangle {
 							enabledStateImg: "qrc:/qml/img/jumpoutback.png"
 							disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png"
 							onClicked: Debugger.stepOutBack()
+							width: 25
+							height: 27
 						}
 
 						StepActionImage
@@ -149,6 +151,8 @@ Rectangle {
 							enabledStateImg: "qrc:/qml/img/jumpintoback.png"
 							disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png"
 							onClicked: Debugger.stepIntoBack()
+							width: 25
+							height: 27
 						}
 
 						StepActionImage
@@ -157,6 +161,8 @@ Rectangle {
 							enabledStateImg: "qrc:/qml/img/jumpoverback.png"
 							disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png"
 							onClicked: Debugger.stepOverBack()
+							width: 25
+							height: 27
 						}
 
 						StepActionImage
@@ -165,6 +171,8 @@ Rectangle {
 							enabledStateImg: "qrc:/qml/img/jumpoverforward.png"
 							disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png"
 							onClicked: Debugger.stepOverForward()
+							width: 25
+							height: 27
 						}
 
 						StepActionImage
@@ -173,6 +181,8 @@ Rectangle {
 							enabledStateImg: "qrc:/qml/img/jumpintoforward.png"
 							disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png"
 							onClicked: Debugger.stepIntoForward()
+							width: 25
+							height: 27
 						}
 
 						StepActionImage
@@ -181,6 +191,8 @@ Rectangle {
 							enabledStateImg: "qrc:/qml/img/jumpoutforward.png"
 							disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png"
 							onClicked: Debugger.stepOutForward()
+							width: 25
+							height: 27
 						}
 					}
 				}
diff --git a/mix/qml/ItemDelegateDataDump.qml b/mix/qml/ItemDelegateDataDump.qml
index c36859094..d8513ac20 100644
--- a/mix/qml/ItemDelegateDataDump.qml
+++ b/mix/qml/ItemDelegateDataDump.qml
@@ -8,14 +8,6 @@ Rectangle {
 	RowLayout
 	{
 		id: row;
-		function formatData(data, index)
-		{
-			if (data.indexOf("_separator_") !== -1)
-				return modelData.split("_separator_")[index];
-			else
-				return "";
-		}
-
 		anchors.fill: parent
 		spacing: 2
 		Rectangle
@@ -31,7 +23,7 @@ Rectangle {
 				anchors.centerIn: parent
 				anchors.leftMargin: 5
 				color: "#8b8b8b"
-				text: row.formatData(modelData, 0)
+				text: modelData[0]
 				font.pointSize: 9;
 			}
 		}
@@ -49,7 +41,7 @@ Rectangle {
 				anchors.leftMargin: 7
 				anchors.verticalCenter: parent.verticalCenter
 				color: "#8b8b8b"
-				text: row.formatData(modelData, 1)
+				text: modelData[1]
 				font.pointSize: 9
 			}
 		}
@@ -64,7 +56,7 @@ Rectangle {
 				anchors.verticalCenter: parent.verticalCenter
 				color: "#ededed"
 				font.bold: true
-				text: row.formatData(modelData, 2)
+				text: modelData[2]
 				font.pointSize: 10
 			}
 		}
diff --git a/mix/qml/StepActionImage.qml b/mix/qml/StepActionImage.qml
index 238c9ecb4..fd6a46521 100644
--- a/mix/qml/StepActionImage.qml
+++ b/mix/qml/StepActionImage.qml
@@ -19,8 +19,6 @@ Rectangle {
 			debugImg.iconSource = disableStateImg;
 	}
 
-	width: debugImg.width + 4
-	height: debugImg.height
 	color: "transparent"
 	Button
 	{
@@ -28,9 +26,10 @@ Rectangle {
 		id: debugImg
 		iconSource: enabledStateImg
 		action: buttonAction
-		width: 17
-		height: 27
+		width: buttonActionContainer.width - 3
+		height: buttonActionContainer.height
 	}
+
 	Action {
 		id: buttonAction
 		onTriggered: {

From 1d8fe29f6b3ae326daa5b54e2ba12581a5b5d338 Mon Sep 17 00:00:00 2001
From: yann300 
Date: Tue, 13 Jan 2015 17:48:12 +0100
Subject: [PATCH 10/12]  - Coding Standards.  - Cleaning.

---
 mix/DebuggingStateWrapper.cpp | 4 ++--
 mix/DebuggingStateWrapper.h   | 2 +-
 mix/qml/Debugger.qml          | 4 ----
 mix/qml/js/Debugger.js        | 3 ---
 4 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/mix/DebuggingStateWrapper.cpp b/mix/DebuggingStateWrapper.cpp
index 732934659..60f78fa42 100644
--- a/mix/DebuggingStateWrapper.cpp
+++ b/mix/DebuggingStateWrapper.cpp
@@ -128,10 +128,10 @@ QVariantList DebuggingStateWrapper::debugCallData()
 	return fillList(qVariantDump(dump), QVariant(filled));
 }
 
-QVariantList DebuggingStateWrapper::qVariantDump(std::list> const& dump)
+QVariantList DebuggingStateWrapper::qVariantDump(std::list> const& _dump)
 {
 	QVariantList ret;
-	for (std::list line: dump)
+	for (std::list line: _dump)
 	{
 		QStringList qLine;
 		for (std::string cell: line)
diff --git a/mix/DebuggingStateWrapper.h b/mix/DebuggingStateWrapper.h
index 32bc3b9c8..a46a2fcd2 100644
--- a/mix/DebuggingStateWrapper.h
+++ b/mix/DebuggingStateWrapper.h
@@ -136,7 +136,7 @@ private:
 	bytes m_data;
 	QStringList fillList(QStringList& _list, QString const& _emptyValue);
 	QVariantList fillList(QVariantList _list, QVariant const& _emptyValue);
-	QVariantList qVariantDump(std::list> const& dump);
+	QVariantList qVariantDump(std::list> const& _dump);
 };
 
 }
diff --git a/mix/qml/Debugger.qml b/mix/qml/Debugger.qml
index e8177c8c6..f6b4d86e9 100644
--- a/mix/qml/Debugger.qml
+++ b/mix/qml/Debugger.qml
@@ -64,10 +64,6 @@ Rectangle {
 			RowLayout
 			{
 				height: 100
-				Image {
-					id: compileFailed
-					source: "qrc:/qml/img/compilfailed.png"
-				}
 				ColumnLayout
 				{
 					Text {
diff --git a/mix/qml/js/Debugger.js b/mix/qml/js/Debugger.js
index 7c32c2426..22f94d620 100644
--- a/mix/qml/js/Debugger.js
+++ b/mix/qml/js/Debugger.js
@@ -7,7 +7,6 @@ var currentSelectedState = null;
 var jumpStartingPoint = null;
 function init()
 {
-	console.log('popopop');
 	if (debugStates === undefined)
 		return;
 
@@ -16,7 +15,6 @@ function init()
 	statesList.model = humanReadableExecutionCode;
 	currentSelectedState = 0;
 	select(currentSelectedState);
-	//displayReturnValue();
 
 	jumpoutbackaction.enabled(false);
 	jumpintobackaction.enabled(false);
@@ -30,7 +28,6 @@ function moveSelection(incr)
 	{
 		if (currentSelectedState + incr < debugStates.length)
 			select(currentSelectedState + incr);
-
 		statesSlider.value = currentSelectedState;
 	}
 }

From 06ac786317c19acd9a9f5b327e2bf134925edd55 Mon Sep 17 00:00:00 2001
From: yann300 
Date: Wed, 14 Jan 2015 12:06:48 +0100
Subject: [PATCH 11/12]  - Move memDumpToList into mix project (and list
 replace by vector).  - Add comments.  - Coding Standards.

---
 libdevcore/CommonIO.cpp          | 57 ++++++--------------------------
 libdevcore/CommonIO.h            |  5 ++-
 mix/CodeEditorExtensionManager.h |  1 -
 mix/DebuggingStateWrapper.cpp    | 46 +++++++++++++++++++++-----
 mix/DebuggingStateWrapper.h      |  6 +++-
 mix/qml.qrc                      |  1 -
 mix/qml/Debugger.qml             | 12 +++----
 mix/qml/js/Debugger.js           | 28 ++++++++--------
 mix/qml/js/main.js               |  0
 9 files changed, 75 insertions(+), 81 deletions(-)
 delete mode 100644 mix/qml/js/main.js

diff --git a/libdevcore/CommonIO.cpp b/libdevcore/CommonIO.cpp
index 4f02ea3f7..feb4121cb 100644
--- a/libdevcore/CommonIO.cpp
+++ b/libdevcore/CommonIO.cpp
@@ -26,67 +26,30 @@
 using namespace std;
 using namespace dev;
 
-std::list> dev::memDumpToList(bytes const& _b, unsigned _w)
-{
-	std::list> dump;
-	for (unsigned i = 0; i < _b.size(); i += _w)
-	{
-		stringstream ret;
-		std::list dumpLine;
-		ret << hex << setw(4) << setfill('0') << i << " ";
-		dumpLine.push_back(ret.str());
-		ret.str(std::string());
-		ret.clear();
-
-		for (unsigned j = i; j < i + _w; ++j)
-			if (j < _b.size())
-				if (_b[j] >= 32 && _b[j] < 127)
-					if ((char)_b[j] == '<')
-						ret << "<";
-					else if ((char)_b[j] == '&')
-						ret << "&";
-					else
-						ret << (char)_b[j];
-				else
-					ret << '?';
-			else
-				ret << ' ';
-		dumpLine.push_back(ret.str());
-		ret.str(std::string());
-		ret.clear();
-
-		for (unsigned j = i; j < i + _w && j < _b.size(); ++j)
-			ret << setfill('0') << setw(2) << hex << (unsigned)_b[j] << " ";
-		dumpLine.push_back(ret.str());
-		dump.push_back(dumpLine);
-	}
-	return dump;
-}
-
-string dev::memDump(bytes const& _b, unsigned _w, bool _html)
+string dev::memDump(bytes const& _bytes, unsigned _width, bool _html)
 {
 	stringstream ret;
 	if (_html)
 		ret << "
";
-	for (unsigned i = 0; i < _b.size(); i += _w)
+	for (unsigned i = 0; i < _bytes.size(); i += _width)
 	{
 		ret << hex << setw(4) << setfill('0') << i << " ";
-		for (unsigned j = i; j < i + _w; ++j)
-			if (j < _b.size())
-				if (_b[j] >= 32 && _b[j] < 127)
-					if ((char)_b[j] == '<' && _html)
+		for (unsigned j = i; j < i + _width; ++j)
+			if (j < _bytes.size())
+				if (_bytes[j] >= 32 && _bytes[j] < 127)
+					if ((char)_bytes[j] == '<' && _html)
 						ret << "<";
-					else if ((char)_b[j] == '&' && _html)
+					else if ((char)_bytes[j] == '&' && _html)
 						ret << "&";
 					else
-						ret << (char)_b[j];
+						ret << (char)_bytes[j];
 				else
 					ret << '?';
 			else
 				ret << ' ';
 		ret << " ";
-		for (unsigned j = i; j < i + _w && j < _b.size(); ++j)
-			ret << setfill('0') << setw(2) << hex << (unsigned)_b[j] << " ";
+		for (unsigned j = i; j < i + _width && j < _bytes.size(); ++j)
+			ret << setfill('0') << setw(2) << hex << (unsigned)_bytes[j] << " ";
 		ret << "\n";
 	}
 	if (_html)
diff --git a/libdevcore/CommonIO.h b/libdevcore/CommonIO.h
index 1223646f6..d2a67921b 100644
--- a/libdevcore/CommonIO.h
+++ b/libdevcore/CommonIO.h
@@ -47,9 +47,8 @@ bytes contents(std::string const& _file);
 void writeFile(std::string const& _file, bytes const& _data);
 
 /// Nicely renders the given bytes to a string, optionally as HTML.
-std::string memDump(bytes const& _b, unsigned _w = 8, bool _html = false);
-/// Nicely renders the given bytes to a string, store the content in an array.
-std::list> memDumpToList(bytes const& _b, unsigned _w);
+/// @a _bytes: bytes array to be rendered as string. @a _width of a bytes line.
+std::string memDump(bytes const& _bytes, unsigned _width = 8, bool _html = false);
 
 // Stream I/O functions.
 // Provides templated stream I/O for all STL collections so they can be shifted on to any iostream-like interface.
diff --git a/mix/CodeEditorExtensionManager.h b/mix/CodeEditorExtensionManager.h
index 0455a1beb..fe6fbb33a 100644
--- a/mix/CodeEditorExtensionManager.h
+++ b/mix/CodeEditorExtensionManager.h
@@ -65,7 +65,6 @@ private:
 	QVector> m_features;
 	QQuickItem* m_headerView;
 	QQuickItem* m_rightView;
-	QTextDocument* m_doc;
 	AppContext* m_appContext;
 	void loadEditor(QQuickItem* _editor);
 };
diff --git a/mix/DebuggingStateWrapper.cpp b/mix/DebuggingStateWrapper.cpp
index 60f78fa42..85179e84b 100644
--- a/mix/DebuggingStateWrapper.cpp
+++ b/mix/DebuggingStateWrapper.cpp
@@ -110,7 +110,7 @@ QStringList DebuggingStateWrapper::debugStorage()
 
 QVariantList DebuggingStateWrapper::debugMemory()
 {
-	std::list> dump = memDumpToList(m_state.memory, 16);
+	std::vector> dump = memDumpToList(m_state.memory, 16);
 	QStringList filled;
 	filled.append(" ");
 	filled.append(" ");
@@ -120,7 +120,7 @@ QVariantList DebuggingStateWrapper::debugMemory()
 
 QVariantList DebuggingStateWrapper::debugCallData()
 {
-	std::list> dump = memDumpToList(m_data, 16);
+	std::vector> dump = memDumpToList(m_data, 16);
 	QStringList filled;
 	filled.append(" ");
 	filled.append(" ");
@@ -128,13 +128,45 @@ QVariantList DebuggingStateWrapper::debugCallData()
 	return fillList(qVariantDump(dump), QVariant(filled));
 }
 
-QVariantList DebuggingStateWrapper::qVariantDump(std::list> const& _dump)
+std::vector> DebuggingStateWrapper::memDumpToList(bytes const& _bytes, unsigned _width)
+{
+	std::vector> dump;
+	for (unsigned i = 0; i < _bytes.size(); i += _width)
+	{
+		std::stringstream ret;
+		std::vector dumpLine;
+		ret << std::hex << std::setw(4) << std::setfill('0') << i << " ";
+		dumpLine.push_back(ret.str());
+		ret.str(std::string());
+		ret.clear();
+
+		for (unsigned j = i; j < i + _width; ++j)
+			if (j < _bytes.size())
+				if (_bytes[j] >= 32 && _bytes[j] < 127)
+					ret << (char)_bytes[j];
+				else
+					ret << '?';
+			else
+				ret << ' ';
+		dumpLine.push_back(ret.str());
+		ret.str(std::string());
+		ret.clear();
+
+		for (unsigned j = i; j < i + _width && j < _bytes.size(); ++j)
+			ret << std::setfill('0') << std::setw(2) << std::hex << (unsigned)_bytes[j] << " ";
+		dumpLine.push_back(ret.str());
+		dump.push_back(dumpLine);
+	}
+	return dump;
+}
+
+QVariantList DebuggingStateWrapper::qVariantDump(std::vector> const& _dump)
 {
 	QVariantList ret;
-	for (std::list line: _dump)
+	for (std::vector const& line: _dump)
 	{
 		QStringList qLine;
-		for (std::string cell: line)
+		for (std::string const& cell: line)
 			qLine.push_back(QString::fromStdString(cell));
 		ret.append(QVariant(qLine));
 	}
@@ -185,9 +217,7 @@ QString DebuggingStateWrapper::headerInfo()
 
 QString DebuggingStateWrapper::instruction()
 {
-	std::ostringstream ss;
-	ss << dev::eth::instructionInfo(m_state.inst).name;
-	return QString::fromStdString(ss.str());
+	return QString::fromStdString(dev::eth::instructionInfo(m_state.inst).name);
 }
 
 QString DebuggingStateWrapper::endOfDebug()
diff --git a/mix/DebuggingStateWrapper.h b/mix/DebuggingStateWrapper.h
index a46a2fcd2..010db9af7 100644
--- a/mix/DebuggingStateWrapper.h
+++ b/mix/DebuggingStateWrapper.h
@@ -136,7 +136,11 @@ private:
 	bytes m_data;
 	QStringList fillList(QStringList& _list, QString const& _emptyValue);
 	QVariantList fillList(QVariantList _list, QVariant const& _emptyValue);
-	QVariantList qVariantDump(std::list> const& _dump);
+	QVariantList qVariantDump(std::vector> const& _dump);
+	/// Nicely renders the given bytes to a string, store the content in an array.
+	/// @a _bytes: bytes array to be rendered as string. @a _width of a bytes line.
+	std::vector> memDumpToList(bytes const& _bytes, unsigned _width);
+
 };
 
 }
diff --git a/mix/qml.qrc b/mix/qml.qrc
index 44589e70d..344fcaa22 100644
--- a/mix/qml.qrc
+++ b/mix/qml.qrc
@@ -10,7 +10,6 @@
         qml/ProjectList.qml
         qml/StateDialog.qml
         qml/StateList.qml
-        qml/js/main.js
         qml/img/jumpintoback.png
         qml/img/jumpintoforward.png
         qml/img/jumpoutback.png
diff --git a/mix/qml/Debugger.qml b/mix/qml/Debugger.qml
index f6b4d86e9..ac449065b 100644
--- a/mix/qml/Debugger.qml
+++ b/mix/qml/Debugger.qml
@@ -133,7 +133,7 @@ Rectangle {
 						spacing: 3
 						StepActionImage
 						{
-							id: jumpoutbackaction;
+							id: jumpOutBackAction;
 							enabledStateImg: "qrc:/qml/img/jumpoutback.png"
 							disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png"
 							onClicked: Debugger.stepOutBack()
@@ -143,7 +143,7 @@ Rectangle {
 
 						StepActionImage
 						{
-							id: jumpintobackaction
+							id: jumpIntoBackAction
 							enabledStateImg: "qrc:/qml/img/jumpintoback.png"
 							disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png"
 							onClicked: Debugger.stepIntoBack()
@@ -153,7 +153,7 @@ Rectangle {
 
 						StepActionImage
 						{
-							id: jumpoverbackaction
+							id: jumpOverBackAction
 							enabledStateImg: "qrc:/qml/img/jumpoverback.png"
 							disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png"
 							onClicked: Debugger.stepOverBack()
@@ -163,7 +163,7 @@ Rectangle {
 
 						StepActionImage
 						{
-							id: jumpoverforwardaction
+							id: jumpOverForwardAction
 							enabledStateImg: "qrc:/qml/img/jumpoverforward.png"
 							disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png"
 							onClicked: Debugger.stepOverForward()
@@ -173,7 +173,7 @@ Rectangle {
 
 						StepActionImage
 						{
-							id: jumpintoforwardaction
+							id: jumpIntoForwardAction
 							enabledStateImg: "qrc:/qml/img/jumpintoforward.png"
 							disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png"
 							onClicked: Debugger.stepIntoForward()
@@ -183,7 +183,7 @@ Rectangle {
 
 						StepActionImage
 						{
-							id: jumpoutforwardaction
+							id: jumpOutForwardAction
 							enabledStateImg: "qrc:/qml/img/jumpoutforward.png"
 							disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png"
 							onClicked: Debugger.stepOutForward()
diff --git a/mix/qml/js/Debugger.js b/mix/qml/js/Debugger.js
index 22f94d620..43b15f27e 100644
--- a/mix/qml/js/Debugger.js
+++ b/mix/qml/js/Debugger.js
@@ -16,10 +16,10 @@ function init()
 	currentSelectedState = 0;
 	select(currentSelectedState);
 
-	jumpoutbackaction.enabled(false);
-	jumpintobackaction.enabled(false);
-	jumpintoforwardaction.enabled(false);
-	jumpoutforwardaction.enabled(false);
+	jumpOutBackAction.enabled(false);
+	jumpIntoBackAction.enabled(false);
+	jumpIntoForwardAction.enabled(false);
+	jumpOutForwardAction.enabled(false);
 }
 
 function moveSelection(incr)
@@ -41,14 +41,14 @@ function select(stateIndex)
 	completeCtxInformation(state);
 
 	if (state.instruction === "JUMP")
-		jumpintoforwardaction.enabled(true);
+		jumpIntoForwardAction.enabled(true);
 	else
-		jumpintoforwardaction.enabled(false);
+		jumpIntoForwardAction.enabled(false);
 
 	if (state.instruction === "JUMPDEST")
-		jumpintobackaction.enabled(true);
+		jumpIntoBackAction.enabled(true);
 	else
-		jumpintobackaction.enabled(false);
+		jumpIntoBackAction.enabled(false);
 }
 
 function codeStr(stateIndex)
@@ -87,8 +87,8 @@ function stepOutBack()
 	{
 		select(jumpStartingPoint);
 		jumpStartingPoint = null;
-		jumpoutbackaction.enabled(false);
-		jumpoutforwardaction.enabled(false);
+		jumpOutBackAction.enabled(false);
+		jumpOutForwardAction.enabled(false);
 	}
 }
 
@@ -142,8 +142,8 @@ function stepIntoForward()
 	{
 		jumpStartingPoint = currentSelectedState;
 		moveSelection(1);
-		jumpoutbackaction.enabled(true);
-		jumpoutforwardaction.enabled(true);
+		jumpOutBackAction.enabled(true);
+		jumpOutForwardAction.enabled(true);
 	}
 }
 
@@ -153,8 +153,8 @@ function stepOutForward()
 	{
 		stepOutBack();
 		stepOverForward();
-		jumpoutbackaction.enabled(false);
-		jumpoutforwardaction.enabled(false);
+		jumpOutBackAction.enabled(false);
+		jumpOutForwardAction.enabled(false);
 	}
 }
 
diff --git a/mix/qml/js/main.js b/mix/qml/js/main.js
deleted file mode 100644
index e69de29bb..000000000

From a27026cf6ddbb32d8bdccd94c7401855b62fb432 Mon Sep 17 00:00:00 2001
From: yann300 
Date: Thu, 15 Jan 2015 10:03:35 +0100
Subject: [PATCH 12/12]  - fix windows build.

---
 mix/AssemblyDebuggerControl.h |  4 ++--
 mix/ClientModel.cpp           |  2 +-
 mix/qml/StatusPane.qml        | 24 ++++--------------------
 3 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/mix/AssemblyDebuggerControl.h b/mix/AssemblyDebuggerControl.h
index 2e552f63a..1240b3807 100644
--- a/mix/AssemblyDebuggerControl.h
+++ b/mix/AssemblyDebuggerControl.h
@@ -22,13 +22,13 @@
 #include 
 #include "Extension.h"
 
-class AppContext;
-
 namespace dev
 {
 namespace mix
 {
 
+class AppContext;
+
 /**
  * @brief Extension which display transaction creation or transaction call debugging.
  */
diff --git a/mix/ClientModel.cpp b/mix/ClientModel.cpp
index bcbed1fac..14fcf9bfa 100644
--- a/mix/ClientModel.cpp
+++ b/mix/ClientModel.cpp
@@ -116,7 +116,7 @@ void ClientModel::executeSequence(std::vector const& _seque
 		{
 			bytes contractCode = compilerRes->bytes();
 			std::vector transactonData;
-			QFunctionDefinition* f;
+			QFunctionDefinition* f = nullptr;
 			ContractCallDataEncoder c;
 			//encode data for all transactions
 			for (auto const& t: _sequence)
diff --git a/mix/qml/StatusPane.qml b/mix/qml/StatusPane.qml
index 3dd5e1850..af4f6949e 100644
--- a/mix/qml/StatusPane.qml
+++ b/mix/qml/StatusPane.qml
@@ -11,14 +11,12 @@ Rectangle {
 	{
 		if (statusPane.result.successful)
 		{
-			image.state = "";
 			status.state = "";
 			status.text = qsTr("Compile without errors.");
 			logslink.visible = false;
 		}
 		else
 		{
-			image.state = "error";
 			status.state = "error";
 			var errorInfo = ErrorLocationFormater.extractErrorInfo(statusPane.result.compilerMessage, true);
 			status.text = errorInfo.errorLocation + " " + errorInfo.errorDetail;
@@ -41,24 +39,6 @@ Rectangle {
 			anchors.horizontalCenter: parent.horizontalCenter
 			anchors.verticalCenter: parent.verticalCenter
 			spacing: 5
-			Image
-			{
-				source: "qrc:/qml/img/compilsuceeded.png"
-				id: image
-				states:[
-					State {
-						name: "error"
-						PropertyChanges {
-							target: image
-							source: "qrc:/qml/img/compilfailed.png"
-						}
-						PropertyChanges {
-							target: statusContainer
-							color: "#fffcd5"
-						}
-					}
-				]
-			}
 
 			Text {
 				font.pointSize: 10
@@ -73,6 +53,10 @@ Rectangle {
 							target: status
 							color: "red"
 						}
+						PropertyChanges {
+							target: statusContainer
+							color: "#fffcd5"
+						}
 					}
 				]
 			}