File tree Expand file tree Collapse file tree
src/main/java/com/laker/postman/panel/collections Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,9 +248,7 @@ private void importCurlToCollection(String defaultCurl) {
248248 try {
249249 CurlRequest curlRequest = CurlParser .parse (curlText );
250250 if (curlRequest .url == null ) {
251- JOptionPane .showMessageDialog (mainFrame ,
252- I18nUtil .getMessage (MessageKeys .COLLECTIONS_IMPORT_CURL_PARSE_FAIL ),
253- I18nUtil .getMessage (MessageKeys .GENERAL_ERROR ), JOptionPane .ERROR_MESSAGE );
251+ NotificationUtil .showError (I18nUtil .getMessage (MessageKeys .COLLECTIONS_IMPORT_CURL_PARSE_FAIL ));
254252 return ;
255253 }
256254 // 构造HttpRequestItem
@@ -310,9 +308,7 @@ private void importCurlToCollection(String defaultCurl) {
310308 Toolkit .getDefaultToolkit ().getSystemClipboard ().setContents (new StringSelection ("" ), null );
311309 }
312310 } catch (Exception ex ) {
313- JOptionPane .showMessageDialog (mainFrame ,
314- I18nUtil .getMessage (MessageKeys .COLLECTIONS_IMPORT_CURL_PARSE_ERROR , ex .getMessage ()),
315- I18nUtil .getMessage (MessageKeys .GENERAL_ERROR ), JOptionPane .ERROR_MESSAGE );
311+ NotificationUtil .showError (I18nUtil .getMessage (MessageKeys .COLLECTIONS_IMPORT_CURL_PARSE_ERROR , ex .getMessage ()));
316312 }
317313 }
318314
Original file line number Diff line number Diff line change 1616import com .laker .postman .service .http .HttpUtil ;
1717import com .laker .postman .util .I18nUtil ;
1818import com .laker .postman .util .MessageKeys ;
19+ import com .laker .postman .util .NotificationUtil ;
1920import jiconfont .icons .font_awesome .FontAwesome ;
2021import jiconfont .swing .IconFontSwing ;
2122import lombok .Getter ;
@@ -586,9 +587,7 @@ public void mousePressed(MouseEvent e) {
586587 return ;
587588 }
588589 } catch (Exception ex ) {
589- JOptionPane .showMessageDialog (SingletonFactory .getInstance (RequestEditPanel .class ),
590- I18nUtil .getMessage (MessageKeys .PARSE_CURL_ERROR , ex .getMessage ()),
591- I18nUtil .getMessage (MessageKeys .ERROR ), JOptionPane .ERROR_MESSAGE );
590+ NotificationUtil .showError (I18nUtil .getMessage (MessageKeys .PARSE_CURL_ERROR , ex .getMessage ()));
592591 }
593592 }
594593 }
You can’t perform that action at this time.
0 commit comments