# eric5.Plugins.PluginSyntaxChecker

Module implementing the Syntax Checker plugin.

### Global Attributes

author
autoactivate
className
deactivateable
error
longDescription
name
packageName
pyqtApi
python2Compatible
shortDescription
version

### Classes

SyntaxCheckerPlugin | Class implementing the Syntax Checker plugin.

### Functions

None

## SyntaxCheckerPlugin

Class implementing the Syntax Checker plugin.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

SyntaxCheckerPlugin | Constructor
__editorClosed | Private slot called, when an editor was closed.
__editorOpened | Private slot called, when a new editor was opened.
__editorShowMenu | Private slot called, when the the editor context menu or a submenu is about to be shown.
__editorSyntaxCheck | Private slot to handle the syntax check context menu action of the editors.
__getPythonOptions | Private methode to determine the syntax check options.
__initialize | Private slot to (re)initialize the plugin.
__projectBrowserShowMenu | Private slot called, when the the project browser menu or a submenu is about to be shown.
__projectBrowserSyntaxCheck | Private method to handle the syntax check context menu action of the project sources browser.
__projectShowMenu | Private slot called, when the the project menu or a submenu is about to be shown.
__projectSyntaxCheck | Private slot used to check the project files for syntax errors.
__serviceError | Private slot handling service errors.
__translateSyntaxCheck | Private slot to translate the resulting messages.
activate | Public method to activate this plugin.
deactivate | Public method to deactivate this plugin.
serviceErrorJavaScript | Public method handling service errors for JavaScript.
serviceErrorPy2 | Public method handling service errors for Python 2.
serviceErrorPy3 | Public method handling service errors for Python 2.

### Static Methods

None

#### SyntaxCheckerPlugin (Constructor)

SyntaxCheckerPlugin(ui)

Constructor

ui
  reference to the user interface object (UI.UserInterface)

#### SyntaxCheckerPlugin.__editorClosed

__editorClosed(editor)

Private slot called, when an editor was closed.

editor
  reference to the editor (QScintilla.Editor)

#### SyntaxCheckerPlugin.__editorOpened

__editorOpened(editor)

Private slot called, when a new editor was opened.

editor
  reference to the new editor (QScintilla.Editor)

#### SyntaxCheckerPlugin.__editorShowMenu

__editorShowMenu(menuName, menu, editor)

Private slot called, when the the editor context menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)
editor
  reference to the editor

#### SyntaxCheckerPlugin.__editorSyntaxCheck

__editorSyntaxCheck()

Private slot to handle the syntax check context menu action of the editors.

#### SyntaxCheckerPlugin.__getPythonOptions

__getPythonOptions()

Private methode to determine the syntax check options.

Returns:
  state of checkFlakes and ignoreStarImportWarnings (bool, bool)

#### SyntaxCheckerPlugin.__initialize

__initialize()

Private slot to (re)initialize the plugin.

#### SyntaxCheckerPlugin.__projectBrowserShowMenu

__projectBrowserShowMenu(menuName, menu)

Private slot called, when the the project browser menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)

#### SyntaxCheckerPlugin.__projectBrowserSyntaxCheck

__projectBrowserSyntaxCheck()

Private method to handle the syntax check context menu action of the project sources browser.

#### SyntaxCheckerPlugin.__projectShowMenu

__projectShowMenu(menuName, menu)

Private slot called, when the the project menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)

#### SyntaxCheckerPlugin.__projectSyntaxCheck

__projectSyntaxCheck()

Private slot used to check the project files for syntax errors.

#### SyntaxCheckerPlugin.__serviceError

__serviceError(fn, msg)

Private slot handling service errors.

fn
  file name (string)
msg
  message text (string)

#### SyntaxCheckerPlugin.__translateSyntaxCheck

__translateSyntaxCheck(fn, problems)

Private slot to translate the resulting messages.

If checkFlakes is True, warnings contains a list of strings containing the warnings (marker, file name, line number, message) The values are only valid, if nok is False.

fn
  filename of the checked file (str)
problems
  dictionary with the keys 'error' and 'warnings' which hold a list containing details about the error/ warnings (file name, line number, column, codestring (only at syntax errors), the message, a list with arguments for the message)

#### SyntaxCheckerPlugin.activate

activate()

Public method to activate this plugin.

Returns:
  tuple of None and activation status (boolean)

#### SyntaxCheckerPlugin.deactivate

deactivate()

Public method to deactivate this plugin.

#### SyntaxCheckerPlugin.serviceErrorJavaScript

serviceErrorJavaScript(fx, lang, fn, msg)

Public method handling service errors for JavaScript.

fx
  service name (string)
lang
  language (string)
fn
  file name (string)
msg
  message text (string)

#### SyntaxCheckerPlugin.serviceErrorPy2

serviceErrorPy2(fx, lang, fn, msg)

Public method handling service errors for Python 2.

fx
  service name (string)
lang
  language (string)
fn
  file name (string)
msg
  message text (string)

#### SyntaxCheckerPlugin.serviceErrorPy3

serviceErrorPy3(fx, lang, fn, msg)

Public method handling service errors for Python 2.

fx
  service name (string)
lang
  language (string)
fn
  file name (string)
msg
  message text (string)

Up