Changeset 30114 in osm for applications
- Timestamp:
- 2013-12-07T21:29:17+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/OpeningHoursEditor
- Files:
-
- 1 added
- 4 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/OpeningHoursEditor/.project
r29853 r30114 2 2 <projectDescription> 3 3 <name>JOSM-OpeningHoursEditor</name> 4 <comment> </comment>4 <comment>Nature JavaCC</comment> 5 5 <projects> 6 6 </projects> 7 7 <buildSpec> 8 <buildCommand> 9 <name>sf.eclipse.javacc.javaccbuilder</name> 10 <arguments> 11 </arguments> 12 </buildCommand> 8 13 <buildCommand> 9 14 <name>org.eclipse.jdt.core.javabuilder</name> … … 14 19 <natures> 15 20 <nature>org.eclipse.jdt.core.javanature</nature> 21 <nature>sf.eclipse.javacc.javaccnature</nature> 16 22 </natures> 17 23 </projectDescription> -
applications/editors/josm/plugins/OpeningHoursEditor/.settings/org.eclipse.jdt.core.prefs
r29854 r30114 6 6 org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable 7 7 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled 8 org.eclipse.jdt.core.compiler.doc.comment.support=enabled 8 9 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning 9 10 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore … … 27 28 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning 28 29 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore 30 org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning 31 org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled 32 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled 33 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled 34 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public 29 35 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore 30 36 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning … … 33 39 org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled 34 40 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore 41 org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning 42 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled 43 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public 44 org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag 45 org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning 46 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled 47 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled 48 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public 35 49 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore 36 50 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java
r29854 r30114 48 48 import org.openstreetmap.josm.tools.Shortcut; 49 49 50 /** 51 * Opening hours editor plugin. 52 */ 50 53 public class OhePlugin extends Plugin { 54 51 55 /** 52 56 * Strings for choosing which key of an object with given tags should be … … 68 72 * Will be invoked by JOSM to bootstrap the plugin 69 73 * 70 * @param info 71 * information about the plugin and its local installation 74 * @param info information about the plugin and its local installation 72 75 */ 73 76 public OhePlugin(PluginInformation info) { … … 79 82 * this Action is used for calling the OpeningsHourEditor, the selected 80 83 * objects in the active datalayer are edited 81 *82 * @author boman83 84 */ 84 85 class OheMenuAction extends JosmAction { -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java
r26219 r30114 6 6 import org.openstreetmap.josm.plugins.ohe.parser.OpeningTimeCompiler; 7 7 8 /** 9 * Collection of utility methods. 10 */ 8 11 public class OpeningTimeUtils { 9 // implements the subtraction of daytimes in spans of days when a day in 10 // the list occurs direct afterwards 12 13 /** 14 * Implements the subtraction of daytimes in spans of days when a day in the list occurs direct afterwards 15 */ 11 16 public static ArrayList<int[]> convert(ArrayList<DateTime> dateTimes) { 12 17 ArrayList<int[]> ret = new ArrayList<int[]>(); // the list which is … … 104 109 } 105 110 106 // returns a String (e.g "Mo-Sa 10:00-20:00; Tu off") representing the 107 // TimeRects 111 /** 112 * Returns a String (e.g "Mo-Sa 10:00-20:00; Tu off") representing the TimeRects 113 */ 108 114 public static String makeStringFromRects(ArrayList<TimeRect> givenTimeRects) { 109 115 // create an array of booleans representing every minute on all the days … … 178 184 } 179 185 180 // returns a String representing the openinghours on one special day (e.g. 181 // "10:00-20:00") 186 /** 187 * Returns a String representing the openinghours on one special day (e.g. "10:00-20:00") 188 */ 182 189 private static String makeStringFromMinuteArray(boolean[] minutes) { 183 190 String ret = ""; … … 212 219 213 220 /** 221 * 214 222 * @param minutes integer in range from 0 and 24*60 inclusive 215 223 * @param hourMode 12 or 24 hour clock -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java
r29854 r30114 17 17 import javax.swing.JTextField; 18 18 19 import org.openstreetmap.josm.Main; 19 20 import org.openstreetmap.josm.plugins.ohe.ClockSystem; 20 21 import org.openstreetmap.josm.plugins.ohe.OhePlugin; … … 23 24 import org.openstreetmap.josm.plugins.ohe.parser.ParseException; 24 25 import org.openstreetmap.josm.plugins.ohe.parser.SyntaxException; 25 import org.openstreetmap.josm.plugins.ohe.parser.TokenMgrError;26 26 import org.openstreetmap.josm.tools.GBC; 27 27 … … 67 67 value = valuesMap.keySet().iterator().next(); 68 68 else if (valuesMap.size() > 1) { 69 // TODO let the user choose which value he wants to edit (e.g. 70 // with a combobox) 69 // TODO let the user choose which value he wants to edit (e.g. with a combobox) 71 70 int mostOccurences = 0; 72 71 for (String v : valuesMap.keySet()) … … 140 139 tColumns = new int[] { syntaxError.getStartColumn(), syntaxError.getEndColumn() }; 141 140 info = syntaxError.getInfo(); 142 } else if (t instanceof TokenMgrError) {143 TokenMgrError tokenMgrError = (TokenMgrError) t;144 tColumns = new int[] { tokenMgrError.errorColumn - 1, tokenMgrError.errorColumn + 1 };145 141 } else { 146 t.printStackTrace();142 Main.warn(t); 147 143 } 148 144 -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/parser/OpeningTimeCompiler.jj
r30112 r30114 30 30 ERROR_REPORTING = true; 31 31 JAVA_UNICODE_ESCAPE = false; 32 UNICODE_INPUT = false;32 UNICODE_INPUT = true; 33 33 IGNORE_CASE = false; 34 34 USER_TOKEN_MANAGER = false;
Note:
See TracChangeset
for help on using the changeset viewer.