LCOV - code coverage report
Current view: top level - extensions/client - DiffPreferencesInfo.java (source / functions) Hit Total Coverage
Test: _coverage_report.dat Lines: 32 32 100.0 %
Date: 2022-11-19 15:00:39 Functions: 3 3 100.0 %

          Line data    Source code
       1             : // Copyright (C) 2014 The Android Open Source Project
       2             : //
       3             : // Licensed under the Apache License, Version 2.0 (the "License");
       4             : // you may not use this file except in compliance with the License.
       5             : // You may obtain a copy of the License at
       6             : //
       7             : // http://www.apache.org/licenses/LICENSE-2.0
       8             : //
       9             : // Unless required by applicable law or agreed to in writing, software
      10             : // distributed under the License is distributed on an "AS IS" BASIS,
      11             : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      12             : // See the License for the specific language governing permissions and
      13             : // limitations under the License.
      14             : 
      15             : package com.google.gerrit.extensions.client;
      16             : 
      17         151 : public class DiffPreferencesInfo {
      18             : 
      19             :   /** Default number of lines of context. */
      20             :   public static final int DEFAULT_CONTEXT = 10;
      21             : 
      22             :   /** Default tab size. */
      23             :   public static final int DEFAULT_TAB_SIZE = 8;
      24             : 
      25             :   /** Default font size. */
      26             :   public static final int DEFAULT_FONT_SIZE = 12;
      27             : 
      28             :   /** Default line length. */
      29             :   public static final int DEFAULT_LINE_LENGTH = 100;
      30             : 
      31         153 :   public enum Whitespace {
      32         153 :     IGNORE_NONE,
      33         153 :     IGNORE_TRAILING,
      34         153 :     IGNORE_LEADING_AND_TRAILING,
      35         153 :     IGNORE_ALL
      36             :   }
      37             : 
      38             :   public Integer context;
      39             :   public Integer tabSize;
      40             :   public Integer fontSize;
      41             :   public Integer lineLength;
      42             :   public Integer cursorBlinkRate;
      43             :   public Boolean expandAllComments;
      44             :   public Boolean intralineDifference;
      45             :   public Boolean manualReview;
      46             :   public Boolean showLineEndings;
      47             :   public Boolean showTabs;
      48             :   public Boolean showWhitespaceErrors;
      49             :   public Boolean syntaxHighlighting;
      50             :   public Boolean hideTopMenu;
      51             :   public Boolean autoHideDiffTableHeader;
      52             :   public Boolean hideLineNumbers;
      53             :   public Boolean renderEntireFile;
      54             :   public Boolean hideEmptyPane;
      55             :   public Boolean matchBrackets;
      56             :   public Boolean lineWrapping;
      57             :   public Whitespace ignoreWhitespace;
      58             :   public Boolean retainHeader;
      59             :   public Boolean skipDeleted;
      60             :   public Boolean skipUnchanged;
      61             :   public Boolean skipUncommented;
      62             : 
      63             :   public static DiffPreferencesInfo defaults() {
      64         151 :     DiffPreferencesInfo i = new DiffPreferencesInfo();
      65         151 :     i.context = DEFAULT_CONTEXT;
      66         151 :     i.tabSize = DEFAULT_TAB_SIZE;
      67         151 :     i.fontSize = DEFAULT_FONT_SIZE;
      68         151 :     i.lineLength = DEFAULT_LINE_LENGTH;
      69         151 :     i.cursorBlinkRate = 0;
      70         151 :     i.expandAllComments = false;
      71         151 :     i.intralineDifference = true;
      72         151 :     i.manualReview = false;
      73         151 :     i.showLineEndings = true;
      74         151 :     i.showTabs = true;
      75         151 :     i.showWhitespaceErrors = true;
      76         151 :     i.syntaxHighlighting = true;
      77         151 :     i.hideTopMenu = false;
      78         151 :     i.autoHideDiffTableHeader = true;
      79         151 :     i.hideLineNumbers = false;
      80         151 :     i.renderEntireFile = false;
      81         151 :     i.hideEmptyPane = false;
      82         151 :     i.matchBrackets = false;
      83         151 :     i.lineWrapping = false;
      84         151 :     i.ignoreWhitespace = Whitespace.IGNORE_NONE;
      85         151 :     i.retainHeader = false;
      86         151 :     i.skipDeleted = false;
      87         151 :     i.skipUnchanged = false;
      88         151 :     i.skipUncommented = false;
      89         151 :     return i;
      90             :   }
      91             : }

Generated by: LCOV version 1.16+git.20220603.dfeb750