-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process CLI arguments before starting gui (#9217)
* Process CLI arguments before starting gui * Display logs on ui thread * Demote some of the log calls to debug * Remove unused test class
- Loading branch information
1 parent
b871301
commit c827c43
Showing
9 changed files
with
112 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.jabref.gui; | ||
|
||
import java.util.List; | ||
|
||
import javafx.application.Application; | ||
import javafx.stage.Stage; | ||
|
||
import org.jabref.gui.openoffice.OOBibBaseConnect; | ||
import org.jabref.logic.importer.ParserResult; | ||
import org.jabref.preferences.JabRefPreferences; | ||
|
||
/** | ||
* JabRef's main class to process command line options and to start the UI | ||
*/ | ||
public class MainApplication extends Application { | ||
private static List<ParserResult> parserResults; | ||
private static boolean isBlank; | ||
private static JabRefPreferences preferences; | ||
|
||
public static void create(List<ParserResult> parserResults, boolean blank, JabRefPreferences preferences) { | ||
MainApplication.parserResults = parserResults; | ||
MainApplication.isBlank = blank; | ||
MainApplication.preferences = preferences; | ||
launch(); | ||
} | ||
|
||
@Override | ||
public void start(Stage mainStage) { | ||
FallbackExceptionHandler.installExceptionHandler(); | ||
|
||
Globals.startBackgroundTasks(); | ||
new JabRefGUI(mainStage, parserResults, isBlank, preferences); | ||
} | ||
|
||
@Override | ||
public void stop() { | ||
OOBibBaseConnect.closeOfficeConnection(); | ||
Globals.stopBackgroundTasks(); | ||
Globals.shutdownThreadPools(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.