| Line | |
|---|
| 1 | package annotationtester;
|
|---|
| 2 |
|
|---|
| 3 | import static org.openstreetmap.josm.tools.I18n.tr;
|
|---|
| 4 |
|
|---|
| 5 | import java.awt.event.ActionEvent;
|
|---|
| 6 | import java.awt.event.KeyEvent;
|
|---|
| 7 |
|
|---|
| 8 | import javax.swing.JOptionPane;
|
|---|
| 9 |
|
|---|
| 10 | import org.openstreetmap.josm.Main;
|
|---|
| 11 | import org.openstreetmap.josm.actions.JosmAction;
|
|---|
| 12 |
|
|---|
| 13 | /**
|
|---|
| 14 | * Fires up the annotation tester
|
|---|
| 15 | * @author Immanuel.Scholz
|
|---|
| 16 | */
|
|---|
| 17 | public class AnnotationTesterAction extends JosmAction {
|
|---|
| 18 |
|
|---|
| 19 | public AnnotationTesterAction() {
|
|---|
| 20 | super(tr("Annotation Preset Tester"), "annotation-tester", tr("Open the annotation preset test tool for previewing annotation preset dialogs."), KeyEvent.VK_A, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK, true);
|
|---|
| 21 | Main.main.menu.helpMenu.addSeparator();
|
|---|
| 22 | Main.main.menu.helpMenu.add(this);
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | public void actionPerformed(ActionEvent e) {
|
|---|
| 26 | String annotationSources = Main.pref.get("annotation.sources");
|
|---|
| 27 | if (annotationSources.equals("")) {
|
|---|
| 28 | JOptionPane.showMessageDialog(Main.parent, tr("You have to specify annotation sources in the preferences first."));
|
|---|
| 29 | return;
|
|---|
| 30 | }
|
|---|
| 31 | String[] args = annotationSources.split(";");
|
|---|
| 32 | new AnnotationTester(args);
|
|---|
| 33 | }
|
|---|
| 34 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.