public override void OnSelect(List <string> paths) { GitCore.StagePaths(paths, (output) => { GitEvents.TriggerOnLocalChange(); }); }
private void RenderStageButtons() { bool noneSelected = (unstagedFileViewer.GetSelectedPaths().Count == 0); bool noFiles = (unstagedFiles.Count == 0); EditorGUILayout.BeginHorizontal(); //STAGE SELECTED EditorGUI.BeginDisabledGroup(noneSelected); if (GUILayout.Button("Stage Selected", GUILayout.ExpandWidth(false))) { GitCore.StagePaths(unstagedFileViewer.GetSelectedPaths(), null); Scan(); } EditorGUI.EndDisabledGroup(); //STAGE ALL EditorGUI.BeginDisabledGroup(noFiles); if (GUILayout.Button("Stage All", GUILayout.ExpandWidth(false))) { GitCore.StagePaths(GitFile.GetPaths(unstagedFiles), null); Scan(); } EditorGUI.EndDisabledGroup(); EditorGUILayout.EndHorizontal(); }