MCPcopy Index your code
hub / github.com/arduino/Arduino / openFiles

Method openFiles

app/src/processing/app/macosx/ThinkDifferent.java:85–103  ·  view source on GitHub ↗
(final AppEvent.OpenFilesEvent openFilesEvent)

Source from the content-addressed store, hash-verified

83 });
84 application.setOpenFileHandler(new OpenFilesHandler() {
85 @Override
86 public void openFiles(final AppEvent.OpenFilesEvent openFilesEvent) {
87 new Thread(() -> {
88 if (waitForBase()) {
89 for (File file : openFilesEvent.getFiles()) {
90 System.out.println(file);
91 try {
92 Base.INSTANCE.handleOpen(file);
93 List<Editor> editors = Base.INSTANCE.getEditors();
94 if (editors.size() == 2 && editors.get(0).getSketchController().isUntitled()) {
95 Base.INSTANCE.handleClose(editors.get(0));
96 }
97 } catch (Exception e) {
98 throw new RuntimeException(e);
99 }
100 }
101 }
102 }).start();
103 }
104 });
105 application.setQuitHandler(new QuitHandler() {
106 @Override

Callers

nothing calls this directly

Calls 10

waitForBaseMethod · 0.95
getFilesMethod · 0.80
handleOpenMethod · 0.80
getEditorsMethod · 0.80
sizeMethod · 0.80
isUntitledMethod · 0.80
getSketchControllerMethod · 0.80
handleCloseMethod · 0.80
startMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected