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

Method findTabIndex

app/src/processing/app/Editor.java:1487–1493  ·  view source on GitHub ↗

Finds the index of the tab showing the given file. Matches the file against EditorTab.getSketchFile() using ==. @returns The index of the tab for the given file, or -1 if no such tab was found.

(final SketchFile file)

Source from the content-addressed store, hash-verified

1485 * found.
1486 */
1487 public int findTabIndex(final SketchFile file) {
1488 for (int i = 0; i < tabs.size(); ++i) {
1489 if (tabs.get(i).getSketchFile() == file)
1490 return i;
1491 }
1492 return -1;
1493 }
1494
1495 /**
1496 * Finds the index of the tab showing the given file. Matches the file against

Callers 5

findTabMethod · 0.95
removeTabMethod · 0.95
statusErrorMethod · 0.95
nameCodeMethod · 0.80
addFileMethod · 0.80

Calls 5

sizeMethod · 0.80
getSketchFileMethod · 0.80
getMethod · 0.65
equalsMethod · 0.45
getFileMethod · 0.45

Tested by

no test coverage detected