1666 @param key key of the property |
1666 @param key key of the property |
1667 @type str |
1667 @type str |
1668 @return value of the property |
1668 @return value of the property |
1669 @rtype Any |
1669 @rtype Any |
1670 """ |
1670 """ |
1671 if ( |
1671 if key == "INTERPRETER" and not FileSystemUtilities.isRemoteFileName( |
1672 key == "INTERPRETER" |
1672 self.ppath |
1673 and not FileSystemUtilities.isRemoteFileName(self.ppath) |
|
1674 ): |
1673 ): |
1675 return ( |
1674 return ( |
1676 ericApp() |
1675 ericApp() |
1677 .getObject("VirtualEnvManager") |
1676 .getObject("VirtualEnvManager") |
1678 .getVirtualenvInterpreter(self.debugProperties["VIRTUALENV"]) |
1677 .getVirtualenvInterpreter(self.debugProperties["VIRTUALENV"]) |
2060 ) |
2059 ) |
2061 if isRemote |
2060 if isRemote |
2062 else os.path.join(target, os.path.basename(fn)) |
2061 else os.path.join(target, os.path.basename(fn)) |
2063 ) |
2062 ) |
2064 if not FileSystemUtilities.samepath( |
2063 if not FileSystemUtilities.samepath( |
2065 self.__remotefsInterface.dirname(fn) |
2064 ( |
2066 if isRemote |
2065 self.__remotefsInterface.dirname(fn) |
2067 else os.path.dirname(fn), |
2066 if isRemote |
|
2067 else os.path.dirname(fn) |
|
2068 ), |
2068 target, |
2069 target, |
2069 ): |
2070 ): |
2070 try: |
2071 try: |
2071 if isRemote: |
2072 if isRemote: |
2072 if not self.__remotefsInterface.isdir(target): |
2073 if not self.__remotefsInterface.isdir(target): |
2547 ]: |
2548 ]: |
2548 for entry in self.__pdata[fileCategory][:]: |
2549 for entry in self.__pdata[fileCategory][:]: |
2549 if entry.startswith(olddn): |
2550 if entry.startswith(olddn): |
2550 entry = entry.replace(olddn, newdn) |
2551 entry = entry.replace(olddn, newdn) |
2551 self.appendFile( |
2552 self.appendFile( |
2552 self.__remotefsInterface.join(self.ppath, entry) |
2553 ( |
2553 if isRemote |
2554 self.__remotefsInterface.join(self.ppath, entry) |
2554 else os.path.join(self.ppath, entry), |
2555 if isRemote |
|
2556 else os.path.join(self.ppath, entry) |
|
2557 ), |
2555 fileCategory == "SOURCES", |
2558 fileCategory == "SOURCES", |
2556 ) |
2559 ) |
2557 self.setDirty(True) |
2560 self.setDirty(True) |
2558 |
2561 |
2559 def moveDirectory(self, olddn, newdn): |
2562 def moveDirectory(self, olddn, newdn): |
3318 self.__remotefsInterface.splitext(mainscript)[0] |
3321 self.__remotefsInterface.splitext(mainscript)[0] |
3319 or self.__remotefsInterface.basename(tslist[0]).split("_")[ |
3322 or self.__remotefsInterface.basename(tslist[0]).split("_")[ |
3320 0 |
3323 0 |
3321 ] |
3324 ] |
3322 ) |
3325 ) |
3323 self.__pdata[ |
3326 self.__pdata["TRANSLATIONPATTERN"] = ( |
3324 "TRANSLATIONPATTERN" |
3327 self.__remotefsInterface.join( |
3325 ] = self.__remotefsInterface.join( |
3328 self.__remotefsInterface.dirname(tslist[0]), |
3326 self.__remotefsInterface.dirname(tslist[0]), |
3329 "{0}_%language%{1}".format( |
3327 "{0}_%language%{1}".format( |
3330 self.__remotefsInterface.basename(tslist[0]).split( |
3328 self.__remotefsInterface.basename(tslist[0]).split("_")[ |
3331 "_" |
3329 0 |
3332 )[0], |
3330 ], |
3333 self.__remotefsInterface.splitext(tslist[0])[1], |
3331 self.__remotefsInterface.splitext(tslist[0])[1], |
3334 ), |
3332 ), |
3335 ) |
3333 ) |
3336 ) |
3334 else: |
3337 else: |
3335 mainscriptname = ( |
3338 mainscriptname = ( |
3336 os.path.splitext(mainscript)[0] |
3339 os.path.splitext(mainscript)[0] |
3337 or os.path.basename(tslist[0]).split("_")[0] |
3340 or os.path.basename(tslist[0]).split("_")[0] |
6165 for idx, rp in enumerate(self.recent, start=1): |
6168 for idx, rp in enumerate(self.recent, start=1): |
6166 formatStr = "&{0:d}. {1}" if idx < 10 else "{0:d}. {1}" |
6169 formatStr = "&{0:d}. {1}" if idx < 10 else "{0:d}. {1}" |
6167 act = self.recentMenu.addAction( |
6170 act = self.recentMenu.addAction( |
6168 formatStr.format( |
6171 formatStr.format( |
6169 idx, |
6172 idx, |
6170 self.__remotefsInterface.compactPath(rp, self.ui.maxMenuFilePathLen) |
6173 ( |
6171 if FileSystemUtilities.isRemoteFileName(rp) |
6174 self.__remotefsInterface.compactPath( |
6172 else FileSystemUtilities.compactPath( |
6175 rp, self.ui.maxMenuFilePathLen |
6173 rp, self.ui.maxMenuFilePathLen |
6176 ) |
|
6177 if FileSystemUtilities.isRemoteFileName(rp) |
|
6178 else FileSystemUtilities.compactPath( |
|
6179 rp, self.ui.maxMenuFilePathLen |
|
6180 ) |
6174 ), |
6181 ), |
6175 ) |
6182 ) |
6176 ) |
6183 ) |
6177 act.setData(rp) |
6184 act.setData(rp) |
6178 if FileSystemUtilities.isRemoteFileName(rp): |
6185 if FileSystemUtilities.isRemoteFileName(rp): |