Ticket #5327: swissgrid.patch
| File swissgrid.patch, 40.7 KB (added by , 16 years ago) |
|---|
-
src/org/openstreetmap/josm/data/projection/Mercator.java
21 21 */ 22 22 public class Mercator implements Projection { 23 23 24 /** 25 * Test of the Projection 26 */ 27 public static void main(String[] args) { 28 Mercator p = new Mercator(); 29 30 { 31 LatLon ll = new LatLon(47 + 3.0 / 60 + 28.95659233 / 3600, 8 + 29.0 / 60 + 11.11127154 / 3600); 32 System.out.println(ll); 33 EastNorth en = p.latlon2eastNorth(ll); 34 System.out.println(en); 35 ll = p.eastNorth2latlon(en); 36 System.out.println(ll); 37 } 38 } 39 24 40 public EastNorth latlon2eastNorth(LatLon p) { 25 41 return new EastNorth( 26 42 p.lon()*Math.PI/180, -
src/org/openstreetmap/josm/data/projection/Projection.java
18 18 public static Projection[] allProjections = new Projection[]{ 19 19 new Epsg4326(), 20 20 new Mercator(), 21 new GoogleMercator(), 21 22 new LambertEST(), // Still needs proper default zoom 22 23 new Lambert(), // Still needs proper default zoom 23 24 new Puwg(), -
src/org/openstreetmap/josm/data/projection/SwissGrid.java
8 8 import org.openstreetmap.josm.data.coor.EastNorth; 9 9 import org.openstreetmap.josm.data.coor.LatLon; 10 10 11 import org.openstreetmap.josm.data.coor.CoordinateFormat; 12 11 13 /** 12 14 * Projection for the SwissGrid, see http://de.wikipedia.org/wiki/Swiss_Grid. 13 15 * 14 16 * Calculations are based on formula from 15 17 * http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.12749.DownloadFile.tmp/ch1903wgs84en.pdf 16 18 * 19 * August 2010 update to this formula (rigorous formulas) 20 * http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf 17 21 */ 18 22 public class SwissGrid implements Projection { 23 24 public static void main(String[] args) { 25 LatLon ll = new LatLon(46.9524056, 7.4395833); 26 System.out.println(ll); 27 ll = new SwissGrid().correctCH1903toETRS89(ll); 28 System.out.println(ll); 29 System.out.println(ll.latToString(CoordinateFormat.DEGREES_MINUTES_SECONDS)); 30 System.out.println(ll.lonToString(CoordinateFormat.DEGREES_MINUTES_SECONDS)); 31 System.out.println(ll.lat()*3600); 32 System.out.println(ll.lon()*3600); 33 } 34 35 private static final double dX = 674.374; 36 private static final double dY = 15.056; 37 private static final double dZ = 405.346; 38 39 private static final double wgs84_a = 6378137.000; 40 private static final double wgs84_b = 6356752.314245; 41 // private static final double wgs84_f = (wgs84_a-wgs84_b)/wgs84_a; 42 private static final double wgs84_E2 = (Math.pow(wgs84_a, 2)-Math.pow(wgs84_b, 2))/Math.pow(wgs84_a, 2); 43 // private static final double wgs84_E = Math.sqrt(wgs84_E2); 44 45 46 private static final double a = 6377397.155; 47 private static final double b = 6356078.962822; 48 // private static final double f = (a-b)/a; 49 private static final double E2 = (Math.pow(a, 2)-Math.pow(b, 2))/Math.pow(a, 2); 50 private static final double E = Math.sqrt(E2); 51 private static final double phi0 = Math.toRadians(46.0 + 57.0 / 60 + 8.66 / 3600); 52 private static final double lambda0 = Math.toRadians(7.0 + 26.0 / 60 + 22.50 / 3600); 53 private static final double R = a * Math.sqrt(1 - E2) / (1 - (E2 * Math.pow(Math.sin(phi0), 2))); 54 private static final double alpha = Math.sqrt(1 + (E2 / (1 - E2) * Math.pow(Math.cos(phi0), 4))); 55 private static final double b0 = Math.asin(Math.sin(phi0) / alpha); 56 private static final double K = Math.log(Math.tan(Math.PI / 4 + b0 / 2)) - alpha 57 * Math.log(Math.tan(Math.PI / 4 + phi0 / 2)) + alpha * E / 2 58 * Math.log((1 + E * Math.sin(phi0)) / (1 - E * Math.sin(phi0))); 59 60 private static final double xTrans = 200000; 61 private static final double yTrans = 600000; 62 63 private LatLon correctETRS89toCH1903(LatLon coord) { 64 double phi = Math.toRadians(coord.lat()); 65 double lambda = Math.toRadians(coord.lon()); 66 67 double Rn = wgs84_a/Math.sqrt(1-wgs84_E2*Math.pow(Math.sin(phi), 2)); 68 double X = Rn*Math.cos(phi)*Math.cos(lambda); 69 double Y = Rn*Math.cos(phi)*Math.sin(lambda); 70 double Z = Rn*(1-wgs84_E2)*Math.sin(phi); 71 X -= dX; 72 Y -= dY; 73 Z -= dZ; 74 lambda = Math.atan2(Y,X); 75 double sX2Ys = Math.sqrt(X*X+Y*Y); 76 phi = Math.atan2(Z,sX2Ys); 77 double h = 0; 78 79 for (int i = 0 ; i < 6 ; i++) { 80 Rn = a/Math.sqrt(1-E2*Math.pow(Math.sin(phi), 2)); 81 h = sX2Ys/Math.cos(phi)-Rn; 82 phi = Math.atan2(Z/sX2Ys,1-Rn*E2/(Rn+h)); 83 } 84 85 return new LatLon(Math.toDegrees(phi), Math.toDegrees(lambda)); 86 } 87 88 private LatLon correctCH1903toETRS89(LatLon coord) { 89 double phi = Math.toRadians(coord.lat()); 90 double lambda = Math.toRadians(coord.lon()); 91 92 double Rn = a/Math.sqrt(1-E2*Math.pow(Math.sin(phi), 2)); 93 double X = Rn*Math.cos(phi)*Math.cos(lambda); 94 double Y = Rn*Math.cos(phi)*Math.sin(lambda); 95 double Z = Rn*(1-E2)*Math.sin(phi); 96 X += dX; 97 Y += dY; 98 Z += dZ; 99 lambda = Math.atan2(Y,X); 100 double sX2Ys = Math.sqrt(X*X+Y*Y); 101 phi = Math.atan((Z/sX2Ys)); 102 double h = 0; 103 104 for (int i = 0 ; i < 5 ; i++) { 105 Rn = wgs84_a/Math.sqrt(1-wgs84_E2*Math.pow(Math.sin(phi), 2)); 106 h = sX2Ys/Math.cos(phi)-Rn; 107 phi = Math.atan2(Z/sX2Ys,1-Rn*wgs84_E2/(Rn+h)); 108 } 109 110 return new LatLon(Math.toDegrees(phi), Math.toDegrees(lambda)); 111 } 112 19 113 /** 20 114 * @param wgs WGS84 lat/lon (ellipsoid GRS80) (in degree) 21 115 * @return eastnorth projection in Swiss National Grid (ellipsoid Bessel) 22 116 */ 23 117 public EastNorth latlon2eastNorth(LatLon wgs) { 24 double phi = 3600d * wgs.lat(); 25 double lambda = 3600d * wgs.lon(); 118 LatLon coord = correctETRS89toCH1903(wgs); 119 double phi = Math.toRadians(coord.lat()); 120 double lambda = Math.toRadians(coord.lon()); 26 121 27 double phiprime = (phi - 169028.66d) / 10000d; 28 double lambdaprime = (lambda - 26782.5d) / 10000d; 122 double S = alpha * Math.log(Math.tan(Math.PI / 4 + phi / 2)) - alpha * E / 2 123 * Math.log((1 + E * Math.sin(phi)) / (1 - E * Math.sin(phi))) + K; 124 double b = 2 * (Math.atan(Math.exp(S)) - Math.PI / 4); 125 double l = alpha * (lambda - lambda0); 29 126 30 // precompute squares for lambdaprime and phiprime 31 // 32 double lambdaprime_2 = Math.pow(lambdaprime,2); 33 double phiprime_2 = Math.pow(phiprime,2); 127 double lb = Math.atan2(Math.sin(l), Math.sin(b0) * Math.tan(b) + Math.cos(b0) * Math.cos(l)); 128 double bb = Math.asin(Math.cos(b0) * Math.sin(b) - Math.sin(b0) * Math.cos(b) * Math.cos(l)); 34 129 35 double north = 36 200147.07d 37 + 308807.95d * phiprime 38 + 3745.25d * lambdaprime_2 39 + 76.63d * phiprime_2 40 - 194.56d * lambdaprime_2 * phiprime 41 + 119.79d * Math.pow(phiprime,3); 130 double y = R * lb; 131 double x = R / 2 * Math.log((1 + Math.sin(bb)) / (1 - Math.sin(bb))); 42 132 43 double east = 44 600072.37d 45 + 211455.93d * lambdaprime 46 - 10938.51d * lambdaprime * phiprime 47 - 0.36d * lambdaprime * phiprime_2 48 - 44.54d * Math.pow(lambdaprime,3); 49 50 return new EastNorth(east, north); 133 return new EastNorth(y + yTrans, x + xTrans); 51 134 } 52 135 53 136 /** 54 137 * @param xy SwissGrid east/north (in meters) 55 138 * @return LatLon WGS84 (in degree) 56 139 */ 57 58 140 public LatLon eastNorth2latlon(EastNorth xy) { 59 double yp = (xy.east() - 600000d) / 1000000d;60 double xp = (xy.north() - 200000d) / 1000000d;141 double x = xy.north() - xTrans; 142 double y = xy.east() - yTrans; 61 143 62 // precompute squares of xp and yp 63 // 64 double xp_2 = Math.pow(xp,2); 65 double yp_2 = Math.pow(yp,2); 144 double lb = y / R; 145 double bb = 2 * (Math.atan(Math.exp(x / R)) - Math.PI / 4); 66 146 67 // lambda = latitude, phi = longitude 68 double lmbp = 2.6779094d 69 + 4.728982d * yp 70 + 0.791484d * yp * xp 71 + 0.1306d * yp * xp_2 72 - 0.0436d * Math.pow(yp,3); 147 double b = Math.asin(Math.cos(b0) * Math.sin(bb) + Math.sin(b0) * Math.cos(bb) * Math.cos(lb)); 148 double l = Math.atan2(Math.sin(lb), Math.cos(b0) * Math.cos(lb) - Math.sin(b0) * Math.tan(bb)); 73 149 74 double phip = 16.9023892d 75 + 3.238272d * xp 76 - 0.270978d * yp_2 77 - 0.002528d * xp_2 78 - 0.0447d * yp_2 * xp 79 - 0.0140d * Math.pow(xp,3); 150 double lambda = lambda0 + l / alpha; 151 double phi = b; 152 double S = 0; 80 153 81 double lmb = lmbp * 100.0d / 36.0d; 82 double phi = phip * 100.0d / 36.0d; 154 // 5 iteration to fins S and phi 155 for (int i = 0; i < 6; i++) { 156 S = 1 / alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - K) + E 157 * Math.log(Math.tan(Math.PI / 4 + Math.asin(E * Math.sin(phi)) / 2)); 158 phi = 2 * Math.atan(Math.exp(S)) - Math.PI / 2; 159 } 83 160 84 return new LatLon(phi,lmb); 161 LatLon coord = new LatLon(Math.toDegrees(phi), Math.toDegrees(lambda)); 162 return correctCH1903toETRS89(coord); 85 163 } 86 164 87 @Override public String toString() { 165 @Override 166 public String toString() { 88 167 return tr("Swiss Grid (Switzerland)"); 89 168 } 90 169 … … 101 180 return "swissgrid"; 102 181 } 103 182 104 public Bounds getWorldBoundsLatLon() 105 { 106 return new Bounds( 107 new LatLon(45.7, 5.7), 108 new LatLon(47.9, 10.6)); 183 public Bounds getWorldBoundsLatLon() { 184 return new Bounds(new LatLon(45.7, 5.7), new LatLon(47.9, 10.6)); 109 185 } 110 186 111 187 public double getDefaultZoomInPPD() { -
.classpath
15 15 <classpathentry kind="lib" path="test/lib/fest/jcip-annotations-1.0.jar"/> 16 16 <classpathentry kind="lib" path="test/lib/fest/MRJToolkitStubs-1.0.jar"/> 17 17 <classpathentry kind="lib" path="test/lib/jfcunit.jar"/> 18 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 6"/>19 18 <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/> 20 19 <classpathentry kind="lib" path="lib/signpost-core-1.2.1.1.jar"/> 20 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 21 21 <classpathentry kind="output" path="bin"/> 22 22 </classpath> -
.settings/org.eclipse.jdt.core.prefs
1 # Sun May 23 17:35:27CEST 20101 #Fri Aug 13 18:40:22 CEST 2010 2 2 eclipse.preferences.version=1 3 3 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 4 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1. 64 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 5 5 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 org.eclipse.jdt.core.compiler.compliance=1. 66 org.eclipse.jdt.core.compiler.compliance=1.5 7 7 org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 8 org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 9 org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning11 10 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 12 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore13 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning14 org.eclipse.jdt.core.compiler.problem.deadCode=warning15 org.eclipse.jdt.core.compiler.problem.deprecation=warning16 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled17 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled18 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning19 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning20 11 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 21 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore 22 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled 23 org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore 24 org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning 25 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning 26 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error 27 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning 28 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning 29 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore 30 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore 31 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore 32 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning 33 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning 34 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning 35 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore 36 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore 37 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore 38 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error 39 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning 40 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore 41 org.eclipse.jdt.core.compiler.problem.nullReference=warning 42 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning 43 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore 44 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error 45 org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning 46 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning 47 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning 48 org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore 49 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled 50 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning 51 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled 52 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore 53 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning 54 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning 55 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore 56 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning 57 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore 58 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning 59 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore 60 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning 61 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled 62 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled 63 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled 64 org.eclipse.jdt.core.compiler.problem.unusedImport=warning 65 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning 66 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning 67 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore 68 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled 69 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled 70 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled 71 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning 72 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning 73 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning 74 org.eclipse.jdt.core.compiler.source=1.6 12 org.eclipse.jdt.core.compiler.source=1.5 75 13 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false 76 14 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 77 15 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 … … 115 53 org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line 116 54 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line 117 55 org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line 118 org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false119 56 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false 120 57 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false 121 58 org.eclipse.jdt.core.formatter.comment.format_block_comments=false 122 org.eclipse.jdt.core.formatter.comment.format_comments=true123 59 org.eclipse.jdt.core.formatter.comment.format_header=false 124 60 org.eclipse.jdt.core.formatter.comment.format_html=false 125 61 org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false … … 145 81 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true 146 82 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false 147 83 org.eclipse.jdt.core.formatter.indentation.size=4 148 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=do not insert149 84 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert 150 85 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert 151 86 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -
.settings/org.eclipse.jdt.ui.prefs
1 #Wed Jan 27 11:53:40 EST 2010 2 cleanup_settings_version=2 3 eclipse.preferences.version=1 4 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true 5 formatter_profile=_josm 6 formatter_settings_version=11 7 org.eclipse.jdt.ui.javadoc=false 8 org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">// License\: GPL. \r\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">// License\: GPL. For details, see LICENSE file.\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> 9 sp_cleanup.add_default_serial_version_id=true 10 sp_cleanup.add_generated_serial_version_id=false 11 sp_cleanup.add_missing_annotations=true 12 sp_cleanup.add_missing_deprecated_annotations=true 13 sp_cleanup.add_missing_methods=false 14 sp_cleanup.add_missing_nls_tags=false 15 sp_cleanup.add_missing_override_annotations=true 16 sp_cleanup.add_serial_version_id=false 17 sp_cleanup.always_use_blocks=false 18 sp_cleanup.always_use_parentheses_in_expressions=false 19 sp_cleanup.always_use_this_for_non_static_field_access=false 20 sp_cleanup.always_use_this_for_non_static_method_access=false 21 sp_cleanup.convert_to_enhanced_for_loop=false 22 sp_cleanup.correct_indentation=true 23 sp_cleanup.format_source_code=false 24 sp_cleanup.format_source_code_changes_only=false 25 sp_cleanup.make_local_variable_final=false 26 sp_cleanup.make_parameters_final=false 27 sp_cleanup.make_private_fields_final=false 28 sp_cleanup.make_type_abstract_if_missing_method=false 29 sp_cleanup.make_variable_declarations_final=false 30 sp_cleanup.never_use_blocks=false 31 sp_cleanup.never_use_parentheses_in_expressions=true 32 sp_cleanup.on_save_use_additional_actions=true 33 sp_cleanup.organize_imports=true 34 sp_cleanup.qualify_static_field_accesses_with_declaring_class=false 35 sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true 36 sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true 37 sp_cleanup.qualify_static_member_accesses_with_declaring_class=false 38 sp_cleanup.qualify_static_method_accesses_with_declaring_class=false 39 sp_cleanup.remove_private_constructors=true 40 sp_cleanup.remove_trailing_whitespaces=true 41 sp_cleanup.remove_trailing_whitespaces_all=true 42 sp_cleanup.remove_trailing_whitespaces_ignore_empty=false 43 sp_cleanup.remove_unnecessary_casts=true 44 sp_cleanup.remove_unnecessary_nls_tags=false 45 sp_cleanup.remove_unused_imports=false 46 sp_cleanup.remove_unused_local_variables=false 47 sp_cleanup.remove_unused_private_fields=true 48 sp_cleanup.remove_unused_private_members=false 49 sp_cleanup.remove_unused_private_methods=true 50 sp_cleanup.remove_unused_private_types=true 51 sp_cleanup.sort_members=false 52 sp_cleanup.sort_members_all=false 53 sp_cleanup.use_blocks=true 54 sp_cleanup.use_blocks_only_for_return_and_throw=true 55 sp_cleanup.use_parentheses_in_expressions=false 56 sp_cleanup.use_this_for_non_static_field_access=false 57 sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true 58 sp_cleanup.use_this_for_non_static_method_access=false 59 sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true 1 #Fri Aug 13 18:09:15 CEST 2010 2 cleanup_settings_version=2 3 eclipse.preferences.version=1 4 formatter_profile=_josm 5 formatter_settings_version=11 6 org.eclipse.jdt.ui.javadoc=false 7 org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">// License\: GPL. \r\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">// License\: GPL. For details, see LICENSE file.\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
