1616
1717import org .jabref .gui .externalfiles .ImportHandler ;
1818import org .jabref .gui .importer .NewEntryAction ;
19+ import org .jabref .gui .util .DefaultTaskExecutor ;
1920import org .jabref .gui .util .TaskExecutor ;
2021import org .jabref .logic .importer .FetcherClientException ;
2122import org .jabref .logic .importer .FetcherException ;
2425import org .jabref .logic .importer .WebFetchers ;
2526import org .jabref .logic .importer .fetcher .DoiFetcher ;
2627import org .jabref .logic .l10n .Localization ;
28+ import org .jabref .logic .layout .format .Default ;
2729import org .jabref .model .entry .BibEntry ;
2830import org .jabref .model .entry .types .StandardEntryType ;
2931import org .jabref .model .strings .StringUtil ;
@@ -131,7 +133,6 @@ private class FetcherWorker extends Task<Optional<BibEntry>> {
131133
132134 @ Override
133135 protected Optional <BibEntry > call () throws FetcherException {
134- searchingProperty ().setValue (true );
135136 storeSelectedFetcher ();
136137 fetcher = selectedItemProperty ().getValue ();
137138 searchID = idText .getValue ();
@@ -144,7 +145,8 @@ protected Optional<BibEntry> call() throws FetcherException {
144145
145146 public void runFetcherWorker () {
146147 searchSuccesfulProperty .set (false );
147- fetcherWorker .run ();
148+ searchingProperty ().setValue (true );
149+ taskExecutor .execute (fetcherWorker );
148150 fetcherWorker .setOnFailed (event -> {
149151 Throwable exception = fetcherWorker .getException ();
150152 String fetcherExceptionMessage = exception .getMessage ();
0 commit comments