Search in sources :

Example 1 with ShowSelectionHistoryAction

use of com.intellij.history.integration.ui.actions.ShowSelectionHistoryAction in project intellij-community by JetBrains.

the class LocalHistoryActionsTest method testShowSelectionHistoryActionForSelection.

public void testShowSelectionHistoryActionForSelection() throws Exception {
    editor.getSelectionModel().setSelection(0, 2);
    ShowSelectionHistoryAction a = new ShowSelectionHistoryAction();
    AnActionEvent e = createEventFor(a, new VirtualFile[] { f }, myProject);
    a.update(e);
    assertTrue(e.getPresentation().isEnabled());
    assertEquals("Show History for Selection", e.getPresentation().getText());
}
Also used : ShowSelectionHistoryAction(com.intellij.history.integration.ui.actions.ShowSelectionHistoryAction) AnActionEvent(com.intellij.openapi.actionSystem.AnActionEvent)

Example 2 with ShowSelectionHistoryAction

use of com.intellij.history.integration.ui.actions.ShowSelectionHistoryAction in project intellij-community by JetBrains.

the class LocalHistoryActionsTest method testShowSelectionHistoryActionIsDisabledForEmptySelection.

public void testShowSelectionHistoryActionIsDisabledForEmptySelection() throws Exception {
    ShowSelectionHistoryAction a = new ShowSelectionHistoryAction();
    assertStatus(a, f, false);
}
Also used : ShowSelectionHistoryAction(com.intellij.history.integration.ui.actions.ShowSelectionHistoryAction)

Example 3 with ShowSelectionHistoryAction

use of com.intellij.history.integration.ui.actions.ShowSelectionHistoryAction in project intellij-community by JetBrains.

the class LocalHistoryActionsTest method testShowSelectionHistoryActionIsDisabledForNonFiles.

public void testShowSelectionHistoryActionIsDisabledForNonFiles() throws IOException {
    ShowSelectionHistoryAction a = new ShowSelectionHistoryAction();
    assertStatus(a, myRoot, false);
    assertStatus(a, null, false);
}
Also used : ShowSelectionHistoryAction(com.intellij.history.integration.ui.actions.ShowSelectionHistoryAction)

Aggregations

ShowSelectionHistoryAction (com.intellij.history.integration.ui.actions.ShowSelectionHistoryAction)3 AnActionEvent (com.intellij.openapi.actionSystem.AnActionEvent)1