com.jbase.jbuilder5vcs
Class PerforceVCS

com.jbase.jbuilder5vcs.PerforceVCS

public class PerforceVCS

Title: jBuilder/Perforce
Description: For integrate perforce on jBuilder, This is the start class. It implement the VCS class from jBuilder. It implement DelegateHandler too, but it's just
for some tests.

Company:
jBase.

Since:
JDK 1.3
Version:
1.0
Author:
Nicolas Jorand

Field Summary
 boolean connected
           
static java.lang.String PROP_CLIENT
           
static java.lang.String PROP_CLIENT_DEFAULT
           
static java.lang.String PROP_HOST
           
static java.lang.String PROP_ISNEW
           
static java.lang.String PROP_P4
           
static java.lang.String PROP_PASSWORD
           
static java.lang.String PROP_PATH
           
static java.lang.String PROP_PORT
           
static java.lang.String PROP_PORT_DEFAULT
           
static java.lang.String PROP_USER
           
static java.lang.String PROP_USER_DEFAULT
           
 
Constructor Summary
PerforceVCS()
           
 
Method Summary
 java.lang.String addFile(com.borland.primetime.node.Node[] workFiles)
          Add file(s) on Pending list of P4,
 java.lang.String addFile(java.util.Set workFiles, com.borland.primetime.node.Project prj)
          Add file(s) on Pending list of P4, file come from VCSBrowser
 java.lang.String commitFile(java.util.Set workFiles, com.borland.primetime.util.runner.OutputRunnerListener outRunner, com.borland.primetime.node.Project prj)
          For commit file from the VCSBrowser
 void connect()
          Try to connect to P4
 java.lang.String editFile(com.borland.primetime.node.Node[] workFiles)
          Pass file(s) from depot to default pending list of P4,
 java.lang.String editFile(java.util.Set workFiles, com.borland.primetime.node.Project prj)
          Pass file(s) from depot to default pending list of P4, file come from VCSBrowser
 javax.swing.Action getAction(com.borland.primetime.actions.DelegateAction delegate)
          This is a test for create my refresh action, but it doesn't work ;-(
 com.borland.primetime.teamdev.vcs.DeleteDialogInterface getDeleteDialog()
          NOT USED
 java.lang.String getDescription()
           
static java.lang.String getFileNameInRepository(java.io.File sourceFile)
          NOT USED
 java.lang.String getName()
           
 com.borland.primetime.properties.PropertyPage getProjectConfigPage(com.borland.jbuilder.node.JBProject project)
          Return the property page to display when the user clicks on the Team tab.
 java.util.Map getProjectStatus(com.borland.primetime.node.Project project)
          Get the project status from the current P4cmd
static java.io.File getRepositoryPath()
          NOT USED
 java.util.Vector getRevisions(com.borland.primetime.vfs.Url url)
          NOT USED
 byte[] getSource(com.borland.primetime.vfs.Url url, com.borland.primetime.teamdev.vcs.RevisionInfo rev)
          NOT USED
 com.borland.primetime.teamdev.frontend.VCSBrowserContextActionProvider getVCSBrowserContextActionProvider()
          NOT USED
 com.borland.primetime.actions.ActionGroup getVCSContextMenuGroup()
          Return the list of actions that will be presented in the context menu in the project pane.
 com.borland.primetime.actions.ActionGroup getVCSFileMenuGroup()
           
 javax.swing.Icon getVCSIcon()
           
 com.borland.primetime.actions.ActionGroup getVCSProjectMenuGroup()
          The menu will be appear on the Team Menu of jBuilder
static void initOpenTool(byte major, byte minor)
          Register the PerforceVCS with the VCS Factory.
 boolean isBinary(com.borland.primetime.vfs.Url url)
           
 boolean isConfigureVCSMenuEnabled()
          Set the menu enable for the configuration of Perfoce.
 boolean isUnderVCS(com.borland.primetime.vfs.Url url)
          The methode inherite of VCS, it's overload for add the depot or pending list.
 boolean isUnderVCS(com.borland.primetime.vfs.Url url, int nDepotPending)
          Retrun true, if the file passed in parameter are on P4 nDepotPending -> On P4, a file should be on the depot or on a pending list.
 java.lang.String revertFile(com.borland.primetime.node.Node[] workFiles)
          Revert file(s) on Pending list of P4,
 java.lang.String revertFile(java.util.Set workFiles, com.borland.primetime.node.Project prj)
          Revert file(s) on Pending list of P4, file come from VCSBrowser
 java.lang.String submitFile(com.borland.primetime.node.Node[] workFiles, java.lang.String sDescription)
          Pass file(s) from default pending list to depot of P4, if some files must be merge, the user must be launch P4 for make manualy merge.
 java.lang.String syncFile(com.borland.primetime.node.Node[] workFiles)
          Synchronize file(s) from depot of P4,
 java.lang.String syncFile(java.util.Set workFiles, com.borland.primetime.node.Project prj)
          Synchronize file(s) from depot of P4, file come from VCSBrowser
 

Field Detail

PROP_P4

public static final java.lang.String PROP_P4

PROP_PATH

public static final java.lang.String PROP_PATH

PROP_CLIENT

public static final java.lang.String PROP_CLIENT

PROP_CLIENT_DEFAULT

public static final java.lang.String PROP_CLIENT_DEFAULT

PROP_USER

public static final java.lang.String PROP_USER

PROP_USER_DEFAULT

public static final java.lang.String PROP_USER_DEFAULT

PROP_PASSWORD

public static final java.lang.String PROP_PASSWORD

PROP_HOST

public static final java.lang.String PROP_HOST

PROP_PORT

public static final java.lang.String PROP_PORT

PROP_PORT_DEFAULT

public static final java.lang.String PROP_PORT_DEFAULT

PROP_ISNEW

public static final java.lang.String PROP_ISNEW

connected

public boolean connected
Constructor Detail

PerforceVCS

public PerforceVCS()
Method Detail

initOpenTool

public static void initOpenTool(byte major,
                                byte minor)
Register the PerforceVCS with the VCS Factory. This will make the class available in the Team drop-down list.

getProjectConfigPage

public com.borland.primetime.properties.PropertyPage getProjectConfigPage(com.borland.jbuilder.node.JBProject project)
Return the property page to display when the user clicks on the Team tab.

isUnderVCS

public boolean isUnderVCS(com.borland.primetime.vfs.Url url,
                          int nDepotPending)
Retrun true, if the file passed in parameter are on P4 nDepotPending -> On P4, a file should be on the depot or on a pending list.

isUnderVCS

public boolean isUnderVCS(com.borland.primetime.vfs.Url url)
The methode inherite of VCS, it's overload for add the depot or pending list. By default it look on Depot list

isBinary

public boolean isBinary(com.borland.primetime.vfs.Url url)

getName

public java.lang.String getName()

getDescription

public java.lang.String getDescription()

getVCSIcon

public javax.swing.Icon getVCSIcon()

getVCSProjectMenuGroup

public com.borland.primetime.actions.ActionGroup getVCSProjectMenuGroup()
The menu will be appear on the Team Menu of jBuilder

getVCSFileMenuGroup

public com.borland.primetime.actions.ActionGroup getVCSFileMenuGroup()

getVCSContextMenuGroup

public com.borland.primetime.actions.ActionGroup getVCSContextMenuGroup()
Return the list of actions that will be presented in the context menu in the project pane.

addFile

public java.lang.String addFile(com.borland.primetime.node.Node[] workFiles)
                         throws P4ErrorApplication,
                                P4ErrorConnection
Add file(s) on Pending list of P4,

addFile

public java.lang.String addFile(java.util.Set workFiles,
                                com.borland.primetime.node.Project prj)
                         throws P4ErrorApplication,
                                P4ErrorConnection
Add file(s) on Pending list of P4, file come from VCSBrowser

revertFile

public java.lang.String revertFile(com.borland.primetime.node.Node[] workFiles)
                            throws P4ErrorApplication,
                                   P4ErrorConnection
Revert file(s) on Pending list of P4,

revertFile

public java.lang.String revertFile(java.util.Set workFiles,
                                   com.borland.primetime.node.Project prj)
                            throws P4ErrorApplication,
                                   P4ErrorConnection
Revert file(s) on Pending list of P4, file come from VCSBrowser

syncFile

public java.lang.String syncFile(com.borland.primetime.node.Node[] workFiles)
                          throws P4ErrorApplication,
                                 P4ErrorConnection
Synchronize file(s) from depot of P4,

syncFile

public java.lang.String syncFile(java.util.Set workFiles,
                                 com.borland.primetime.node.Project prj)
                          throws P4ErrorApplication,
                                 P4ErrorConnection
Synchronize file(s) from depot of P4, file come from VCSBrowser

editFile

public java.lang.String editFile(com.borland.primetime.node.Node[] workFiles)
                          throws P4ErrorApplication,
                                 P4ErrorConnection
Pass file(s) from depot to default pending list of P4,

editFile

public java.lang.String editFile(java.util.Set workFiles,
                                 com.borland.primetime.node.Project prj)
                          throws P4ErrorApplication,
                                 P4ErrorConnection
Pass file(s) from depot to default pending list of P4, file come from VCSBrowser

submitFile

public java.lang.String submitFile(com.borland.primetime.node.Node[] workFiles,
                                   java.lang.String sDescription)
                            throws P4ErrorApplication,
                                   P4ErrorConnection
Pass file(s) from default pending list to depot of P4, if some files must be merge, the user must be launch P4 for make manualy merge.

commitFile

public java.lang.String commitFile(java.util.Set workFiles,
                                   com.borland.primetime.util.runner.OutputRunnerListener outRunner,
                                   com.borland.primetime.node.Project prj)
                            throws P4ErrorApplication,
                                   P4ErrorConnection
For commit file from the VCSBrowser

getProjectStatus

public java.util.Map getProjectStatus(com.borland.primetime.node.Project project)
Get the project status from the current P4cmd

connect

public void connect()
             throws P4ErrorConnection
Try to connect to P4

isConfigureVCSMenuEnabled

public boolean isConfigureVCSMenuEnabled()
Set the menu enable for the configuration of Perfoce.

getAction

public javax.swing.Action getAction(com.borland.primetime.actions.DelegateAction delegate)
This is a test for create my refresh action, but it doesn't work ;-(

getRevisions

public java.util.Vector getRevisions(com.borland.primetime.vfs.Url url)
NOT USED

getSource

public byte[] getSource(com.borland.primetime.vfs.Url url,
                        com.borland.primetime.teamdev.vcs.RevisionInfo rev)
NOT USED

getVCSBrowserContextActionProvider

public com.borland.primetime.teamdev.frontend.VCSBrowserContextActionProvider getVCSBrowserContextActionProvider()
NOT USED

getDeleteDialog

public com.borland.primetime.teamdev.vcs.DeleteDialogInterface getDeleteDialog()
NOT USED

getRepositoryPath

public static java.io.File getRepositoryPath()
NOT USED

getFileNameInRepository

public static java.lang.String getFileNameInRepository(java.io.File sourceFile)
NOT USED