// save and check syntax of the documents
for (int i = 0; i < editorTabbedPane.getTabCount(); i++) {
NonWrappingTextPane tabTextPane = getTextPane(i);
if (tabTextPane != null) {
if (tabTextPane.isModified()) {
tabTextPane.save();
}
// check only opened Python files
if (tabTextPane.getFileName().endsWith(".py")) {
ScriptCheckSyntaxValidator scriptCheckSyntaxValidator =
new ScriptCheckSyntaxValidator(tabTextPane.getFileName(), tabTextPane.getText());