Search in sources :

Example 1 with StageUnstageEvent

use of org.rstudio.studio.client.workbench.views.vcs.common.events.StageUnstageEvent in project rstudio by rstudio.

the class GitChangelistTable method toggleStaged.

public void toggleStaged(boolean moveSelection) {
    ArrayList<StatusAndPath> items = getSelectedItems();
    if (items.size() > 0) {
        boolean unstage = items.get(0).getStatus().charAt(1) == ' ';
        fireEvent(new StageUnstageEvent(unstage, items));
        if (moveSelection) {
            moveSelectionDown();
        }
    }
}
Also used : StatusAndPath(org.rstudio.studio.client.common.vcs.StatusAndPath) StageUnstageEvent(org.rstudio.studio.client.workbench.views.vcs.common.events.StageUnstageEvent)

Aggregations

StatusAndPath (org.rstudio.studio.client.common.vcs.StatusAndPath)1 StageUnstageEvent (org.rstudio.studio.client.workbench.views.vcs.common.events.StageUnstageEvent)1