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

Method run

ij/src/main/java/ij/io/OpenDialog.java:164–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162 try {
163 EventQueue.invokeAndWait(new Runnable() {
164 public void run() {
165 AIJFileChooser fc = new AIJFileChooser();
166 fc.setReferenceWindow(parent);
167 fc.setDialogTitle(title);
168 fc.setDragEnabled(true);
169 fc.setTransferHandler(new DragAndDropHandler(fc));
170 File fdir = null;
171 if (path!=null)
172 fdir = new File(path);
173 if (fdir!=null)
174 fc.setCurrentDirectory(fdir);
175 if (fileName!=null)
176 fc.setSelectedFile(new File(fileName));
177 int returnVal = fc.showOpenDialog(IJ.getInstance());
178 if (returnVal!=JFileChooser.APPROVE_OPTION && isMacro)
179 {Interpreter.abort(); return;}
180 File file = fc.getSelectedFile();
181 if (file==null && isMacro)
182 {Interpreter.abort(); return;}
183 name = file.getName();
184 dir = fc.getCurrentDirectory().getPath()+File.separator;
185 }
186 });
187 } catch (Exception e) {}
188 }

Callers

nothing calls this directly

Calls 5

setReferenceWindowMethod · 0.95
getInstanceMethod · 0.95
abortMethod · 0.95
getNameMethod · 0.65
getPathMethod · 0.45

Tested by

no test coverage detected