Class GetFileAnnotationsOptions
Note that this class can take both DiffType args and the string versions (-dw, etc.); mixing them up carelessly probably isn't a good idea.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIf true, include both deleted files and lines no longer present at the head revision; corresponds to the -a flag.protected booleanIf true, follows all integrations into the file; corresponds to -I.protected booleanIf true, follow branches; corresponds to the -f flag.protected booleanIf true, ignore line endisngs; corresponds to -dl.protected booleanIf true, ignore whitespace; corresponds to -dw.protected booleanIf true, ignore whitespace changes; corresponds to -db.static final StringOptions: -a, -c, -i, -db, -dw, -dl, -I, -q, -tprotected booleanIf true, forces 'p4 annotate' to display binary files; corresponds to -t.protected booleanIf true, suppresses the one-line header that is displayed by default for each file; corresponds to -q.protected booleanIf true, annotate with change numbers rather than revision numbers with each line; correspond to the -c flag.protected DiffTypeIf non-null, use the DiffType value to determine whitespace options.Fields inherited from class com.perforce.p4java.option.Options
immutable, optionList -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.GetFileAnnotationsOptions(boolean allResults, boolean useChangeNumbers, boolean followBranches, boolean ignoreWhitespaceChanges, boolean ignoreWhitespace, boolean ignoreLineEndings) Explicit value constructor.GetFileAnnotationsOptions(boolean allResults, boolean useChangeNumbers, boolean followBranches, boolean ignoreWhitespaceChanges, boolean ignoreWhitespace, boolean ignoreLineEndings, boolean followAllIntegrations) Explicit value constructor.GetFileAnnotationsOptions(boolean allResults, boolean useChangeNumbers, boolean followBranches, DiffType wsOpts) Explicit value constructor.GetFileAnnotationsOptions(String... options) Strings-based constructor; see 'p4 help [command]' for possible options. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprocessOptions(IServer server) If the wsOpts field is non-null, those values will override the corresponding explicit boolean fields.setAllResults(boolean allResults) setFollowAllIntegrations(boolean followAllIntegrations) setFollowBranches(boolean followBranches) setIgnoreLineEndings(boolean ignoreLineEndings) setIgnoreWhitespace(boolean ignoreWhitespace) setIgnoreWhitespaceChanges(boolean ignoreWhitespaceChanges) setShowBinaryContent(boolean showBinaryContent) setSuppressHeader(boolean suppressHeader) setUseChangeNumbers(boolean useChangeNumbers) Methods inherited from class com.perforce.p4java.option.Options
getOptions, isImmutable, processFields, setImmutable, setOptions
-
Field Details
-
OPTIONS_SPECS
Options: -a, -c, -i, -db, -dw, -dl, -I, -q, -t- See Also:
-
allResults
protected boolean allResultsIf true, include both deleted files and lines no longer present at the head revision; corresponds to the -a flag. -
useChangeNumbers
protected boolean useChangeNumbersIf true, annotate with change numbers rather than revision numbers with each line; correspond to the -c flag. -
followBranches
protected boolean followBranchesIf true, follow branches; corresponds to the -f flag. -
wsOpts
If non-null, use the DiffType value to determine whitespace options. -
ignoreWhitespaceChanges
protected boolean ignoreWhitespaceChangesIf true, ignore whitespace changes; corresponds to -db. -
ignoreWhitespace
protected boolean ignoreWhitespaceIf true, ignore whitespace; corresponds to -dw. -
ignoreLineEndings
protected boolean ignoreLineEndingsIf true, ignore line endisngs; corresponds to -dl. -
followAllIntegrations
protected boolean followAllIntegrationsIf true, follows all integrations into the file; corresponds to -I. -
suppressHeader
protected boolean suppressHeaderIf true, suppresses the one-line header that is displayed by default for each file; corresponds to -q. -
showBinaryContent
protected boolean showBinaryContentIf true, forces 'p4 annotate' to display binary files; corresponds to -t.
-
-
Constructor Details
-
GetFileAnnotationsOptions
public GetFileAnnotationsOptions()Default constructor. -
GetFileAnnotationsOptions
Strings-based constructor; see 'p4 help [command]' for possible options.WARNING: you should not pass more than one option or argument in each string parameter. Each option or argument should be passed-in as its own separate string parameter, without any spaces between the option and the option value (if any).
NOTE: setting options this way always bypasses the internal options values, and getter methods against the individual values corresponding to the strings passed in to this constructor will not normally reflect the string's setting. Do not use this constructor unless you know what you're doing and / or you do not also use the field getters and setters.
- Parameters:
options- options- See Also:
-
GetFileAnnotationsOptions
public GetFileAnnotationsOptions(boolean allResults, boolean useChangeNumbers, boolean followBranches, DiffType wsOpts) Explicit value constructor.- Parameters:
allResults- allResultsuseChangeNumbers- useChangeNumbersfollowBranches- followBrancheswsOpts- wsOpts
-
GetFileAnnotationsOptions
public GetFileAnnotationsOptions(boolean allResults, boolean useChangeNumbers, boolean followBranches, boolean ignoreWhitespaceChanges, boolean ignoreWhitespace, boolean ignoreLineEndings) Explicit value constructor.- Parameters:
allResults- allResultsuseChangeNumbers- useChangeNumbersfollowBranches- followBranchesignoreWhitespaceChanges- ignoreWhitespaceChangesignoreWhitespace- ignoreWhitespaceignoreLineEndings- ignoreLineEndings
-
GetFileAnnotationsOptions
public GetFileAnnotationsOptions(boolean allResults, boolean useChangeNumbers, boolean followBranches, boolean ignoreWhitespaceChanges, boolean ignoreWhitespace, boolean ignoreLineEndings, boolean followAllIntegrations) Explicit value constructor.- Parameters:
allResults- allResultsuseChangeNumbers- useChangeNumbersfollowBranches- followBranchesignoreWhitespaceChanges- ignoreWhitespaceChangesignoreWhitespace- ignoreWhitespaceignoreLineEndings- ignoreLineEndingsfollowAllIntegrations- followAllIntegrations
-
-
Method Details
-
processOptions
If the wsOpts field is non-null, those values will override the corresponding explicit boolean fields.- Specified by:
processOptionsin classOptions- Parameters:
server- possibly-null IServer representing the Perforce server the options are to be used against. If this parameter is null, it is acceptable to throw an OptionsException, but it is also possible to ignore it and do the best you can with what you've got...- Returns:
- non-null (but possibly empty) string list representing the normalized Perforce server arguments corresponding to the state of this specific options object.
- Throws:
OptionsException- if an error occurs in options processing that is not some species of ConnectionException, RequestException, AccessException, etc.- See Also:
-
isAllResults
public boolean isAllResults() -
setAllResults
-
isUseChangeNumbers
public boolean isUseChangeNumbers() -
setUseChangeNumbers
-
isFollowBranches
public boolean isFollowBranches() -
setFollowBranches
-
getWsOpts
-
setWsOpts
-
isIgnoreWhitespaceChanges
public boolean isIgnoreWhitespaceChanges() -
setIgnoreWhitespaceChanges
-
isIgnoreWhitespace
public boolean isIgnoreWhitespace() -
setIgnoreWhitespace
-
isIgnoreLineEndings
public boolean isIgnoreLineEndings() -
setIgnoreLineEndings
-
isFollowAllIntegrations
public boolean isFollowAllIntegrations() -
setFollowAllIntegrations
-
isSuppressHeader
public boolean isSuppressHeader() -
setSuppressHeader
-
isShowBinaryContent
public boolean isShowBinaryContent() -
setShowBinaryContent
-