void () { UISettings.getInstance().getState().setEditorTabLimit(1); openFiles(STRING.replace("pinned=\"true\"", "pinned=\"false\"")); assertOpenFiles("3.txt"); manager.closeAllFiles(); openFiles(STRING); // note that foo.xml is pinned assertOpenFiles("foo.xml"); manager.openFile(getFile("/src/3.txt"), true); // the limit is still 1, but a pinned flag prevents closing the tab, and the actual tab number may exceed the limit assertOpenFiles("foo.xml", "3.txt"); manager.closeAllFiles(); manager.openFile(getFile("/src/3.txt"), true); manager.openFile(getFile("/src/foo.xml"), true); assertOpenFiles("foo.xml"); callTrimToSize(); assertOpenFiles("foo.xml"); }