MCPcopy Index your code
hub / github.com/benfry/processing4 / init

Method init

app/src/processing/app/Platform.java:90–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88
89
90 static public void init() {
91 try {
92 // Start with DefaultPlatform, but try to upgrade to a known platform
93 final String packageName = DefaultPlatform.class.getPackageName();
94 Class<?> platformClass =
95 Class.forName(packageName + ".DefaultPlatform");
96
97 if (Platform.isMacOS()) {
98 platformClass = Class.forName(packageName + ".MacPlatform");
99 } else if (Platform.isWindows()) {
100 platformClass = Class.forName(packageName + ".WindowsPlatform");
101 } else if (Platform.isLinux()) {
102 platformClass = Class.forName(packageName + ".LinuxPlatform");
103 }
104 inst = (DefaultPlatform) platformClass.getDeclaredConstructor().newInstance();
105
106 } catch (Exception e) {
107 Messages.showError("Problem Setting the Platform",
108 "An unknown error occurred while trying to load\n" +
109 "platform-specific code for your machine.", e);
110 }
111 }
112
113
114 static public void initBase(Base base) throws Exception {

Callers 4

createAndShowGUIMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
initMethod · 0.95

Calls 5

isMacOSMethod · 0.95
isWindowsMethod · 0.95
isLinuxMethod · 0.95
showErrorMethod · 0.95
getPackageNameMethod · 0.80

Tested by

no test coverage detected