Changeset 10407 in josm
- Timestamp:
- 2016-06-16T20:07:17+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r10386 r10407 34 34 * @since 4869 35 35 */ 36 p ublicstatic final ArrayList<FileImporter> importers;36 private static final ArrayList<FileImporter> importers; 37 37 38 38 /** … … 40 40 * @since 4869 41 41 */ 42 p ublicstatic final ArrayList<FileExporter> exporters;42 private static final ArrayList<FileExporter> exporters; 43 43 44 44 // add some file types only if the relevant classes are there. … … 140 140 141 141 /** 142 * Adds a new file importer at the end of the global list. This importer will be evaluated after core ones. 143 * @param importer new file importer 144 * @since 10407 145 */ 146 public static void addImporter(FileImporter importer) { 147 if (importer != null) { 148 importers.add(importer); 149 } 150 } 151 152 /** 153 * Adds a new file importer at the beginning of the global list. This importer will be evaluated before core ones. 154 * @param importer new file importer 155 * @since 10407 156 */ 157 public static void addImporterFirst(FileImporter importer) { 158 if (importer != null) { 159 importers.add(0, importer); 160 } 161 } 162 163 /** 164 * Adds a new file exporter at the end of the global list. This exporter will be evaluated after core ones. 165 * @param exporter new file exporter 166 * @since 10407 167 */ 168 public static void addExporter(FileExporter exporter) { 169 if (exporter != null) { 170 exporters.add(exporter); 171 } 172 } 173 174 /** 175 * Adds a new file exporter at the beginning of the global list. This exporter will be evaluated before core ones. 176 * @param exporter new file exporter 177 * @since 10407 178 */ 179 public static void addExporterFirst(FileExporter exporter) { 180 if (exporter != null) { 181 exporters.add(0, exporter); 182 } 183 } 184 185 /** 186 * Returns the list of file importers. 187 * @return unmodifiable list of file importers 188 * @since 10407 189 */ 190 public static List<FileImporter> getImporters() { 191 return Collections.unmodifiableList(importers); 192 } 193 194 /** 195 * Returns the list of file exporters. 196 * @return unmodifiable list of file exporters 197 * @since 10407 198 */ 199 public static List<FileExporter> getExporters() { 200 return Collections.unmodifiableList(exporters); 201 } 202 203 /** 142 204 * Updates the {@link AllFormatsImporter} that is contained in the importers list. If 143 205 * you do not use the importers variable directly, you don’t need to call this. -
trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
r10318 r10407 85 85 return; 86 86 87 for (FileExporter exporter : ExtensionFileFilter. exporters) {87 for (FileExporter exporter : ExtensionFileFilter.getExporters()) { 88 88 if (exporter.acceptFile(file, layer)) { 89 89 try { -
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r10242 r10407 238 238 FileImporter chosenImporter = null; 239 239 if (fileFilter != null) { 240 for (FileImporter importer : ExtensionFileFilter. importers) {240 for (FileImporter importer : ExtensionFileFilter.getImporters()) { 241 241 if (fileFilter.equals(importer.filter)) { 242 242 chosenImporter = importer; … … 291 291 List<File> urlFiles = new LinkedList<>(); 292 292 FILES: for (File f : files) { 293 for (FileImporter importer : ExtensionFileFilter. importers) {293 for (FileImporter importer : ExtensionFileFilter.getImporters()) { 294 294 if (importer.acceptFile(f)) { 295 295 importerMap.put(importer, f); -
trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
r10318 r10407 93 93 boolean exported = false; 94 94 boolean canceled = false; 95 for (FileExporter exporter : ExtensionFileFilter. exporters) {95 for (FileExporter exporter : ExtensionFileFilter.getExporters()) { 96 96 if (exporter.acceptFile(file, layer)) { 97 97 exporter.exportData(file, layer); -
trunk/src/org/openstreetmap/josm/io/AllFormatsImporter.java
r10228 r10407 31 31 */ 32 32 private static String getAllExtensions() { 33 Iterator<FileImporter> imp = ExtensionFileFilter. importers.iterator();33 Iterator<FileImporter> imp = ExtensionFileFilter.getImporters().iterator(); 34 34 StringBuilder ext = new StringBuilder(); 35 35 while (imp.hasNext()) {
Note:
See TracChangeset
for help on using the changeset viewer.