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

Method setPrefs

ij/src/main/java/ij/gui/Toolbar.java:1914–1930  ·  view source on GitHub ↗
(int id)

Source from the content-addressed store, hash-verified

1912 }
1913
1914 private void setPrefs(int id) {
1915 if (doNotSavePrefs)
1916 return;
1917 boolean ok = isBuiltInTool(names[id]);
1918 String prefsName = instance.names[id];
1919 if (!ok) {
1920 String name = names[id];
1921 int i = name.indexOf(" ("); // remove any hint in parens
1922 if (i>0) {
1923 name = name.substring(0, i);
1924 prefsName=name;
1925 }
1926 }
1927 int index = id - CUSTOM1;
1928 String key = TOOL_KEY + (index/10)%10 + index%10;
1929 Prefs.set(key, prefsName);
1930 }
1931
1932 private boolean isBuiltInTool(String name) {
1933 for (int i=0; i<builtInTools2.length; i++) {

Callers 2

addMacroToolMethod · 0.95
addPlugInToolMethod · 0.80

Calls 4

isBuiltInToolMethod · 0.95
setMethod · 0.95
substringMethod · 0.80
indexOfMethod · 0.45

Tested by

no test coverage detected