Commit 268bf2d6 authored by Victor Yacovlev's avatar Victor Yacovlev

Everywhere: Line number instruction has 2 meanings; highlight statement

in line
parent 3a9e25bf
...@@ -182,7 +182,7 @@ void KumirProgram::setBytecodeRun(KPlugin *run) ...@@ -182,7 +182,7 @@ void KumirProgram::setBytecodeRun(KPlugin *run)
connect(run, SIGNAL(stopped(int)), connect(run, SIGNAL(stopped(int)),
this, SLOT(handleRunnerStopped(int))); this, SLOT(handleRunnerStopped(int)));
connect(run, SIGNAL(lineChanged(int)), this, SLOT(handleLineChanged(int))); connect(run, SIGNAL(lineChanged(int,quint32,quint32)), this, SLOT(handleLineChanged(int,quint32,quint32)));
connect(run, SIGNAL(marginText(int,QString)), this, SLOT(handleMarginTextRequest(int,QString))); connect(run, SIGNAL(marginText(int,QString)), this, SLOT(handleMarginTextRequest(int,QString)));
connect(run, SIGNAL(clearMargin(int,int)), this, SLOT(handleMarginClearRequest(int,int))); connect(run, SIGNAL(clearMargin(int,int)), this, SLOT(handleMarginClearRequest(int,int)));
connect(run, SIGNAL(replaceMarginText(int,QString, bool)), connect(run, SIGNAL(replaceMarginText(int,QString, bool)),
...@@ -456,7 +456,7 @@ void KumirProgram::handleRunnerStopped(int rr) ...@@ -456,7 +456,7 @@ void KumirProgram::handleRunnerStopped(int rr)
else if (reason==Shared::RunInterface::SR_Error) { else if (reason==Shared::RunInterface::SR_Error) {
s_endStatus = tr("Evaluation error"); s_endStatus = tr("Evaluation error");
m_terminal->error(plugin_bytecodeRun->error()); m_terminal->error(plugin_bytecodeRun->error());
plugin_editor->highlightLineRed(documentId_, plugin_bytecodeRun->currentLineNo()); plugin_editor->highlightLineRed(documentId_, plugin_bytecodeRun->currentLineNo(), plugin_bytecodeRun->currentColumn().first, plugin_bytecodeRun->currentColumn().second);
PluginManager::instance()->switchGlobalState(GS_Observe); PluginManager::instance()->switchGlobalState(GS_Observe);
e_state = Idle; e_state = Idle;
m_terminal->clearFocus(); m_terminal->clearFocus();
...@@ -492,14 +492,14 @@ void KumirProgram::handleRunnerStopped(int rr) ...@@ -492,14 +492,14 @@ void KumirProgram::handleRunnerStopped(int rr)
} }
void KumirProgram::handleLineChanged(int lineNo) void KumirProgram::handleLineChanged(int lineNo, quint32 colStart, quint32 colEnd)
{ {
emit activateDocumentTab(documentId_); emit activateDocumentTab(documentId_);
if (lineNo!=-1) { if (lineNo!=-1) {
if (plugin_bytecodeRun->error().isEmpty()) if (plugin_bytecodeRun->error().isEmpty())
plugin_editor->highlightLineGreen(documentId_, lineNo); plugin_editor->highlightLineGreen(documentId_, lineNo, colStart, colEnd);
else else
plugin_editor->highlightLineRed(documentId_, lineNo); plugin_editor->highlightLineRed(documentId_, lineNo, colStart, colEnd);
} }
else { else {
plugin_editor->unhighlightLine(documentId_); plugin_editor->unhighlightLine(documentId_);
......
...@@ -54,7 +54,7 @@ public slots: ...@@ -54,7 +54,7 @@ public slots:
void stepOut(); void stepOut();
void stop(); void stop();
void switchGlobalState(ExtensionSystem::GlobalState old, ExtensionSystem::GlobalState cur); void switchGlobalState(ExtensionSystem::GlobalState old, ExtensionSystem::GlobalState cur);
void handleLineChanged(int lineNo); void handleLineChanged(int lineNo, quint32 colStart, quint32 colEnd);
void handleMarginTextRequest(int lineNo, const QString & text); void handleMarginTextRequest(int lineNo, const QString & text);
void handleMarginClearRequest(int fromLine, int toLine); void handleMarginClearRequest(int fromLine, int toLine);
void handleMarginTextReplace(int,const QString&,bool); void handleMarginTextReplace(int,const QString&,bool);
......
...@@ -48,7 +48,7 @@ MainWindow::MainWindow(Plugin * p) : ...@@ -48,7 +48,7 @@ MainWindow::MainWindow(Plugin * p) :
QObject * runnerObject = QObject * runnerObject =
ExtensionSystem::PluginManager::instance()->findKPlugin<Shared::RunInterface>(); ExtensionSystem::PluginManager::instance()->findKPlugin<Shared::RunInterface>();
if (runnerObject) { if (runnerObject) {
connect(runnerObject, SIGNAL(updateStepsCounter(ulong)), this, SLOT(checkCounterValue())); connect(runnerObject, SIGNAL(updateStepsCounter(quint64)), this, SLOT(checkCounterValue()));
} }
connect(ui->actionPreferences, SIGNAL(triggered()), this, SLOT(showPreferences())); connect(ui->actionPreferences, SIGNAL(triggered()), this, SLOT(showPreferences()));
......
...@@ -115,9 +115,9 @@ void Editor::clearMarginText(uint fromLine, uint toLine) ...@@ -115,9 +115,9 @@ void Editor::clearMarginText(uint fromLine, uint toLine)
update(); update();
} }
void Editor::setLineHighlighted(int lineNo, const QColor &color) void Editor::setLineHighlighted(int lineNo, const QColor &color, quint32 colStart, quint32 colEnd)
{ {
d->plane->setLineHighlighted(lineNo, color); d->plane->setLineHighlighted(lineNo, color, colStart, colEnd);
} }
QList<QWidget*> Editor::statusbarWidgets() QList<QWidget*> Editor::statusbarWidgets()
......
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
void checkForClean(); void checkForClean();
void lock(); void lock();
void unlock(); void unlock();
void setLineHighlighted(int lineNo, const QColor & color); void setLineHighlighted(int lineNo, const QColor & color, quint32 colStart, quint32 colEnd);
void ensureAnalized(); void ensureAnalized();
QByteArray saveState() const; QByteArray saveState() const;
void restoreState(const QByteArray &data); void restoreState(const QByteArray &data);
......
...@@ -42,6 +42,8 @@ EditorPlane::EditorPlane(TextDocument * doc ...@@ -42,6 +42,8 @@ EditorPlane::EditorPlane(TextDocument * doc
editor_ = editor; editor_ = editor;
analizer_ = analizer; analizer_ = analizer;
highlightedTextLineNumber_ = -1; highlightedTextLineNumber_ = -1;
highlightedTextColumnStartNumber_ = 0u;
highlightedTextColumnEndNumber_ = 0u;
highlightedLockSymbolLineNumber_ = -1; highlightedLockSymbolLineNumber_ = -1;
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
marginBackgroundAlpha_ = 255; marginBackgroundAlpha_ = 255;
...@@ -93,10 +95,12 @@ void EditorPlane::setTeacherMode(bool v) ...@@ -93,10 +95,12 @@ void EditorPlane::setTeacherMode(bool v)
teacherModeFlag_ = v; teacherModeFlag_ = v;
} }
void EditorPlane::setLineHighlighted(int lineNo, const QColor &color) void EditorPlane::setLineHighlighted(int lineNo, const QColor &color, quint32 colStart, quint32 colEnd)
{ {
highlightedTextLineNumber_ = lineNo; highlightedTextLineNumber_ = lineNo;
highlightedTextLineColor_ = color; highlightedTextLineColor_ = color;
highlightedTextColumnStartNumber_ = colStart;
highlightedTextColumnEndNumber_ = colEnd;
if (lineNo>-1) { if (lineNo>-1) {
ensureHighlightedLineVisible(); ensureHighlightedLineVisible();
} }
...@@ -926,6 +930,24 @@ void EditorPlane::paintEvent(QPaintEvent *e) ...@@ -926,6 +930,24 @@ void EditorPlane::paintEvent(QPaintEvent *e)
p.drawLine(highlightRightRect.bottomLeft(), p.drawLine(highlightRightRect.bottomLeft(),
highlightRightRect.bottomRight()); highlightRightRect.bottomRight());
if (highlightedTextColumnStartNumber_ != highlightedTextColumnEndNumber_) {
// Draw a rect around statement
QPen pen;
pen.setColor(highlightedTextLineColor_);
pen.setStyle(Qt::SolidLine);
pen.setWidth(2);
p.setPen(pen);
p.setBrush(Qt::NoBrush);
uint cw = charWidth();
uint left = cw * highlightedTextColumnStartNumber_;
uint right = cw * highlightedTextColumnEndNumber_;
left += cw * 2 * document_->indentAt(highlightedTextLineNumber_);
right += cw * 2 * document_->indentAt(highlightedTextLineNumber_);
p.drawRoundedRect(left, highlightLeftRect.top(),
int(right) - int(left), highlightLeftRect.height(),
2, 2);
}
// Restore a pen // Restore a pen
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
......
...@@ -50,7 +50,7 @@ public slots: ...@@ -50,7 +50,7 @@ public slots:
void cut(); void cut();
void removeLine(); void removeLine();
void removeLineTail(); void removeLineTail();
void setLineHighlighted(int lineNo, const QColor & color); void setLineHighlighted(int lineNo, const QColor & color, quint32 colStart, quint32 colEnd);
void signalizeNotEditable(); void signalizeNotEditable();
protected: protected:
static QPolygon errorUnderline(int x, int y, int len); static QPolygon errorUnderline(int x, int y, int len);
...@@ -130,6 +130,8 @@ private: ...@@ -130,6 +130,8 @@ private:
int highlightedTextLineNumber_; int highlightedTextLineNumber_;
QColor highlightedTextLineColor_; QColor highlightedTextLineColor_;
int highlightedLockSymbolLineNumber_; int highlightedLockSymbolLineNumber_;
quint32 highlightedTextColumnStartNumber_;
quint32 highlightedTextColumnEndNumber_ ;
class SuggestionsWindow * autocompleteWidget_; class SuggestionsWindow * autocompleteWidget_;
Shared::AnalizerInterface * analizer_; Shared::AnalizerInterface * analizer_;
QList<QAction*> contextMenuActions_; QList<QAction*> contextMenuActions_;
......
...@@ -341,22 +341,22 @@ void EditorPlugin::changeGlobalState(ExtensionSystem::GlobalState prev, Extensio ...@@ -341,22 +341,22 @@ void EditorPlugin::changeGlobalState(ExtensionSystem::GlobalState prev, Extensio
} }
} }
void EditorPlugin::highlightLineGreen(int documentId, int lineNo) void EditorPlugin::highlightLineGreen(int documentId, int lineNo, quint32 colStart, quint32 colEnd)
{ {
if (d->editors[documentId].e) if (d->editors[documentId].e)
d->editors[documentId].e->setLineHighlighted(lineNo, QColor(Qt::darkGreen)); d->editors[documentId].e->setLineHighlighted(lineNo, QColor(Qt::darkGreen), colStart, colEnd);
} }
void EditorPlugin::highlightLineRed(int documentId, int lineNo) void EditorPlugin::highlightLineRed(int documentId, int lineNo, quint32 colStart, quint32 colEnd)
{ {
if (d->editors[documentId].e) if (d->editors[documentId].e)
d->editors[documentId].e->setLineHighlighted(lineNo, QColor(Qt::red)); d->editors[documentId].e->setLineHighlighted(lineNo, QColor(Qt::red), colStart, colEnd);
} }
void EditorPlugin::unhighlightLine(int documentId) void EditorPlugin::unhighlightLine(int documentId)
{ {
if (d->editors[documentId].e) if (d->editors[documentId].e)
d->editors[documentId].e->setLineHighlighted(-1, QColor::Invalid); d->editors[documentId].e->setLineHighlighted(-1, QColor::Invalid, 0u, 0u);
} }
void EditorPlugin::ensureAnalized(int documentId) void EditorPlugin::ensureAnalized(int documentId)
......
...@@ -33,8 +33,8 @@ public: ...@@ -33,8 +33,8 @@ public:
KumFile::Data documentContent(int documentId) const; KumFile::Data documentContent(int documentId) const;
Shared::AnalizerInterface * analizer(int documentId); Shared::AnalizerInterface * analizer(int documentId);
quint32 errorsLinesCount(int documentId) const; quint32 errorsLinesCount(int documentId) const;
void highlightLineGreen(int documentId, int lineNo); void highlightLineGreen(int documentId, int lineNo, quint32 colStart, quint32 colEnd);
void highlightLineRed(int documentId, int lineNo); void highlightLineRed(int documentId, int lineNo, quint32 colStart, quint32 colEnd);
void unhighlightLine(int documentId); void unhighlightLine(int documentId);
void appendMarginText(int documentId, int lineNo, const QString & text); void appendMarginText(int documentId, int lineNo, const QString & text);
void setMarginText(int documentId, int lineNo, const QString & text, const QColor & fgColor); void setMarginText(int documentId, int lineNo, const QString & text, const QColor & fgColor);
......
...@@ -18,6 +18,10 @@ namespace Bytecode { ...@@ -18,6 +18,10 @@ namespace Bytecode {
class Data; class Data;
} }
namespace AST {
struct Lexem;
}
namespace KumirCodeGenerator { namespace KumirCodeGenerator {
typedef Shared::GeneratorInterface::DebugLevel DebugLevel; typedef Shared::GeneratorInterface::DebugLevel DebugLevel;
...@@ -52,6 +56,7 @@ public: ...@@ -52,6 +56,7 @@ public:
void generateConstantTable(); void generateConstantTable();
void generateExternTable(); void generateExternTable();
private: private:
QList<Bytecode::Instruction> makeLineInstructions(const QList<AST::Lexem*> & lexems) const;
quint16 constantValue(Bytecode::ValueType type, quint8 dimension, const QVariant & value, quint16 constantValue(Bytecode::ValueType type, quint8 dimension, const QVariant & value,
const QString & recordModule, const QString & recordClass const QString & recordModule, const QString & recordClass
); );
......
...@@ -27,8 +27,8 @@ Plugin::Plugin() ...@@ -27,8 +27,8 @@ Plugin::Plugin()
connect (pRun_, SIGNAL(output(QString)), this, SIGNAL(outputRequest(QString))); connect (pRun_, SIGNAL(output(QString)), this, SIGNAL(outputRequest(QString)));
connect (pRun_, SIGNAL(input(QString)), this, SIGNAL(inputRequest(QString))); connect (pRun_, SIGNAL(input(QString)), this, SIGNAL(inputRequest(QString)));
connect (pRun_, SIGNAL(finished()), this, SLOT(handleThreadFinished())); connect (pRun_, SIGNAL(finished()), this, SLOT(handleThreadFinished()));
connect (pRun_, SIGNAL(lineChanged(int)), this, SIGNAL(lineChanged(int))); connect (pRun_, SIGNAL(lineChanged(int,quint32,quint32)), this, SIGNAL(lineChanged(int,quint32,quint32)));
connect (pRun_, SIGNAL(updateStepsCounter(ulong)), this, SIGNAL(updateStepsCounter(ulong))); connect (pRun_, SIGNAL(updateStepsCounter(quint64)), this, SIGNAL(updateStepsCounter(quint64)));
connect (pRun_, SIGNAL(marginText(int,QString)), this, SIGNAL(marginText(int,QString))); connect (pRun_, SIGNAL(marginText(int,QString)), this, SIGNAL(marginText(int,QString)));
connect (pRun_, SIGNAL(clearMarginRequest(int,int)), this, SIGNAL(clearMargin(int,int))); connect (pRun_, SIGNAL(clearMarginRequest(int,int)), this, SIGNAL(clearMargin(int,int)));
connect (pRun_, SIGNAL(marginTextReplace(int,QString,bool)), connect (pRun_, SIGNAL(marginTextReplace(int,QString,bool)),
...@@ -80,6 +80,11 @@ int Plugin::currentLineNo() const ...@@ -80,6 +80,11 @@ int Plugin::currentLineNo() const
return pRun_->effectiveLineNo(); return pRun_->effectiveLineNo();
} }
QPair<quint32,quint32> Plugin::currentColumn() const
{
return QPair<quint32,quint32>(pRun_->vm->effectiveColumn().first, pRun_->vm->effectiveColumn().second);
}
bool Plugin::loadProgram(const QString & filename, const QByteArray & source, Shared::ProgramFormat format) bool Plugin::loadProgram(const QString & filename, const QByteArray & source, Shared::ProgramFormat format)
{ {
bool ok = false; bool ok = false;
...@@ -439,9 +444,9 @@ void Plugin::handleThreadFinished() ...@@ -439,9 +444,9 @@ void Plugin::handleThreadFinished()
} }
} }
void Plugin::handleLineChanged(int lineNo) void Plugin::handleLineChanged(int lineNo, quint32 colStart, quint32 colEnd)
{ {
emit lineChanged(lineNo); emit lineChanged(lineNo, colStart, colEnd);
} }
......
...@@ -26,6 +26,7 @@ public: ...@@ -26,6 +26,7 @@ public:
QString error() const; QString error() const;
int currentLineNo() const ; int currentLineNo() const ;
QPair<quint32,quint32> currentColumn() const;
inline QDateTime loadedProgramVersion() const { return loadedVersion_; } inline QDateTime loadedProgramVersion() const { return loadedVersion_; }
unsigned long int stepsCounted() const; unsigned long int stepsCounted() const;
...@@ -77,16 +78,17 @@ protected: ...@@ -77,16 +78,17 @@ protected:
protected slots: protected slots:
void handleThreadFinished(); void handleThreadFinished();
void handleLineChanged(int lineNo); void handleLineChanged(int lineNo, quint32 colStart, quint32 colEnd);
signals: signals:
void updateStepsCounter(unsigned long int); void updateStepsCounter(quint64);
void errorOutputRequest(const QString &);
void stopped(int reason); void stopped(int reason);
void finishInput(const QVariantList & data); void finishInput(const QVariantList & data);
void inputRequest(const QString & format); void inputRequest(const QString & format);
void outputRequest(const QString & output); void outputRequest(const QString & output);
void lineChanged(int lineNo); void lineChanged(int lineNo, quint32 colStart, quint32 colEnd);
void marginText(int lineNo, const QString & text); void marginText(int lineNo, const QString & text);
void replaceMarginText(int lineNo, const QString & text, bool redFgColor); void replaceMarginText(int lineNo, const QString & text, bool redFgColor);
void clearMargin(int fromLine, int toLine); void clearMargin(int fromLine, int toLine);
......
...@@ -59,7 +59,7 @@ void Run::stop() ...@@ -59,7 +59,7 @@ void Run::stop()
QMutexLocker l(stoppingMutex_); QMutexLocker l(stoppingMutex_);
stoppingFlag_ = true; stoppingFlag_ = true;
if (!isRunning()) { if (!isRunning()) {
emit lineChanged(-1); emit lineChanged(-1, 0u, 0u);
emit finished(); emit finished();
} }
} }
...@@ -85,7 +85,7 @@ void Run::runStepOut() ...@@ -85,7 +85,7 @@ void Run::runStepOut()
{ {
stepDoneFlag_ = false; stepDoneFlag_ = false;
algDoneFlag_ = false; algDoneFlag_ = false;
emit lineChanged(-1); emit lineChanged(-1, 0u, 0u);
runMode_ = RM_StepOut; runMode_ = RM_StepOut;
vm->setNextCallOut(); vm->setNextCallOut();
start(); start();
...@@ -288,19 +288,19 @@ bool Run::setTextToMargin(int lineNo, const String &s, bool red) ...@@ -288,19 +288,19 @@ bool Run::setTextToMargin(int lineNo, const String &s, bool red)
return true; return true;
} }
bool Run::noticeOnLineNoChanged(int lineNo) bool Run::noticeOnLineChanged(int lineNo, quint32 colStart, quint32 colEnd)
{ {
stepDoneMutex_->lock(); stepDoneMutex_->lock();
stepDoneFlag_ = true; stepDoneFlag_ = true;
stepDoneMutex_->unlock(); stepDoneMutex_->unlock();
if (mustStop()) if (mustStop())
emit lineChanged(lineNo); emit lineChanged(lineNo, colStart, colEnd);
else else
emit lineChanged(-1); emit lineChanged(-1, 0u, 0u);
return true; return true;
} }
bool Run::noticeOnStepsChanged(unsigned long int stepsDone) bool Run::noticeOnStepsChanged(quint64 stepsDone)
{ {
emit updateStepsCounter(stepsDone); emit updateStepsCounter(stepsDone);
return true; return true;
...@@ -346,15 +346,15 @@ bool Run::mustStop() const ...@@ -346,15 +346,15 @@ bool Run::mustStop() const
} }
} }
void Run::handleAlgorhitmDone(int lineNo) void Run::handleAlgorhitmDone(int lineNo, quint32 colStart, quint32 colEnd)
{ {
algDoneMutex_->lock(); algDoneMutex_->lock();
algDoneFlag_ = true; algDoneFlag_ = true;
algDoneMutex_->unlock(); algDoneMutex_->unlock();
if (mustStop()) if (mustStop())
emit lineChanged(lineNo); emit lineChanged(lineNo, colStart, colEnd);
else else
emit lineChanged(-1); emit lineChanged(-1, 0u, 0u);
} }
void Run::handlePauseRequest() void Run::handlePauseRequest()
...@@ -373,7 +373,9 @@ void Run::run() ...@@ -373,7 +373,9 @@ void Run::run()
vm->evaluateNextInstruction(); vm->evaluateNextInstruction();
if (vm->error().length()>0) { if (vm->error().length()>0) {
int lineNo = vm->effectiveLineNo(); int lineNo = vm->effectiveLineNo();
emit lineChanged(lineNo); std::pair<quint32,quint32> colNo =
vm->effectiveColumn();
emit lineChanged(lineNo, colNo.first, colNo.second);
emit error(QString::fromStdWString(vm->error())); emit error(QString::fromStdWString(vm->error()));
break; break;
} }
......
...@@ -52,11 +52,9 @@ public slots: ...@@ -52,11 +52,9 @@ public slots:
void runBlind(); void runBlind();
void runContinuous(); void runContinuous();
bool noticeOnLineNoChanged( bool noticeOnLineChanged(int lineNo, uint32_t colStart, uint32_t colEnd);
int /*lineNo*/
);
bool noticeOnStepsChanged(unsigned long int stepsDone); bool noticeOnStepsChanged(quint64 stepsDone);
bool setTextToMargin(int lineNo, const String & s, bool red); bool setTextToMargin(int lineNo, const String & s, bool red);
bool appendTextToMargin(int lineNo, const String & s); bool appendTextToMargin(int lineNo, const String & s);
...@@ -94,14 +92,14 @@ public slots: ...@@ -94,14 +92,14 @@ public slots:
const Kumir::String & name, const Kumir::String & name,
const int indeces[4]); const int indeces[4]);
void handleAlgorhitmDone(int lineNo); void handleAlgorhitmDone(int lineNo, quint32 colStart, quint32 colEnd);
void handlePauseRequest(); void handlePauseRequest();
signals: signals:
void updateStepsCounter(unsigned long int); void updateStepsCounter(quint64);
void finishInput(const QVariantList &data); void finishInput(const QVariantList &data);
void lineChanged(int lineNo); void lineChanged(int lineNo, quint32 colStart, quint32 colEnd);
void output(const QString &value); void output(const QString &value);
void error(const QString & message); void error(const QString & message);
void input(const QString & format); void input(const QString & format);
......
...@@ -70,6 +70,9 @@ public: ...@@ -70,6 +70,9 @@ public:
void terminate(); void terminate();
bool hasMoreInstructions() const; bool hasMoreInstructions() const;
int currentLineNo() const; int currentLineNo() const;
inline QPair<quint32,quint32> currentColumn() const {
return QPair<quint32,quint32>(0u,0u);
} // Python can't handle columns
QString error() const; QString error() const;
// methods to access within self static functions // methods to access within self static functions
......
...@@ -32,8 +32,8 @@ public: ...@@ -32,8 +32,8 @@ public:
virtual KumFile::Data documentContent(int documentId) const = 0; virtual KumFile::Data documentContent(int documentId) const = 0;
virtual AnalizerInterface * analizer(int documentId) = 0; virtual AnalizerInterface * analizer(int documentId) = 0;
virtual quint32 errorsLinesCount(int documentId) const = 0; virtual quint32 errorsLinesCount(int documentId) const = 0;
virtual void highlightLineGreen(int documentId, int lineNo) = 0; virtual void highlightLineGreen(int documentId, int lineNo, quint32 colStart, quint32 colEnd) = 0;
virtual void highlightLineRed(int documentId, int lineNo) = 0; virtual void highlightLineRed(int documentId, int lineNo, quint32 colStart, quint32 colEnd) = 0;
virtual void unhighlightLine(int documentId) = 0; virtual void unhighlightLine(int documentId) = 0;
virtual void appendMarginText(int documentId, int lineNo, const QString & text) = 0; virtual void appendMarginText(int documentId, int lineNo, const QString & text) = 0;
virtual void setMarginText(int documentId, int lineNo, const QString & text, const QColor & color) = 0; virtual void setMarginText(int documentId, int lineNo, const QString & text, const QColor & color) = 0;
......
...@@ -28,6 +28,7 @@ public: ...@@ -28,6 +28,7 @@ public:
virtual bool hasMoreInstructions() const = 0; virtual bool hasMoreInstructions() const = 0;
virtual bool hasTestingEntryPoint() const = 0; virtual bool hasTestingEntryPoint() const = 0;
virtual int currentLineNo