MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / loadPreferences

Method loadPreferences

ij/src/main/java/ij/Prefs.java:513–526  ·  view source on GitHub ↗

Opens the ImageJ preferences file ("IJ_Prefs.txt") file.

()

Source from the content-addressed store, hash-verified

511
512 /** Opens the ImageJ preferences file ("IJ_Prefs.txt") file. */
513 static void loadPreferences() {
514 String path = getPrefsDir()+separator+PREFS_NAME;
515 boolean ok = loadPrefs(path);
516 if (!ok) { // not found
517 if (IJ.isWindows())
518 path = ImageJDir +separator+PREFS_NAME;
519 else
520 path = System.getProperty("user.home")+separator+PREFS_NAME; //User's home dir
521 ok = loadPrefs(path);
522 if (ok)
523 new File(path).delete();
524 }
525
526 }
527
528 @AstroImageJ(reason = "Widen access", modified = true)
529 public static boolean loadPrefs(String path) {

Callers 1

loadMethod · 0.95

Calls 5

getPrefsDirMethod · 0.95
loadPrefsMethod · 0.95
isWindowsMethod · 0.95
getPropertyMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected