Minimized direct access to the pdata structure of the Project class.

Sat, 26 Nov 2016 14:31:40 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Nov 2016 14:31:40 +0100
changeset 127
1c7a8660933f
parent 126
43576a502337
child 128
acd1a226379a

Minimized direct access to the pdata structure of the Project class.

AssistantEric/APIsManager.py file | annotate | diff | comparison | revisions
PluginAssistantEric.py file | annotate | diff | comparison | revisions
PluginAssistantEric.zip file | annotate | diff | comparison | revisions
--- a/AssistantEric/APIsManager.py	Sat Jul 09 12:23:01 2016 +0200
+++ b/AssistantEric/APIsManager.py	Sat Nov 26 14:31:40 2016 +0100
@@ -944,16 +944,20 @@
             (boolean)
         @return list of project form sources (list of strings)
         """
-        if self.__project.pdata["PROGLANGUAGE"][0] in ["Python", "Python2",
-                                                       "Python3"]:
+        if self.__project.getProjectLanguage() in ["Python", "Python2",
+                                                   "Python3"]:
             sourceExt = ".py"
-        elif self.__project.pdata["PROGLANGUAGE"][0] == "Ruby":
+        elif self.__project.getProjectLanguage() == "Ruby":
             sourceExt = ".rb"
         else:
             return []
         
         formsSources = []
-        for fn in self.__project.pdata["FORMS"]:
+        try:
+            forms = self.__project.getProjectFiles("FORMS")
+        except AttributeError:
+            forms = self.__project.pdata["FORMS"]
+        for fn in forms:
             ofn = os.path.splitext(fn)[0]
             dirname, filename = os.path.split(ofn)
             formSource = os.path.join(dirname, "Ui_" + filename + sourceExt)
--- a/PluginAssistantEric.py	Sat Jul 09 12:23:01 2016 +0200
+++ b/PluginAssistantEric.py	Sat Nov 26 14:31:40 2016 +0100
@@ -24,7 +24,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "3.1.2"
+version = "3.1.3"
 className = "AssistantEricPlugin"
 packageName = "AssistantEric"
 shortDescription = "Alternative autocompletion and calltips provider."
Binary file PluginAssistantEric.zip has changed

eric ide

mercurial