2645 |
2645 |
2646 @return programming language (string) |
2646 @return programming language (string) |
2647 """ |
2647 """ |
2648 return self.pdata["PROGLANGUAGE"][0] |
2648 return self.pdata["PROGLANGUAGE"][0] |
2649 |
2649 |
|
2650 def isPy3Project(self): |
|
2651 """ |
|
2652 Public method to check, if this project is a Python3 project. |
|
2653 |
|
2654 @return flag indicating a Python3 project (boolean) |
|
2655 """ |
|
2656 return self.pdata["PROGLANGUAGE"][0] == "Python3" |
|
2657 |
|
2658 def isPy2Project(self): |
|
2659 """ |
|
2660 Public method to check, if this project is a Python2 project. |
|
2661 |
|
2662 @return flag indicating a Python2 project (boolean) |
|
2663 """ |
|
2664 return self.pdata["PROGLANGUAGE"][0] in ["Python", "Python2"] |
|
2665 |
|
2666 def isRubyProject(self): |
|
2667 """ |
|
2668 Public method to check, if this project is a Ruby project. |
|
2669 |
|
2670 @return flag indicating a Ruby project (boolean) |
|
2671 """ |
|
2672 return self.pdata["PROGLANGUAGE"][0] == "Ruby" |
|
2673 |
2650 def getProjectSpellLanguage(self): |
2674 def getProjectSpellLanguage(self): |
2651 """ |
2675 """ |
2652 Public method to get the project's programming language. |
2676 Public method to get the project's programming language. |
2653 |
2677 |
2654 @return programming language (string) |
2678 @return programming language (string) |
3869 tbasename = os.path.splitext(tfn)[0] |
3893 tbasename = os.path.splitext(tfn)[0] |
3870 self.codeProfileAct.setEnabled( |
3894 self.codeProfileAct.setEnabled( |
3871 os.path.isfile("{0}.profile".format(basename)) or \ |
3895 os.path.isfile("{0}.profile".format(basename)) or \ |
3872 os.path.isfile("{0}.profile".format(tbasename))) |
3896 os.path.isfile("{0}.profile".format(tbasename))) |
3873 self.codeCoverageAct.setEnabled( |
3897 self.codeCoverageAct.setEnabled( |
3874 self.pdata["PROGLANGUAGE"][0] == "Python3" and \ |
3898 self.isPy3Project() and \ |
3875 (os.path.isfile("{0}.coverage".format(basename)) or \ |
3899 (os.path.isfile("{0}.coverage".format(basename)) or \ |
3876 os.path.isfile("{0}.coverage".format(tbasename)))) |
3900 os.path.isfile("{0}.coverage".format(tbasename)))) |
3877 else: |
3901 else: |
3878 self.codeProfileAct.setEnabled(False) |
3902 self.codeProfileAct.setEnabled(False) |
3879 self.codeCoverageAct.setEnabled(False) |
3903 self.codeCoverageAct.setEnabled(False) |