23 from eric7.Preferences.Shortcuts import readShortcuts |
23 from eric7.Preferences.Shortcuts import readShortcuts |
24 |
24 |
25 try: |
25 try: |
26 from eric7.SystemUtilities.FileSystemUtilities import normcasepath |
26 from eric7.SystemUtilities.FileSystemUtilities import normcasepath |
27 except ImportError: |
27 except ImportError: |
28 # imports for eric < 23.1 |
28 # backward compatibility for eric < 23.1 |
29 from eric7.Utilities import normcasepath |
29 from eric7.Utilities import normcasepath |
30 try: |
30 try: |
31 from eric7.SystemUtilities.PythonUtilities import ( |
31 from eric7.SystemUtilities.PythonUtilities import ( |
32 getPythonExecutable, |
32 getPythonExecutable, |
33 getPythonLibraryDirectory, |
33 getPythonLibraryDirectory, |
34 ) |
34 ) |
35 except ImportError: |
35 except ImportError: |
36 # imports for eric < 23.1 |
36 # backward compatibility for eric < 23.1 |
37 from eric7.Globals import getPythonExecutable, getPythonLibraryDirectory |
37 from eric7.Globals import getPythonExecutable, getPythonLibraryDirectory |
38 try: |
38 try: |
39 from eric7.SystemUtilities.FileSystemUtilities import isRemoteFileName |
39 from eric7.SystemUtilities.FileSystemUtilities import isRemoteFileName |
40 except ImportError: |
40 except ImportError: |
41 # imports for eric < 24.1 |
41 # backward compatibility for eric < 24.1 |
42 from .RefactoringRope.RopeUtilities import isRemoteFileName |
42 from .RefactoringRope.RopeUtilities import isRemoteFileName |
43 |
43 |
44 from .RopeProgressDialog import RopeProgressDialog |
44 from .RopeProgressDialog import RopeProgressDialog |
45 |
45 |
46 |
46 |
58 @param parent parent |
58 @param parent parent |
59 @type QObject |
59 @type QObject |
60 """ |
60 """ |
61 from .FileSystemCommands import EricFileSystemCommands |
61 from .FileSystemCommands import EricFileSystemCommands |
62 |
62 |
63 super().__init__("RefactoringServer", parent=parent) |
63 try: |
|
64 super().__init__( |
|
65 name="RefactoringServer", |
|
66 interface=Preferences.getDebugger("NetworkInterface"), |
|
67 parent=parent, |
|
68 ) |
|
69 except TypeError: |
|
70 # backward compatibility for eric < 24.10 |
|
71 super().__init__( |
|
72 name="RefactoringServer", |
|
73 parent=parent, |
|
74 ) |
64 |
75 |
65 self.__plugin = plugin |
76 self.__plugin = plugin |
66 self.__ui = parent |
77 self.__ui = parent |
67 self.__vm = ericApp().getObject("ViewManager") |
78 self.__vm = ericApp().getObject("ViewManager") |
68 self.__ericProject = ericApp().getObject("Project") |
79 self.__ericProject = ericApp().getObject("Project") |