public void testOpenOfDeletedFile() throws Exception {
Git git = Git.wrap(lookupRepository(repoFile));
git.rm().addFilepattern(FILE1_PATH).call();
RevCommit commit = git.commit().setMessage("Delete file").call();
SWTBotTable commitsTable = getHistoryViewTable(PROJ1);
assertEquals(commitCount + 1, commitsTable.rowCount());
commitsTable.select(0);
SWTBot viewBot = getHistoryViewBot();
SWTBotTable fileDiffTable = viewBot.table(1);
assertEquals(1, fileDiffTable.rowCount());
fileDiffTable.select(0);
assertFalse(fileDiffTable.contextMenu(
UIText.CommitFileDiffViewer_OpenInEditorMenuLabel).isEnabled());
fileDiffTable.contextMenu(
UIText.CommitFileDiffViewer_OpenPreviousInEditorMenuLabel)
.click();
// Editor for old file version should be opened
bot.editorByTitle(FILE1 + " " + commit.getParent(0).getName());