Plugins/PluginSyntaxChecker.py

changeset 3450
2f7c8fd8e3f5
parent 3447
64fb656bd334
child 3515
1b8381afe38f
--- a/Plugins/PluginSyntaxChecker.py	Sun Mar 30 15:34:40 2014 +0200
+++ b/Plugins/PluginSyntaxChecker.py	Sun Mar 30 15:36:25 2014 +0200
@@ -12,8 +12,9 @@
 from PyQt4.QtCore import QObject
 
 from E5Gui.E5Application import e5App
+from E5Gui.E5Action import E5Action
 
-from E5Gui.E5Action import E5Action
+from Project.ProjectBrowserModel import ProjectBrowserFileItem
 
 import Preferences
 
@@ -205,11 +206,16 @@
         """
         browser = e5App().getObject("ProjectBrowser").getProjectBrowser(
             "sources")
-        itm = browser.model().item(browser.currentIndex())
-        try:
-            fn = itm.fileName()
-        except AttributeError:
-            fn = itm.dirName()
+        if browser.getSelectedItemsCount([ProjectBrowserFileItem]) > 1:
+            fn = []
+            for itm in browser.getSelectedItems([ProjectBrowserFileItem]):
+                fn.append(itm.fileName())
+        else:
+            itm = browser.model().item(browser.currentIndex())
+            try:
+                fn = itm.fileName()
+            except AttributeError:
+                fn = itm.dirName()
         
         from CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog import \
             SyntaxCheckerDialog

eric ide

mercurial