eric5.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog

Module implementing a simple Python syntax checker.

Global Attributes

None

Classes

SyntaxCheckerDialog Class implementing a dialog to display the results of a syntax check run.

Functions

None


SyntaxCheckerDialog

Class implementing a dialog to display the results of a syntax check run.

Derived from

QDialog, Ui_SyntaxCheckerDialog

Class Attributes

errorRole
filenameRole
indexRole
lineRole
warningRole

Class Methods

None

Methods

SyntaxCheckerDialog Constructor
__clearErrors Private method to clear all error and warning markers of open editors to be checked.
__createResultItem Private method to create an entry in the result list.
__finish Private slot called when the syntax check finished or the user pressed the button.
__resort Private method to resort the tree.
on_buttonBox_clicked Private slot called by a button of the button box clicked.
on_resultList_itemActivated Private slot to handle the activation of an item.
on_showButton_clicked Private slot to handle the "Show" button press.
on_startButton_clicked Private slot to start a syntax check run.
prepare Public method to prepare the dialog with a list of filenames.
start Public slot to start the syntax check.

Static Methods

None

SyntaxCheckerDialog (Constructor)

SyntaxCheckerDialog(parent=None)

Constructor

parent
The parent widget. (QWidget)

SyntaxCheckerDialog.__clearErrors

__clearErrors(files)

Private method to clear all error and warning markers of open editors to be checked.

files
list of files to be checked (list of string)

SyntaxCheckerDialog.__createResultItem

__createResultItem(file, line, index, error, sourcecode, isWarning=False)

Private method to create an entry in the result list.

file
file name of file (string)
line
line number of faulty source (integer or string)
index
index number of fault (integer)
error
error text (string)
sourcecode
faulty line of code (string)
isWarning
flag indicating a warning message (boolean)

SyntaxCheckerDialog.__finish

__finish()

Private slot called when the syntax check finished or the user pressed the button.

SyntaxCheckerDialog.__resort

__resort()

Private method to resort the tree.

SyntaxCheckerDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
button that was clicked (QAbstractButton)

SyntaxCheckerDialog.on_resultList_itemActivated

on_resultList_itemActivated(itm, col)

Private slot to handle the activation of an item.

itm
reference to the activated item (QTreeWidgetItem)
col
column the item was activated in (integer)

SyntaxCheckerDialog.on_showButton_clicked

on_showButton_clicked()

Private slot to handle the "Show" button press.

SyntaxCheckerDialog.on_startButton_clicked

on_startButton_clicked()

Private slot to start a syntax check run.

SyntaxCheckerDialog.prepare

prepare(fileList, project)

Public method to prepare the dialog with a list of filenames.

fileList
list of filenames (list of strings)
project
reference to the project object (Project)

SyntaxCheckerDialog.start

start(fn, codestring="")

Public slot to start the syntax check.

fn
file or list of files or directory to be checked (string or list of strings)
codestring
string containing the code to be checked (string). If this is given, file must be a single file name.
Up