# eric6.Plugins.VcsPlugins.vcsGit.ProjectBrowserHelper

Module implementing the VCS project browser helper for Git.

### Global Attributes

None

### Classes

GitProjectBrowserHelper | Class implementing the VCS project browser helper for Git.

### Functions

None

## GitProjectBrowserHelper

Class implementing the VCS project browser helper for Git.

### Derived from

VcsProjectBrowserHelper

### Class Attributes

None

### Class Methods

None

### Methods

GitProjectBrowserHelper | Constructor
__GitBlame | Private slot called by the context menu to show the annotations of a file.
__GitConfigure | Private method to open the configuration dialog.
__GitCopy | Private slot called by the context menu to copy the selected file.
__GitExtendedDiff | Private slot called by the context menu to show the difference of a file to the repository.
__GitForget | Private slot called by the context menu to remove the selected file from the Git repository leaving a copy in the project directory.
__GitMove | Private slot called by the context menu to move the selected file.
__GitRevert | Private slot to revert changes of the working area.
__GitSbsDiff | Private slot called by the context menu to show the difference of a file to the repository side-by-side.
__GitSbsExtendedDiff | Private slot called by the context menu to show the difference of a file to the repository side-by-side.
__GitUnstage | Private slot to unstage changes.
_addVCSMenu | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuBack | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuDir | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuDirMulti | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuMulti | Protected method used to add the VCS menu for multi selection to all project browsers.
showContextMenu | Public slot called before the context menu is shown.
showContextMenuDir | Public slot called before the context menu is shown.
showContextMenuDirMulti | Public slot called before the context menu is shown.
showContextMenuMulti | Public slot called before the context menu (multiple selections) is shown.

### Static Methods

None

#### GitProjectBrowserHelper (Constructor)

GitProjectBrowserHelper(vcsObject, browserObject, projectObject, isTranslationsBrowser, parent=None, name=None)

Constructor

vcsObject
  reference to the vcs object
browserObject
  reference to the project browser object
projectObject
  reference to the project object
isTranslationsBrowser
  flag indicating, the helper is requested for the translations browser (this needs some special treatment)
parent
  parent widget (QWidget)
name
  name of this object (string)

#### GitProjectBrowserHelper.__GitBlame

__GitBlame()

Private slot called by the context menu to show the annotations of a file.

#### GitProjectBrowserHelper.__GitConfigure

__GitConfigure()

Private method to open the configuration dialog.

#### GitProjectBrowserHelper.__GitCopy

__GitCopy()

Private slot called by the context menu to copy the selected file.

#### GitProjectBrowserHelper.__GitExtendedDiff

__GitExtendedDiff()

Private slot called by the context menu to show the difference of a file to the repository.

This gives the chance to enter the revisions to compare.

#### GitProjectBrowserHelper.__GitForget

__GitForget()

Private slot called by the context menu to remove the selected file from the Git repository leaving a copy in the project directory.

#### GitProjectBrowserHelper.__GitMove

__GitMove()

Private slot called by the context menu to move the selected file.

#### GitProjectBrowserHelper.__GitRevert

__GitRevert()

Private slot to revert changes of the working area.

#### GitProjectBrowserHelper.__GitSbsDiff

__GitSbsDiff()

Private slot called by the context menu to show the difference of a file to the repository side-by-side.

#### GitProjectBrowserHelper.__GitSbsExtendedDiff

__GitSbsExtendedDiff()

Private slot called by the context menu to show the difference of a file to the repository side-by-side.

It allows the selection of revisions to compare.

#### GitProjectBrowserHelper.__GitUnstage

__GitUnstage()

Private slot to unstage changes.

#### GitProjectBrowserHelper._addVCSMenu

_addVCSMenu(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu
  reference to the menu to be amended

#### GitProjectBrowserHelper._addVCSMenuBack

_addVCSMenuBack(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu
  reference to the menu to be amended

#### GitProjectBrowserHelper._addVCSMenuDir

_addVCSMenuDir(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu
  reference to the menu to be amended

#### GitProjectBrowserHelper._addVCSMenuDirMulti

_addVCSMenuDirMulti(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu
  reference to the menu to be amended

#### GitProjectBrowserHelper._addVCSMenuMulti

_addVCSMenuMulti(mainMenu)

Protected method used to add the VCS menu for multi selection to all project browsers.

mainMenu
  reference to the menu to be amended

#### GitProjectBrowserHelper.showContextMenu

showContextMenu(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the file status.

menu
  reference to the menu to be shown
standardItems
  array of standard items that need activation/deactivation depending on the overall VCS status

#### GitProjectBrowserHelper.showContextMenuDir

showContextMenuDir(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

menu
  reference to the menu to be shown
standardItems
  array of standard items that need activation/deactivation depending on the overall VCS status

#### GitProjectBrowserHelper.showContextMenuDirMulti

showContextMenuDirMulti(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

menu
  reference to the menu to be shown
standardItems
  array of standard items that need activation/deactivation depending on the overall VCS status

#### GitProjectBrowserHelper.showContextMenuMulti

showContextMenuMulti(menu, standardItems)

Public slot called before the context menu (multiple selections) is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the files status.

menu
  reference to the menu to be shown
standardItems
  array of standard items that need activation/deactivation depending on the overall VCS status

Up