@@ -146,15 +146,9 @@ private boolean checkIfEimPathMacOsIsInApplications()
146146 private void handleOldConfigExport ()
147147 {
148148 Display display = Display .getDefault ();
149-
150- GlobalModalLock .showModal (() -> MessageDialog .openQuestion (display .getActiveShell (),
151- Messages .OldConfigFoundMsgBoxTitle , Messages .OldConfigFoundMsgBoxMsg ), response -> {
152- if (response )
153- {
154- startExportOldConfig ();
155- }
156- });
157-
149+ display .asyncExec (()-> {
150+ startExportOldConfig ();
151+ });
158152 }
159153
160154 private void startExportOldConfig ()
@@ -184,31 +178,42 @@ else if (!StringUtil.isEmpty(eimPathEnvVar))
184178 if (status .getSeverity () != IStatus .ERROR )
185179 {
186180 preferences .putBoolean (EimConstants .OLD_CONFIG_EXPORTED_FLAG , true );
187- displayInformationMessageBox (Messages .OldConfigExportCompleteSuccessMsgTitle ,
188- Messages .OldConfigExportCompleteSuccessMsg );
181+ writeToStandardConsoleStream (Messages .OldConfigExportCompleteSuccessMsg );
189182 }
190183 else
191184 {
192- displayInformationMessageBox (Messages .OldConfigExportCompleteFailMsgTitle ,
193- Messages .OldConfigExportCompleteFailMsg );
185+ writeToErrorConsoleStream (Messages .OldConfigExportCompleteFailMsg );
194186 }
195187 }
196188 catch (IOException e )
197189 {
198190 Logger .log ("Error exporting old configuration" , e );
199- displayInformationMessageBox (Messages .OldConfigExportCompleteFailMsgTitle ,
200- Messages .OldConfigExportCompleteFailMsg );
191+ writeToErrorConsoleStream (Messages .OldConfigExportCompleteFailMsg );
201192 }
202193 }
203-
204- private void displayInformationMessageBox (String messageTitle , String message )
194+
195+ private void writeToStandardConsoleStream (String msg )
205196 {
206- Display display = Display .getDefault ();
207- GlobalModalLock .showModal (() -> {
208- MessageDialog .openInformation (display .getActiveShell (), messageTitle , message );
209- return null ;
210- }, ignored -> {
211- });
197+ try
198+ {
199+ standardConsoleStream .write (msg );
200+ }
201+ catch (IOException e )
202+ {
203+ Logger .log (e );
204+ }
205+ }
206+
207+ private void writeToErrorConsoleStream (String msg )
208+ {
209+ try
210+ {
211+ errorConsoleStream .write (msg );
212+ }
213+ catch (IOException e )
214+ {
215+ Logger .log (e );
216+ }
212217 }
213218
214219 private void closeEspIdfManager ()
0 commit comments