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

Method openRecent

ij/src/main/java/ij/Executer.java:247–257  ·  view source on GitHub ↗

Opens a file from the File/Open Recent menu and returns 'true' if successful.

(String cmd)

Source from the content-addressed store, hash-verified

245 /** Opens a file from the File/Open Recent menu
246 and returns 'true' if successful. */
247 boolean openRecent(String cmd) {
248 Menu menu = Menus.getOpenRecentMenu();
249 if (menu==null) return false;
250 for (int i=0; i<menu.getItemCount(); i++) {
251 if (menu.getItem(i).getLabel().equals(cmd)) {
252 IJ.open(cmd);
253 return true;
254 }
255 }
256 return false;
257 }
258
259 /** Returns the last command executed. Returns null
260 if no command has been executed. */

Callers 1

runCommandMethod · 0.95

Calls 4

getOpenRecentMenuMethod · 0.95
openMethod · 0.95
getLabelMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected