45 the executable |
45 the executable |
46 @rtype dict |
46 @rtype dict |
47 """ |
47 """ |
48 global corbaExtensionPluginObject |
48 global corbaExtensionPluginObject |
49 |
49 |
50 exe = corbaExtensionPluginObject.getPreferences("omniidl") |
50 if corbaExtensionPluginObject is None: |
51 if not exe: |
51 data = { |
52 exe = "omniidl" |
52 "programEntry": False, |
53 if Globals.isWindowsPlatform(): |
53 "header": QCoreApplication.translate( |
54 exe += ".exe" |
54 "CorbaExtensionPlugin", "CORBA IDL Compiler" |
55 |
55 ), |
56 data = { |
56 "text": QCoreApplication.translate( |
57 "programEntry": True, |
57 "CorbaExtensionPlugin", "CORBA Support plugin is not activated" |
58 "header": "CORBA IDL compiler", |
58 ), |
59 "exe": exe, |
59 "version": QCoreApplication.translate("CorbaExtensionPlugin", "(inactive)"), |
60 "versionCommand": "-V", |
60 } |
61 "versionStartsWith": "omniidl", |
61 else: |
62 "versionRe": "", |
62 exe = corbaExtensionPluginObject.getPreferences("omniidl") |
63 "versionPosition": -1, |
63 if not exe: |
64 "version": "", |
64 exe = "omniidl" |
65 "versionCleanup": None, |
65 if Globals.isWindowsPlatform(): |
66 "exeModule": None, |
66 exe += ".exe" |
67 } |
67 |
|
68 data = { |
|
69 "programEntry": True, |
|
70 "header": QCoreApplication.translate( |
|
71 "CorbaExtensionPlugin", "CORBA IDL Compiler" |
|
72 ), |
|
73 "exe": exe, |
|
74 "versionCommand": "-V", |
|
75 "versionStartsWith": "omniidl", |
|
76 "versionRe": "", |
|
77 "versionPosition": -1, |
|
78 "version": "", |
|
79 "versionCleanup": None, |
|
80 "exeModule": None, |
|
81 } |
68 |
82 |
69 return data |
83 return data |
70 |
84 |
71 |
85 |
72 def getConfigData(): |
86 def getConfigData(): |
98 @param configDlg reference to the configuration dialog |
112 @param configDlg reference to the configuration dialog |
99 @type ConfigurationWidget |
113 @type ConfigurationWidget |
100 @return reference to the configuration page |
114 @return reference to the configuration page |
101 @rtype CorbaPage |
115 @rtype CorbaPage |
102 """ |
116 """ |
|
117 from ExtensionCorba.ConfigurationPage.CorbaPage import CorbaPage |
|
118 |
103 global corbaExtensionPluginObject |
119 global corbaExtensionPluginObject |
104 |
|
105 from ExtensionCorba.ConfigurationPage.CorbaPage import CorbaPage |
|
106 |
120 |
107 page = CorbaPage(corbaExtensionPluginObject) |
121 page = CorbaPage(corbaExtensionPluginObject) |
108 return page |
122 return page |
109 |
123 |
110 |
124 |
115 Preferences.getSettings().remove(CorbaExtensionPlugin.PreferencesKey) |
129 Preferences.getSettings().remove(CorbaExtensionPlugin.PreferencesKey) |
116 |
130 |
117 |
131 |
118 class CorbaExtensionPlugin(QObject): |
132 class CorbaExtensionPlugin(QObject): |
119 """ |
133 """ |
120 Class documentation goes here. |
134 Class implementing a plugin to add support for CORBA development. |
121 """ |
135 """ |
122 |
136 |
123 PreferencesKey = "Corba" |
137 PreferencesKey = "Corba" |
124 |
138 |
125 def __init__(self, ui): |
139 def __init__(self, ui): |
139 |
153 |
140 def __initialize(self): |
154 def __initialize(self): |
141 """ |
155 """ |
142 Private slot to (re)initialize the plugin. |
156 Private slot to (re)initialize the plugin. |
143 """ |
157 """ |
|
158 global corbaExtensionPluginObject |
|
159 corbaExtensionPluginObject = None |
|
160 |
144 self.__browser = None |
161 self.__browser = None |
145 |
162 |
146 def activate(self): |
163 def activate(self): |
147 """ |
164 """ |
148 Public method to activate this plug-in. |
165 Public method to activate this plug-in. |