📄 status.java
字号:
public int getRepositoryTextStatus()
{
return repositoryTextStatus;
}
/**
* Returns test status of the properties in the repository (See StatusKind)
* @return file status property enum of the "property" component im the
* repository.
*/
public int getRepositoryPropStatus()
{
return repositoryPropStatus;
}
/**
* Returns if the item is locked (running or aborted subversion operation)
* @return true if locked
*/
public boolean isLocked()
{
return locked;
}
/**
* Returns if the item has been copied
* @return true if copied
*/
public boolean isCopied()
{
return copied;
}
/**
* Returns in case of conflict, the filename of the most recent repository
* version
* @return the filename of the most recent repository version
*/
public String getConflictNew()
{
return conflictNew;
}
/**
* Returns in case of conflict, the filename of the common base version
* @return the filename of the common base version
*/
public String getConflictOld()
{
return conflictOld;
}
/**
* Returns in case of conflict, the filename of the former working copy
* version
* @return the filename of the former working copy version
*/
public String getConflictWorking()
{
return conflictWorking;
}
/**
* Returns the repository url if any
* @return url in repository or null if not known
*/
public String getUrl()
{
return url;
}
/**
* Returns the last revision the file was changed as a Revision object
* @return last changed revision
*/
public Revision.Number getLastChangedRevision()
{
if(lastChangedRevision < 0)
return null;
return new Revision.Number(lastChangedRevision);
}
/**
* Returns the last revision the file was changed as a long integer
* @return last changed revision
*/
public long getLastChangedRevisionNumber()
{
return lastChangedRevision;
}
/**
* Returns the kind of the node (file, directory or unknown, see NodeKind)
* @return the node kind
*/
public int getNodeKind()
{
return nodeKind;
}
/**
* Returns if copied the copy source url or null
* @return the source url
*/
public String getUrlCopiedFrom()
{
return urlCopiedFrom;
}
/**
* Returns if copied the source revision as a Revision object
* @return the source revision
*/
public Revision.Number getRevisionCopiedFrom()
{
if(revisionCopiedFrom < 0)
return null;
else
return new Revision.Number(revisionCopiedFrom);
}
/**
* Returns if copied the source revision as s long integer
* @return the source revision
*/
public long getRevisionCopiedFromNumber()
{
return revisionCopiedFrom;
}
/**
* Returns if the repository url has been switched
* @return is the item has been switched
*/
public boolean isSwitched()
{
return switched;
}
/**
* Returns if is managed by svn (added, normal, modified ...)
* @return if managed by svn
*/
public boolean isManaged()
{
int textStatus = getTextStatus();
return ((textStatus != Status.Kind.unversioned) &&
(textStatus != Status.Kind.none) &&
(textStatus != Status.Kind.ignored));
}
/**
* Returns if the resource has a remote counter-part
* @return has version in repository
*/
public boolean hasRemote()
{
int textStatus = getTextStatus();
return ((isManaged()) && (textStatus != Status.Kind.added));
}
/**
* Returns if the resource just has been added
* @return if added
*/
public boolean isAdded()
{
int textStatus = getTextStatus();
return textStatus == Status.Kind.added;
}
/**
* Returns if the resource is schedules for delete
* @return if deleted
*/
public boolean isDeleted()
{
int textStatus = getTextStatus();
return textStatus == Status.Kind.deleted;
}
/**
* Returns if the resource has been merged
* @return if merged
*/
public boolean isMerged()
{
int textStatus = getTextStatus();
return textStatus == Status.Kind.merged;
}
/**
* Returns if the resource is ignored by svn (only returned if noIgnore
* is set on SVNClient.list)
* @return if ignore
*/
public boolean isIgnored()
{
int textStatus = getTextStatus();
return textStatus == Status.Kind.ignored;
}
/**
* Returns if the resource itself is modified
* @return if modified
*/
public boolean isModified()
{
int textStatus = getTextStatus();
return textStatus == Status.Kind.modified;
}
/**
* class for kind status of the item or its properties
* the constants are defined in the interface StatusKind for building
* reasons
*/
public static final class Kind implements StatusKind
{
/**
* Returns the textual representation of the status
* @param kind of status
* @return english status
*/
public static final String getDescription(int kind)
{
switch (kind)
{
case none:
return "non-svn";
case normal:
return "normal";
case added:
return "added";
case missing:
return "missing";
case deleted:
return "deleted";
case replaced:
return "replaced";
case modified:
return "modified";
case merged:
return "merged";
case conflicted:
return "conflicted";
case ignored:
return "ignored";
case incomplete:
return "incomplete";
case external:
return "external";
case unversioned:
default:
return "unversioned";
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -