public override void OnSelect(List <string> paths)
 {
     GitCore.StagePaths(paths, (output) =>
     {
         GitEvents.TriggerOnLocalChange();
     });
 }
예제 #2
0
        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();
        }