package com.jbase.jbuilder5vcs; import com.borland.primetime.actions.ActionGroup; import com.borland.primetime.teamdev.vcs.VCSFileStatus; import com.borland.primetime.teamdev.frontend.VCSIcons; import javax.swing.Icon; /** * Title: jBuilder/Perforce<br> * Description: Implementation of the VCSFileStatus abstract class to provide status information about <br> * revisions stored in this VCS.<br> * This is fundamental to provide support for the VCSCommitBrowser dialog. * <DL><DT><b>Company:</b></DT><DD>jBase.</DD></DL> * @author <a href="mailto:nicolasj@jbase.com">Nicolas Jorand</a> * @version 1.0 * @since JDK 1.3 */ public class RevisionStatus extends VCSFileStatus { public static final String COMMENT_MANDATORY = "Comment is mandatory"; public static final int STATUS_NEW = 0; public static final int STATUS_ON_WORKSPACE = 1; public static final int STATUS_ON_DEPOT = 2; public static final int STATUS_REMOVED = 3; // Not yet implement private class FileDesc { public Icon icon; public String desc; public FileDesc( Icon icon, String desc ) { this.icon = icon; this.desc = desc; } } private FileDesc[] descs = { new FileDesc(VCSIcons.FILE_NEW, "New ! for add on Depot" ), new FileDesc(VCSIcons.WORKSPACE_CHANGE, "File on Workspace, submit to P4"), new FileDesc(VCSIcons.FILE_NEEDS_CHECKOUT,"File on the Depot"), new FileDesc(VCSIcons.FILE_REMOVED, "Removed !") }; public RevisionStatus( int status ) { this.status = status; } public ActionGroup getActions() { // We don't need no stinkin' actions... return null; } /** * Returns the icon that will be displayed in the VCSCommitBrowser */ public Icon getStatusIcon() { return descs[status].icon; } /** * called by VCSCommitBrowser to determine if the file has repository changes */ public boolean isModifiedInVCS() { return status == STATUS_ON_DEPOT; } public String getDescription() { return descs[status].desc; } public boolean isModifiedLocally() { return status == STATUS_ON_WORKSPACE; } public boolean isNew() { return status == STATUS_NEW; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 2918 | Jeff Hanna | Branching the integration tree | ||
//guest/perforce_software/integrations/jbuilder/jBuilder5VCS/src/com/jbase/jbuilder5vcs/RevisionStatus.java | |||||
#1 | 1072 | rmg |
Integrate the "jBuilder5VCS" frmo Nicolas Jorand into //public; Plan is to add some top-level documentation before linking it into the "roadmap", or making any sort of general public announcement. |
||
//guest/nicolas_jorand/jBuilder5VCS/src/com/jbase/jbuilder5vcs/RevisionStatus.java | |||||
#1 | 939 | nicolas_jorand | First input of perforce integration for jBuilder5 |