Last change
on this file was 36173, checked in by taylor.smock, 7 months ago |
See #23218: Use newer error_prone versions when compiling on java 11+
This should allow us to compile all plugins with Java 21 (specifically OpenData).
OpenData has some additional changes, since some of the new error_prone checks
blocked compilation.
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.plugins.opendata.core.actions;
|
---|
3 |
|
---|
4 | import java.awt.event.ActionEvent;
|
---|
5 | import java.net.URL;
|
---|
6 | import java.util.Locale;
|
---|
7 |
|
---|
8 | import javax.swing.Action;
|
---|
9 |
|
---|
10 | import org.openstreetmap.josm.actions.JosmAction;
|
---|
11 | import org.openstreetmap.josm.gui.MainApplication;
|
---|
12 | import org.openstreetmap.josm.plugins.opendata.core.modules.Module;
|
---|
13 | import org.openstreetmap.josm.tools.CheckParameterUtil;
|
---|
14 |
|
---|
15 | public class DownloadDataAction extends JosmAction {
|
---|
16 |
|
---|
17 | private final URL url;
|
---|
18 |
|
---|
19 | public DownloadDataAction(Module module, String name, URL url) {
|
---|
20 | super(false);
|
---|
21 | CheckParameterUtil.ensureParameterNotNull(name, "name");
|
---|
22 | CheckParameterUtil.ensureParameterNotNull(url, "url");
|
---|
23 | putValue(Action.NAME, name);
|
---|
24 | putValue("toolbar", ("opendata_download_"+module.getDisplayedName()+"_"+name).toLowerCase(Locale.ROOT).replace(" ", "_"));
|
---|
25 | this.url = url;
|
---|
26 | }
|
---|
27 |
|
---|
28 | @Override
|
---|
29 | public void actionPerformed(ActionEvent e) {
|
---|
30 | MainApplication.getMenu().openLocation.openUrl(true, url.toString());
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.