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)
| 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); |
no test coverage detected