MCPcopy
hub / github.com/arduino/Arduino / createTabs

Method createTabs

app/src/processing/app/Editor.java:1514–1527  ·  view source on GitHub ↗

Create tabs for each of the current sketch's files, removing any existing tabs.

()

Source from the content-addressed store, hash-verified

1512 * tabs.
1513 */
1514 public void createTabs() {
1515 tabs.clear();
1516 currentTabIndex = -1;
1517 tabs.ensureCapacity(sketch.getCodeCount());
1518 for (SketchFile file : sketch.getFiles()) {
1519 try {
1520 addTab(file, null);
1521 } catch(IOException e) {
1522 // TODO: Improve / move error handling
1523 System.err.println(e);
1524 }
1525 }
1526 selectTab(0);
1527 }
1528
1529 /**
1530 * Reorders tabs as per current sketch's files order

Callers 2

handleOpenInternalMethod · 0.95
handleActivatedMethod · 0.80

Calls 5

addTabMethod · 0.95
selectTabMethod · 0.95
getCodeCountMethod · 0.80
getFilesMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected