public static final class VCSHistoryProvider.HistoryEntry extends Object
The usernameShort
and revisionShort
will be displayed
in places with limited space, but should be descriptive enough to identify the
particular user or revision - e.g in case of Mercurial it would be something like:
e border="0"
short | long | |
---|---|---|
revision | 210767 | 210767:2dd617e260fc |
user | john.doe@netbeans.org | John Doe <john.doe@netbeans.org> |
Constructor and Description |
---|
HistoryEntry(File[] files,
Date dateTime,
String message,
String username,
String usernameShort,
String revision,
String revisionShort,
Action[] actions,
VCSHistoryProvider.RevisionProvider revisionProvider)
Creates a new HistoryEntry instance.
|
HistoryEntry(File[] files,
Date dateTime,
String message,
String username,
String usernameShort,
String revision,
String revisionShort,
Action[] actions,
VCSHistoryProvider.RevisionProvider revisionProvider,
VCSHistoryProvider.MessageEditProvider messageEditProvider)
Creates a new HistoryEntry instance.
|
HistoryEntry(File[] files,
Date dateTime,
String message,
String username,
String usernameShort,
String revision,
String revisionShort,
Action[] actions,
VCSHistoryProvider.RevisionProvider revisionProvider,
VCSHistoryProvider.MessageEditProvider messageEditProvider,
VCSHistoryProvider.ParentProvider parentProvider)
Creates a new HistoryEntry instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canEdit()
Determines if this HistoryEntry instance supports changes.
|
Action[] |
getActions()
Returns actions which might be called for this HistoryEntry as it is presented
in the history view.
It is ensured that if the returned actions are a ContextAwareAction , they
will be provided with a context containing the nodes selected in the history view. |
Date |
getDateTime()
Returns the date and time when this HistoryEntry was created in the versioning repository.
|
File[] |
getFiles()
Returns the files this HistoryEntry applies to.
|
String |
getMessage()
Returns the message describing the HistoryEntry.
|
VCSHistoryProvider.HistoryEntry |
getParentEntry(File file)
Returns this revisions parent entry or null if not available.
|
String |
getRevision()
Returns the full form of the revision value which identifies this HistoryEntry in
the relevant versionig repository.
|
void |
getRevisionFile(File originalFile,
File revisionFile)
Get the copy of a file as it was in the revision given by this HistoryEntry.
|
String |
getRevisionShort()
Returns the short form of the revision value which identifies this HistoryEntry in
the relevant versionig repository.
|
String |
getUsername()
Returns the full form of the users name which created this HistoryEntry in the versioning system.
|
String |
getUsernameShort()
Returns a short form of the users name which created this HistoryEntry in the versioning system.
|
void |
setMessage(String message)
Changes the message for this HistoryEntry in the relevant versioning system in case this
a
MessageEditProvider instance was passed into the constructor. |
public HistoryEntry(File[] files, Date dateTime, String message, String username, String usernameShort, String revision, String revisionShort, Action[] actions, VCSHistoryProvider.RevisionProvider revisionProvider)
files
- involved filesdateTime
- the date and time when the versioning revision was createdmessage
- the message describing the versioning revisionusername
- full description of the user who created the versioning revisionusernameShort
- short description of the user who created the versioning revisionrevision
- full description of the versioning revisionrevisionShort
- short description of the versioning revisionactions
- actions which might be called in regard with this revisionrevisionProvider
- a RevisionProvider to get access to a files contents in this revisionpublic HistoryEntry(File[] files, Date dateTime, String message, String username, String usernameShort, String revision, String revisionShort, Action[] actions, VCSHistoryProvider.RevisionProvider revisionProvider, VCSHistoryProvider.MessageEditProvider messageEditProvider)
files
- involved filesdateTime
- the date and time when the versioning revision was createdmessage
- the message describing the versioning revisionusername
- full description of the user who created the versioning revisionusernameShort
- short description of the user who created the versioning revisionrevision
- full description of the versioning revisionrevisionShort
- short description of the versioning revisionactions
- actions which might be called in regard with this revisionrevisionProvider
- a RevisionProvider to get access to a files contents in this revisionmessageEditProvider
- a MessageEditProvider to change a revisions messagepublic HistoryEntry(File[] files, Date dateTime, String message, String username, String usernameShort, String revision, String revisionShort, Action[] actions, VCSHistoryProvider.RevisionProvider revisionProvider, VCSHistoryProvider.MessageEditProvider messageEditProvider, VCSHistoryProvider.ParentProvider parentProvider)
files
- involved filesdateTime
- the date and time when the versioning revision was createdmessage
- the message describing the versioning revisionusername
- full description of the user who created the versioning revisionusernameShort
- short description of the user who created the versioning revisionrevision
- full description of the versioning revisionrevisionShort
- short description of the versioning revisionactions
- actions which might be called in regard with this revisionrevisionProvider
- a RevisionProvider to get access to a files contents in this revisionmessageEditProvider
- a MessageEditProvider to change a revisions messageparentProvider
- a ParentProvider to provide this entries parent entry. Not necessary for VCS
where a revisions parent always is the time nearest previous revision.public boolean canEdit()
public Date getDateTime()
public String getMessage()
public void setMessage(String message) throws IOException
MessageEditProvider
instance was passed into the constructor.message
- new message textIOException
- if it wasn't possible to set the messageIllegalStateException
- if no VCSHistoryProvider.MessageEditProvider
was passed to this HistoryEntry instancepublic File[] getFiles()
public String getUsername()
public String getUsernameShort()
public String getRevision()
public String getRevisionShort()
public Action[] getActions()
ContextAwareAction
, they
will be provided with a context containing the nodes selected in the history view.
The lookup of those nodes will again contain the relevant VCSHistoryProvider.HistoryEntry
and File
-s for which the action should be invoked.public void getRevisionFile(File originalFile, File revisionFile)
VCSHistoryProvider.RevisionProvider
wasn't provided this method does nothing.originalFile
- placeholder File for the original (unmodified) copy of the working filerevisionFile
- a File in the working copypublic VCSHistoryProvider.HistoryEntry getParentEntry(File file)
file
- the file for whitch the parent HistoryEntry should be returned