Changeset 2323 in josm for trunk/src


Ignore:
Timestamp:
2009-10-26T15:23:39+01:00 (15 years ago)
Author:
Gubaer
Message:

Added explicit help topics
See also current list of help topics with links to source files and to help pages

Location:
trunk/src/org/openstreetmap/josm
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java

    r1820 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.GridBagLayout;
     
    3031                Shortcut.registerShortcut("addnode", tr("Edit: {0}", tr("Add Node...")), KeyEvent.VK_D, Shortcut.GROUP_EDIT,
    3132                        Shortcut.SHIFT_DEFAULT), true);
     33        putValue("help", ht("/Action/AddNode"));
    3234    }
    3335
  • trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3738                Shortcut.registerShortcut("tools:aligncircle", tr("Tool: {0}", tr("Align Nodes in Circle")),
    3839                        KeyEvent.VK_O, Shortcut.GROUP_EDIT), true);
     40        putValue("help", ht("/Action/AlignInCircle"));
    3941    }
    4042
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3233        super(tr("Align Nodes in Line"), "alignline", tr("Move the selected nodes in to a line."),
    3334                Shortcut.registerShortcut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, Shortcut.GROUP_EDIT), true);
     35        putValue("help", ht("/Action/AlignInLine"));
    3436    }
    3537
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.marktr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56import static org.openstreetmap.josm.tools.I18n.tr;
    67
     
    5859        putValue("help", "Action/AutoScale/" + modeHelp);
    5960        this.mode = mode;
     61        if (mode.equals("data")) {
     62            putValue("help", ht("/Action/ZoomToData"));
     63        } else if (mode.equals("layer")) {
     64            putValue("help", ht("/Action/ZoomToLayer"));
     65        } else if (mode.equals("selection")) {
     66            putValue("help", ht("/Action/ZoomToSelection"));
     67        } else if (mode.equals("conflict")) {
     68            putValue("help", ht("/Action/ZoomToConflict"));
     69        }else if (mode.equals("download")) {
     70            putValue("help", ht("/Action/ZoomToDownload"));
     71        }                       
    6072    }
    6173
  • trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java

    r2115 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    4142                true
    4243        );
     44        putValue("help", ht("/Action/CloseChangeset"));
    4345
    4446    }
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r2308 r2323  
    33
    44import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.combineTigerTags;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.completeTagCollectionForEditing;
    67import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.normalizeTagCollectionBeforeEditing;
     
    4849        super(tr("Combine Way"), "combineway", tr("Combine several ways into one."),
    4950                Shortcut.registerShortcut("tools:combineway", tr("Tool: {0}", tr("Combine Way")), KeyEvent.VK_C, Shortcut.GROUP_EDIT), true);
     51        putValue("help", ht("/Action/CombineWay"));
    5052    }
    5153
  • trunk/src/org/openstreetmap/josm/actions/CopyAction.java

    r2305 r2323  
    44
    55import static org.openstreetmap.josm.tools.I18n.tr;
     6import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    67
    78import java.awt.event.ActionEvent;
     
    2425                tr("Copy selected objects to paste buffer."),
    2526                Shortcut.registerShortcut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, Shortcut.GROUP_MENU), true);
     27        putValue("help", ht("/Action/Copy"));
    2628        listeners = new LinkedList<JosmAction>();
    2729    }
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    4445        super(tr("Create Circle"), "createcircle", tr("Create a circle from three selected nodes."),
    4546                Shortcut.registerShortcut("tools:createcircle", tr("Tool: {0}", tr("Create Circle")), KeyEvent.VK_O, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
     47        putValue("help", ht("/Action/CreateCircle"));
    4648    }
    4749
  • trunk/src/org/openstreetmap/josm/actions/DeleteAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    1718        super(tr("Delete"), "dialogs/delete", tr("Delete selected objects."),
    1819                Shortcut.registerShortcut("system:delete", tr("Edit: {0}", tr("Delete")), KeyEvent.VK_DELETE, Shortcut.GROUP_DIRECT), true);
     20        putValue("help", ht("/Action/Delete"));
    1921    }
    2022
  • trunk/src/org/openstreetmap/josm/actions/DistributeAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3031        super(tr("Distribute Nodes"), "distribute", tr("Distribute the selected nodes to equal distances along a line."),
    3132                Shortcut.registerShortcut("tools:distribute", tr("Tool: {0}", tr("Distribute Nodes")), KeyEvent.VK_B, Shortcut.GROUP_EDIT), true);
     33        putValue("help", ht("/Action/Distribute"));
    3234    }
    3335
  • trunk/src/org/openstreetmap/josm/actions/DownloadAction.java

    r2322 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.BorderLayout;
     
    89import java.awt.event.ActionEvent;
    910import java.awt.event.KeyEvent;
    10 import java.util.List;
    1111import java.util.concurrent.Future;
    1212
     
    1717import org.openstreetmap.josm.actions.downloadtasks.DownloadTask;
    1818import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler;
    19 import org.openstreetmap.josm.gui.ExceptionDialogUtil;
    2019import org.openstreetmap.josm.gui.ExtendedDialog;
    2120import org.openstreetmap.josm.gui.download.DownloadDialog;
    22 import org.openstreetmap.josm.tools.ExceptionUtil;
    2321import org.openstreetmap.josm.tools.Shortcut;
    2422import org.openstreetmap.josm.tools.WindowGeometry;
     
    3937        super(tr("Download from OSM..."), "download", tr("Download map data from the OSM server."),
    4038                Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download from OSM...")), KeyEvent.VK_D, Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), true);
     39        putValue("help", ht("/Action/Download"));
    4140    }
    4241
  • trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java

    r2303 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3940        super(tr("Download parent ways/relations..."), "downloadreferrers", tr("Download primitives referring to one of the selected primitives"),
    4041                Shortcut.registerShortcut("file:downloadreferrers", tr("File: {0}", tr("Download parent ways/relations...")), KeyEvent.VK_D, Shortcut.GROUPS_ALT2+Shortcut.GROUP_HOTKEY), true);
     42        putValue("help", ht("/Action/Downloadreferrers"));
    4143    }
    4244
  • trunk/src/org/openstreetmap/josm/actions/DuplicateAction.java

    r2305 r2323  
    44
    55import static org.openstreetmap.josm.tools.I18n.tr;
     6import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    67
    78import java.awt.event.ActionEvent;
     
    1920                tr("Duplicate selection by copy and immediate paste."),
    2021                Shortcut.registerShortcut("system:duplicate", tr("Edit: {0}", tr("Duplicate")), KeyEvent.VK_D, Shortcut.GROUP_MENU), true);
     22        putValue("help", ht("/Action/Duplicate"));
    2123    }
    2224
  • trunk/src/org/openstreetmap/josm/actions/ExitAction.java

    r2274 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    2223        super(tr("Exit"), "exit", tr("Exit the application."),
    2324                Shortcut.registerShortcut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, Shortcut.GROUP_MENU), true);
     25        putValue("help", ht("/Action/Exit"));
    2426    }
    2527
  • trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java

    r2181 r2323  
    33
    44import static org.openstreetmap.josm.actions.SaveActionBase.createAndOpenSaveFileChooser;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56import static org.openstreetmap.josm.tools.I18n.tr;
    67
     
    2829        super(tr("Export to GPX..."), "exportgpx", tr("Export the data to GPX file."),
    2930                Shortcut.registerShortcut("file:exportgpx", tr("Export to GPX..."), KeyEvent.VK_E, Shortcut.GROUP_MENU));
     31        putValue("help", ht("/Action/GpxExport"));
    3032    }
    3133
  • trunk/src/org/openstreetmap/josm/actions/HelpAction.java

    r2308 r2323  
    3535                    c = SwingUtilities.getDeepestComponentAt(c, mouse.x, mouse.y);
    3636                    topic = HelpUtil.getContextSpecificHelpTopic(c);
     37                    System.out.println("topic is:" + topic);
    3738                } else {
    3839                    topic = null;
     
    4142                Point mouse = Main.parent.getMousePosition();
    4243                topic = HelpUtil.getContextSpecificHelpTopic(SwingUtilities.getDeepestComponentAt(Main.parent, mouse.x, mouse.y));
     44                System.out.println("topic is:" + topic);
    4345            }
    4446            if (topic == null) {
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java

    r2274 r2323  
    99import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1010import org.openstreetmap.josm.tools.Shortcut;
     11import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    1112
    1213public class HistoryInfoAction extends AbstractInfoAction {
     
    1718                Shortcut.registerShortcut("core:history",
    1819                        tr("Object history"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true);
     20        putValue("help", ht("/Action/HistoryInfo"));
    1921    }
    2022
  • trunk/src/org/openstreetmap/josm/actions/InfoAction.java

    r2034 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.KeyEvent;
     
    1718                Shortcut.registerShortcut("core:information",
    1819                        tr("Info about Element"), KeyEvent.VK_I, Shortcut.GROUP_HOTKEY), true);
     20        putValue("help", ht("/Action/Info"));
    1921    }
    2022
  • trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    2930        super(tr("Join Node to Way"), "joinnodeway", tr("Join a node into the nearest way segments"),
    3031                Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join Node to Way")), KeyEvent.VK_J, Shortcut.GROUP_EDIT), true);
     32        putValue("help", ht("/Action/JoinNodeWay"));
    3133    }
    3234
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r1890 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    2021                true /* register */
    2122        );
     23        putValue("help", ht("/Action/MergeLayer"));
    2224    }
    2325
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r2315 r2323  
    33
    44import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.combineTigerTags;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.completeTagCollectionForEditing;
    67import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.normalizeTagCollectionBeforeEditing;
     
    4647        super(tr("Merge Nodes"), "mergenodes", tr("Merge nodes into the oldest one."),
    4748                Shortcut.registerShortcut("tools:mergenodes", tr("Tool: {0}", tr("Merge Nodes")), KeyEvent.VK_M, Shortcut.GROUP_EDIT), true);
     49        putValue("help", ht("/Action/MergeNodesAction"));
    4850    }
    4951
  • trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    2324                true /* register */
    2425        );
     26        putValue("help", ht("/Action/MergeSelection"));
    2527    }
    2628
  • trunk/src/org/openstreetmap/josm/actions/MirrorAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3435                Shortcut.registerShortcut("tools:mirror", tr("Tool: {0}", tr("Mirror")),
    3536                        KeyEvent.VK_M, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
     37        putValue("help", ht("/Action/Mirror"));
    3638    }
    3739
  • trunk/src/org/openstreetmap/josm/actions/MoveAction.java

    r2305 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    5758                (Shortcut)calltosupermustbefirststatementinconstructor(dir, false), true);
    5859        myDirection = dir;
     60        putValue("help", ht("/Action/Move"));
    5961    }
    6062
  • trunk/src/org/openstreetmap/josm/actions/NewAction.java

    r1790 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    1718        super(tr("New"), "new", tr("Create a new map."),
    1819                Shortcut.registerShortcut("system:new", tr("File: {0}", tr("New")), KeyEvent.VK_N, Shortcut.GROUP_MENU), true);
     20        putValue("help", ht("/Action/New"));
    1921    }
    2022
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r2070 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3637        super(tr("Open..."), "open", tr("Open a file."),
    3738                Shortcut.registerShortcut("system:open", tr("File: {0}", tr("Open...")), KeyEvent.VK_O, Shortcut.GROUP_MENU));
     39        putValue("help", ht("/Action/OpenFile"));
     40       
    3841    }
    3942
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r2322 r2323  
    22package org.openstreetmap.josm.actions;
    33
     4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    45import static org.openstreetmap.josm.tools.I18n.tr;
    56
     
    2324import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    2425import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
    25 import org.openstreetmap.josm.tools.GBC;
    2626import org.openstreetmap.josm.tools.Shortcut;
    2727
     
    3939        super(tr("Open Location..."), "openlocation", tr("Open an URL."),
    4040                Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")), KeyEvent.VK_L, Shortcut.GROUP_MENU), true);
     41        putValue("help", ht("/Action/OpenLocation"));
    4142    }
    4243
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r2268 r2323  
    33package org.openstreetmap.josm.actions;
    44
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56import static org.openstreetmap.josm.tools.I18n.tr;
    67
     
    1011import java.util.Arrays;
    1112import java.util.Collection;
     13import java.util.HashMap;
    1214import java.util.HashSet;
    13 import java.util.HashMap;
    1415import java.util.LinkedList;
    1516
     
    2122import org.openstreetmap.josm.command.SequenceCommand;
    2223import org.openstreetmap.josm.data.coor.EastNorth;
    23 import org.openstreetmap.josm.data.coor.LatLon;
    2424import org.openstreetmap.josm.data.osm.Node;
    2525import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    4848                        KeyEvent.VK_Q,
    4949                        Shortcut.GROUP_EDIT), true);
     50        putValue("help", ht("/Action/Orthogonalize"));
    5051    }
    5152
  • trunk/src/org/openstreetmap/josm/actions/PasteAction.java

    r2312 r2323  
    44
    55import static org.openstreetmap.josm.tools.I18n.tr;
     6import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    67
    78import java.awt.event.ActionEvent;
     
    3031        super(tr("Paste"), "paste", tr("Paste contents of paste buffer."),
    3132                Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.GROUP_MENU), true);
     33        putValue("help", ht("/Action/Paste"));
    3234    }
    3335
  • trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java

    r2305 r2323  
    44
    55import static org.openstreetmap.josm.tools.I18n.tr;
     6import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    67import static org.openstreetmap.josm.tools.I18n.trn;
    78
     
    3334                Shortcut.registerShortcut("system:pastestyle", tr("Edit: {0}", tr("Paste Tags")), KeyEvent.VK_V, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true);
    3435        copyAction.addListener(this);
     36        putValue("help", ht("/Action/PasteTags"));
    3537    }
    3638
  • trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java

    r1742 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.Dimension;
     
    3132        super(tr("Preferences..."), "preference", tr("Open a preferences page for global settings."),
    3233        Shortcut.registerShortcut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, Shortcut.GROUP_DIRECT), true);
     34        putValue("help", ht("/Action/Preferences"));
    3335    }
    3436
  • trunk/src/org/openstreetmap/josm/actions/RedoAction.java

    r1820 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    2425                Shortcut.registerShortcut("system:redo", tr("Edit: {0}", tr("Redo")), KeyEvent.VK_Y, Shortcut.GROUP_MENU), true);
    2526        setEnabled(false);
     27        putValue("help", ht("/Action/Redo"));
    2628    }
    2729
  • trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java

    r2017 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3738        this.file = file;
    3839        this.layer = layer;
    39         this.putValue("help", "Action/LayerRename");
     40        this.putValue("help", ht("/Action/RenameLayer"));       
    4041    }
    4142
  • trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3031        super(tr("Reverse Ways"), "wayflip", tr("Reverse the direction of all selected ways."),
    3132                Shortcut.registerShortcut("tools:reverse", tr("Tool: {0}", tr("Reverse Ways")), KeyEvent.VK_R, Shortcut.GROUP_EDIT), true);
     33        putValue("help", ht("/Action/ReverseWay"));
    3234    }
    3335
  • trunk/src/org/openstreetmap/josm/actions/SaveAction.java

    r2070 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.KeyEvent;
     
    2728        super(tr("Save"), "save", tr("Save the current data."),
    2829                Shortcut.registerShortcut("system:save", tr("File: {0}", tr("Save")), KeyEvent.VK_S, Shortcut.GROUP_MENU));
     30        putValue("help", ht("/Action/Save"));
    2931    }
    3032
  • trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java

    r2017 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.KeyEvent;
     
    2425        super(tr("Save As..."), "save_as", tr("Save the current data to a new file."),
    2526                Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save As...")), KeyEvent.VK_S, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT));
     27        putValue("help", ht("/Action/SaveAs"));
    2628    }
    2729
  • trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java

    r1865 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    1415        super(tr("Select All"),"selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
    1516                Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.GROUP_MENU), true);
     17        putValue("help", ht("/Action/SelectAll"));
    1618    }
    1719
  • trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java

    r2108 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.Dimension;
     
    3940                        tr("Show Status Report")), KeyEvent.VK_R, Shortcut.GROUP_NONE), true);
    4041
     42        putValue("help", ht("/Action/ShowStatusReport"));
    4143    }
    4244
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r2256 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56import static org.openstreetmap.josm.tools.I18n.trn;
    67
     
    5253        super(tr("Split Way"), "splitway", tr("Split a way at the selected node."),
    5354                Shortcut.registerShortcut("tools:splitway", tr("Tool: {0}", tr("Split Way")), KeyEvent.VK_P, Shortcut.GROUP_EDIT), true);
     55        putValue("help", ht("/Action/SplitWay"));
    5456    }
    5557
  • trunk/src/org/openstreetmap/josm/actions/ToggleGPXLinesAction.java

    r1502 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    1516        super(tr("Toggle GPX Lines"), "gps-lines", tr("Toggles the global setting ''{0}''.", tr("Draw lines between raw gps points.")),
    1617        Shortcut.registerShortcut("view:gpxlines", tr("View: {0}", tr("Toggle GPX Lines")), KeyEvent.VK_X, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true);
     18        putValue("help", ht("/Action/ToggleGPXLines"));
    1719    }
    1820
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r2264 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    5152        super(tr("UnGlue Ways"), "unglueways", tr("Duplicate nodes that are used by multiple ways."),
    5253                Shortcut.registerShortcut("tools:unglue", tr("Tool: {0}", tr("UnGlue Ways")), KeyEvent.VK_G, Shortcut.GROUP_EDIT), true);
     54        putValue("help", ht("/Action/UnGlue"));
    5355    }
    5456
  • trunk/src/org/openstreetmap/josm/actions/UndoAction.java

    r1820 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    2425                Shortcut.registerShortcut("system:undo", tr("Edit: {0}", tr("Undo")), KeyEvent.VK_Z, Shortcut.GROUP_MENU), true);
    2526        setEnabled(false);
     27        putValue("help", ht("/Action/Undo"));
    2628    }
    2729
  • trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java

    r1865 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    3637                        KeyEvent.VK_ESCAPE, Shortcut.GROUP_DIRECT).getKeyStroke(),
    3738                        tr("Unselect All"));
     39       
     40        putValue("help", ht("/Action/UnselectAll"));
    3841    }
    3942
  • trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java

    r2317 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    2526                        Shortcut.GROUP_HOTKEY),
    2627                        true);
     28        putValue("help", ht("/Action/UpdateData"));
    2729    }
    2830
  • trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java

    r2277 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    9697                        Shortcut.GROUP_HOTKEY + Shortcut.GROUPS_ALT2),
    9798                        true);
     99        putValue("help", ht("UpdateSelection"));
    98100    }
    99101
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r2319 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    119120        super(tr("Upload data"), "upload", tr("Upload all changes in the active data layer to the OSM server"),
    120121                Shortcut.registerShortcut("file:upload", tr("File: {0}", tr("Upload data")), KeyEvent.VK_U, Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), true);
     122        putValue("help", ht("/Action/Upload"));
    121123    }
    122124
  • trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java

    r2273 r2323  
    3333import org.openstreetmap.josm.tools.ExceptionUtil;
    3434import org.xml.sax.SAXException;
    35 
     35import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    3636
    3737/**
     
    4949                null, /* no shortcut */
    5050                true);
     51        putValue("help", ht("/Action/UploadSelection"));
    5152    }
    5253
  • trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java

    r1895 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    1516        super(tr("Zoom In"), "dialogs/zoomin", tr("Zoom In"),
    1617                Shortcut.registerShortcut("view:zoomin", tr("View: {0}", tr("Zoom In")), KeyEvent.VK_PLUS, Shortcut.GROUP_DIRECT), true);
     18        putValue("help", ht("/Action/ZoomIn"));
    1719    }
    1820
  • trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java

    r1895 r2323  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    56
    67import java.awt.event.ActionEvent;
     
    1516        super(tr("Zoom Out"), "dialogs/zoomout", tr("Zoom Out"),
    1617                Shortcut.registerShortcut("view:zoomout", tr("View: {0}", tr("Zoom Out")), KeyEvent.VK_MINUS, Shortcut.GROUP_DIRECT), true);
     18        putValue("help", ht("/Action/ZoomOut"));
    1719    }
    1820
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r2308 r2323  
    2828import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    2929import org.openstreetmap.josm.data.osm.Relation;
    30 import org.openstreetmap.josm.data.osm.RelationMember;
    3130import org.openstreetmap.josm.data.osm.Way;
    3231import org.openstreetmap.josm.data.osm.WaySegment;
     
    3534import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
    3635import org.openstreetmap.josm.gui.DefaultNameFormatter;
    37 import org.openstreetmap.josm.gui.ExtendedDialog;
    3836import org.openstreetmap.josm.gui.actionsupport.DeleteFromRelationConfirmationDialog;
    3937import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4038import org.openstreetmap.josm.tools.ImageProvider;
    4139
    42 import sun.swing.BakedArrayList;
    43 
    4440/**
    4541 * A command to delete a number of primitives from the dataset.
    46 
     42 *
    4743 */
    4844public class DeleteCommand extends Command {
     
    232228    public static Command deleteWithReferences(OsmDataLayer layer, Collection<? extends OsmPrimitive> selection) {
    233229        return deleteWithReferences(layer, selection, false);
    234     }
    235 
    236     private static int testRelation(Relation ref, OsmPrimitive osm, boolean simulate) {
    237         // If this delete action is simulated, do not bug the user with dialogs
    238         // and assume the relations should be deleted
    239         if(simulate)
    240             return 1;
    241 
    242         String role = "";
    243         for (RelationMember m : ref.getMembers()) {
    244             if (m.getMember() == osm) {
    245                 role = m.getRole();
    246                 break;
    247             }
    248         }
    249         ExtendedDialog dialog = new ExtendedDialog(
    250                 Main.parent,
    251                 tr("Conflicting relation"),
    252                 new String[] { tr("Delete from relation"),tr("Cancel") }
    253         );
    254         dialog.setButtonIcons( new String[] { "dialogs/delete.png", "cancel.png" });
    255         if (role.length() > 0) {
    256             dialog.setContent(
    257                     tr(
    258                             "<html>Selection \"{0}\" is used by relation \"{1}\" with role {2}.<br>Delete from relation?</html>",
    259                             osm.getDisplayName(DefaultNameFormatter.getInstance()),
    260                             ref.getDisplayName(DefaultNameFormatter.getInstance()),
    261                             role
    262                     )
    263             );
    264             dialog.showDialog();
    265             return dialog.getValue();
    266         } else {
    267             dialog.setContent(
    268                     tr(
    269                             "<html>Selection \"{0}\" is used by relation \"{1}\".<br>Delete from relation?</html>",
    270                             osm.getDisplayName(DefaultNameFormatter.getInstance()),
    271                             ref.getDisplayName(DefaultNameFormatter.getInstance())
    272                     )
    273             );
    274             dialog.showDialog();
    275             return dialog.getValue();
    276         }
    277230    }
    278231
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r2268 r2323  
    8181import org.openstreetmap.josm.tools.PlatformHookUnixoid;
    8282import org.openstreetmap.josm.tools.Shortcut;
    83 
     83import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    8484/**
    8585 * This is the JOSM main menu bar. It is overwritten to initialize itself and provide all menu
     
    159159    public final JosmAction statusreport = new ShowStatusReportAction();
    160160
    161     public final JMenu fileMenu = addMenu(marktr("File"), KeyEvent.VK_F, 0);
    162     public final JMenu editMenu = addMenu(marktr("Edit"), KeyEvent.VK_E, 1);
    163     public final JMenu viewMenu = addMenu(marktr("View"), KeyEvent.VK_V, 2);
    164     public final JMenu toolsMenu = addMenu(marktr("Tools"), KeyEvent.VK_T, 3);
    165     public final JMenu presetsMenu = addMenu(marktr("Presets"), KeyEvent.VK_P, 4);
     161    public final JMenu fileMenu = addMenu(marktr("File"), KeyEvent.VK_F, 0, ht("/Menu/File"));
     162    public final JMenu editMenu = addMenu(marktr("Edit"), KeyEvent.VK_E, 1, ht("/Menu/Edit"));
     163    public final JMenu viewMenu = addMenu(marktr("View"), KeyEvent.VK_V, 2, ht("/Menu/View"));
     164    public final JMenu toolsMenu = addMenu(marktr("Tools"), KeyEvent.VK_T, 3, ht("/Menu/Tools"));
     165    public final JMenu presetsMenu = addMenu(marktr("Presets"), KeyEvent.VK_P, 4, ht("/Menu/Presets"));
    166166    public JMenu audioMenu = null;
    167     public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 5);
     167    public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 5, ht("/Menu/Help"));
    168168    public final int defaultMenuPos = 5;
    169169
     
    185185        return menuitem;
    186186    }
    187     public JMenu addMenu(String name, int mnemonicKey, int position)
    188     {
     187   
     188    @Deprecated
     189    public JMenu addMenu(String name, int mnemonicKey, int position) {
     190        return addMenu(name, mnemonicKey, position, "/Menu/" + name);
     191    }
     192   
     193    public JMenu addMenu(String name, int mnemonicKey, int position, String relativeHelpTopic) {
    189194        JMenu menu = new JMenu(tr(name));
    190195        Shortcut.registerShortcut("menu:" + name, tr("Menu: {0}", tr(name)), mnemonicKey,
    191196                Shortcut.GROUP_MNEMONIC).setMnemonic(menu);
    192197        add(menu, position);
    193         menu.putClientProperty("help", "Menu/"+name);
     198        menu.putClientProperty("help", relativeHelpTopic);
    194199        return menu;
    195200    }
     
    309314
    310315        if (!Main.pref.getBoolean("audio.menuinvisible", false)) {
    311             audioMenu = addMenu(marktr("Audio"), KeyEvent.VK_A, 5);
     316            audioMenu = addMenu(marktr("Audio"), KeyEvent.VK_A, 5, ht("/Menu/Audio"));
    312317            add(audioMenu, audioPlayPause);
    313318            add(audioMenu, audioNext);
Note: See TracChangeset for help on using the changeset viewer.