Plugins/PluginCodeStyleChecker.py

changeset 3450
2f7c8fd8e3f5
parent 3446
5a670e55adbb
child 3515
1b8381afe38f
--- a/Plugins/PluginCodeStyleChecker.py	Sun Mar 30 15:34:40 2014 +0200
+++ b/Plugins/PluginCodeStyleChecker.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
 
@@ -212,13 +213,19 @@
         """
         browser = e5App().getObject("ProjectBrowser")\
             .getProjectBrowser("sources")
-        itm = browser.model().item(browser.currentIndex())
-        try:
-            fn = itm.fileName()
+        if browser.getSelectedItemsCount([ProjectBrowserFileItem]) > 1:
+            fn = []
+            for itm in browser.getSelectedItems([ProjectBrowserFileItem]):
+                fn.append(itm.fileName())
             isDir = False
-        except AttributeError:
-            fn = itm.dirName()
-            isDir = True
+        else:
+            itm = browser.model().item(browser.currentIndex())
+            try:
+                fn = itm.fileName()
+                isDir = False
+            except AttributeError:
+                fn = itm.dirName()
+                isDir = True
         
         from CheckerPlugins.CodeStyleChecker.CodeStyleCheckerDialog import \
             CodeStyleCheckerDialog

eric ide

mercurial