View Javadoc
1 /* FOREGEJ - FOrmatting REfactoring GEnerating Java 2 * 3 * Copyright (C) 2003 Andreas Arrgard 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 package com.octagroup.foregej; 20 /*** 21 * These are the settings used when crunching java source files. 22 */ 23 public class Settings 24 { 25 private static int lineLength_s=76; 26 private static boolean sortJTags_s=true; 27 /*** 28 * Returns the line ending used.<p> 29 * This method returns "\r", "\n" or "\r\n". 30 * @return the preferred line ending 31 */ 32 public static String getLineEnding() 33 { 34 return "\r\n"; 35 } 36 /*** 37 * Returns the indentation depth. 38 * <p></p> 39 * 40 * @return the indentation depth. 41 */ 42 public static int getIndentation() 43 { 44 return 4; 45 } 46 /*** 47 * Returns true if the java tags should be sorted. 48 * <p> 49 * This method will probaly be replaced with one that returns the 50 * comparator to use. 51 * </p> 52 * 53 * @return true if the j tags should be sorted. 54 */ 55 public static boolean getSortJTags() 56 { 57 return sortJTags_s; 58 } 59 /*** 60 * Specifies if the java tags should be sorted. 61 * 62 * @param b should the java tags be sorted? 63 */ 64 public static void setSortJTags_s(boolean b) 65 { 66 sortJTags_s=b; 67 } 68 /*** 69 * Returns the preferred line length. 70 * 71 * @return preferred line length. 72 */ 73 public static int getLineLength() 74 { 75 return lineLength_s; 76 } 77 /*** 78 * Sets the length of a line before foregej starts to perform wrapping. 79 * 80 * @param i the length of the lines before any wrapping occurr. 81 */ 82 public static void setLineLength(int i) 83 { 84 lineLength_s=i; 85 } 86 }

This page was automatically generated by Maven