MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / main

Method main

src/main/java/fieldbox/FieldBox.java:31–102  ·  view source on GitHub ↗
(String[] s)

Source from the content-addressed store, hash-verified

29 public void go() {
30 RunLoop.main.enterMainLoop();
31 }
32
33
34 static public void main(String[] s) {
35// SwingUtilities.invokeLater(() -> {
36 args = s;
37 Options.parseCommandLine(s);
38
39 // needs to be initialized after 'args'
40 workspace = Options.getDirectory("workspace", () -> System.getProperty("user.home") + "/Documents/FieldWorkspace/");
41
42
43 System.err.println(" lauching toolkit");
44 if (Main.os == Main.OS.mac) {
45 System.setProperty("java.awt.headless", "true");
46 Toolkit.getDefaultToolkit();
47
48 // this possibly works on windows?
49
50// Desktop.getDesktop().setOpenFileHandler(new OpenFilesHandler() {
51// @Override
52// public void openFiles(OpenFilesEvent e) {
53// System.out.println("\n\n!! open files !! \n\n" + e);
54// }
55// });
56 }
57
58 LoggingDefaults.initialize();
59
60// try {
61// Thread.sleep(20000);
62// } catch (InterruptedException e) {
63// e.printStackTrace();
64// }
65// System.err.println(" finished hanging out");
66
67// glfwInit();
68
69
70 new Thread() {
71 @Override
72 public void run() {
73 CefSystem hello = CefSystem.cefSystem;
74 System.out.println("final cef system is called "+hello);
75 }
76 }.start();
77
78 Windows.windows.init();
79
80 fieldBox.io = new IO(workspace);
81 fieldBox.io.addFilespec("code", IO.EXECUTION, IO.EXECUTION);
82
83 new Open(Options.getString("file", () -> "testIB.field2"));
84
85// SplashScreen splash = SplashScreen.getSplashScreen();
86// if (splash != null)
87// splash.close();
88

Callers

nothing calls this directly

Calls 12

parseCommandLineMethod · 0.95
getDirectoryMethod · 0.95
initializeMethod · 0.95
getStringMethod · 0.95
upgradeMethod · 0.80
enterMainLoopMethod · 0.80
addFilespecMethod · 0.80
equalsMethod · 0.45
printlnMethod · 0.45
startMethod · 0.45
initMethod · 0.45
goMethod · 0.45

Tested by

no test coverage detected