/** * * @param server server * @param files escaped name of the files * @return annotated file information */ public List<IFileAnnotation> getAnnotations(IServer server, List<IFileSpec> files) throws P4JavaException { GetFileAnnotationsOptions options = new GetFileAnnotationsOptions( false, // allResults false, // useChangeNumbers false, // followBranches false, // ignoreWhitespaceChanges false, // ignoreWhitespace true, // ignoreLineEndings false // followAllIntegrations ); return server.getFileAnnotations(files, options); }
switch (wsOpts) { case IGNORE_WS: this.setIgnoreWhitespace(true); break; case IGNORE_LINE_ENDINGS: this.setIgnoreLineEndings(true); break; case IGNORE_WS_CHANGES: this.setIgnoreWhitespaceChanges(true); break; default: this.optionList = this.processFields(OPTIONS_SPECS, this.isAllResults(), this.isUseChangeNumbers(), this.isFollowBranches(), this.isIgnoreWhitespaceChanges(), this.isIgnoreWhitespace(), this.isIgnoreLineEndings(), this.isFollowAllIntegrations(), this.isSuppressHeader(), this.isShowBinaryContent()); return this.optionList;
@Override public List<IFileAnnotation> getFileAnnotations( final List<IFileSpec> fileSpecs, @Nonnull final DiffType diffType, final boolean allResults, final boolean useChangeNumbers, final boolean followBranches) throws ConnectionException, RequestException, AccessException { throwRequestExceptionIfConditionFails( isNull(diffType) || diffType.isWsOption(), "Bad whitespace option in getFileAnnotations"); try { GetFileAnnotationsOptions getFileAnnotationsOptions = new GetFileAnnotationsOptions() .setAllResults(allResults) .setUseChangeNumbers(useChangeNumbers) .setFollowBranches(followBranches) .setWsOpts(diffType); return getFileAnnotations(fileSpecs, getFileAnnotationsOptions); } catch (final ConnectionException | AccessException | RequestException exc) { throw exc; } catch (P4JavaException exc) { throw new RequestException(exc.getMessage(), exc); } }
GetFileAnnotationsOptions getFileAnnotationsOptions = new GetFileAnnotationsOptions() .setAllResults(allResults) .setUseChangeNumbers(useChangeNumbers) .setFollowBranches(followBranches) .setWsOpts(diffType); return getFileAnnotations(fileSpecs, getFileAnnotationsOptions); });
switch (wsOpts) { case IGNORE_WS: this.setIgnoreWhitespace(true); break; case IGNORE_LINE_ENDINGS: this.setIgnoreLineEndings(true); break; case IGNORE_WS_CHANGES: this.setIgnoreWhitespaceChanges(true); break; default: this.optionList = this.processFields(OPTIONS_SPECS, this.isAllResults(), this.isUseChangeNumbers(), this.isFollowBranches(), this.isIgnoreWhitespaceChanges(), this.isIgnoreWhitespace(), this.isIgnoreLineEndings(), this.isFollowAllIntegrations(), this.isSuppressHeader(), this.isShowBinaryContent()); return this.optionList;
GetFileAnnotationsOptions getFileAnnotationsOptions = new GetFileAnnotationsOptions(); List<IFileAnnotation> fileAnnotations = server.getFileAnnotations( fileSpecs, getFileAnnotationsOptions );