projectviewer.config
Interface VersionControlService

All Superinterfaces:
OptionsService

public interface VersionControlService
extends OptionsService

Defines the service for providing version control information for a project. Plugins implementing this service should provide it through jEdit's services.xml interface. The interface extends OptionsService; the option pane or option group returned by this service is only shown if the service is chosen as the "version control service" for a project.

Since:
PV 3.0.0
Author:
Marcelo Vanzin

Field Summary
static java.lang.String VC_SERVICE_KEY
          Key in the project's properties identifying the version control service.
static int VC_STATUS_NORMAL
          Special value designating that no special status is available for the node.
 
Method Summary
 void dissociate(VPTProject proj)
          Called when a user removes the version control association with a project (either by not choosing a version control service or a different one).
 ImporterFileFilter getFilter()
          Returns a file filter to be shown as an option when the user imports files into a project backed by this version control service.
 javax.swing.Icon getIcon(int state)
          This should return the status icon to be used to represent the given state.
 int getNodeState(VPTNode node)
          This method should return an integer identifying the current state of the given node.
 java.lang.Class getPlugin()
          Returns the class identifying the plugin.
 
Methods inherited from interface projectviewer.config.OptionsService
getOptionGroup, getOptionPane
 

Field Detail

VC_SERVICE_KEY

static final java.lang.String VC_SERVICE_KEY
Key in the project's properties identifying the version control service.

See Also:
Constant Field Values

VC_STATUS_NORMAL

static final int VC_STATUS_NORMAL
Special value designating that no special status is available for the node.

See Also:
Constant Field Values
Method Detail

getNodeState

int getNodeState(VPTNode node)
This method should return an integer identifying the current state of the given node.

Parameters:
node - The node.
Returns:
A service-specific identifier for the file state, or VC_STATUS_NORMAL.

getIcon

javax.swing.Icon getIcon(int state)
This should return the status icon to be used to represent the given state.

Parameters:
state - The value retrieved from getNodeState(VPTNode).
Returns:
The icon for the given state, or null for no icon.

getPlugin

java.lang.Class getPlugin()
Returns the class identifying the plugin. This is used to check whether there are version control-specific option panes / groups to be added to a project's option dialog.

Returns:
The main plugin class for this service.

getFilter

ImporterFileFilter getFilter()
Returns a file filter to be shown as an option when the user imports files into a project backed by this version control service.

It's similar to providing a filter as a service, but the difference is that the filter provided as a service is shown always. A filter provided through this method is selected for the project in which this version control is active. A filter should not be provided by both means (a service and getFilter), because it leads to duplication of the filter in filters list.

Returns:
An ImporterFileFilter, or null if there's no specific filter for the service.

dissociate

void dissociate(VPTProject proj)
Called when a user removes the version control association with a project (either by not choosing a version control service or a different one). This allows the service to clean up any configuration data associated with the service from the project's properties.

Parameters:
proj - The project.