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

Method addTab

app/src/processing/app/Editor.java:1546–1553  ·  view source on GitHub ↗

Add a new tab. @param file The file to show in the tab. @param contents The contents to show in the tab, or null to load the contents from the given file. @throws IOException

(SketchFile file, String contents)

Source from the content-addressed store, hash-verified

1544 * @throws IOException
1545 */
1546 protected void addTab(SketchFile file, String contents) throws IOException {
1547 EditorTab tab = new EditorTab(this, file, contents);
1548 tab.getTextArea().getDocument()
1549 .addDocumentListener(new DocumentTextChangeListener(
1550 () -> updateUndoRedoState()));
1551 tabs.add(tab);
1552 reorderTabs();
1553 }
1554
1555 protected void removeTab(SketchFile file) throws IOException {
1556 int index = findTabIndex(file);

Callers 4

createTabsMethod · 0.95
initComponentsMethod · 0.80
nameCodeMethod · 0.80
addFileMethod · 0.80

Calls 4

getTextAreaMethod · 0.95
updateUndoRedoStateMethod · 0.95
reorderTabsMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected