Changeset 14397 in josm


Ignore:
Timestamp:
2018-11-01T22:57:33+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #16935 - simplify/cleanup help topics of ToggleDialog/ToggleDialogAction

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

Legend:

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

    r14367 r14397  
    7171        super(info.getMenuName(), /* ICON */"imagery_menu", tr("Add imagery layer {0}", info.getName()), null,
    7272                true, ToolbarPreferences.IMAGERY_PREFIX + info.getToolbarName(), false);
    73         putValue("help", ht("/Preferences/Imagery"));
     73        setHelpId(ht("/Preferences/Imagery"));
    7474        setTooltip(info.getToolTipText().replaceAll("</?html>", ""));
    7575        this.info = info;
  • trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java

    r14153 r14397  
    3535                Shortcut.registerShortcut("addnode", tr("Edit: {0}", tr("Add Node...")),
    3636                        KeyEvent.VK_D, Shortcut.SHIFT), true);
    37         putValue("help", ht("/Action/AddNode"));
     37        setHelpId(ht("/Action/AddNode"));
    3838    }
    3939
  • trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java

    r14134 r14397  
    5050                Shortcut.registerShortcut("tools:aligncircle", tr("Tool: {0}", tr("Align Nodes in Circle")),
    5151                        KeyEvent.VK_O, Shortcut.DIRECT), true);
    52         putValue("help", ht("/Action/AlignInCircle"));
     52        setHelpId(ht("/Action/AlignInCircle"));
    5353    }
    5454
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r14134 r14397  
    5555        super(tr("Align Nodes in Line"), "alignline", tr("Move the selected nodes in to a line."),
    5656                Shortcut.registerShortcut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, Shortcut.DIRECT), true);
    57         putValue("help", ht("/Action/AlignInLine"));
     57        setHelpId(ht("/Action/AlignInLine"));
    5858    }
    5959
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r14221 r14397  
    246246        String label = mode.getEnglishLabel();
    247247        String modeHelp = Character.toUpperCase(label.charAt(0)) + label.substring(1);
    248         putValue("help", "Action/AutoScale/" + modeHelp);
     248        setHelpId("Action/AutoScale/" + modeHelp);
    249249        this.mode = mode;
    250250        switch (mode) {
    251251        case DATA:
    252             putValue("help", ht("/Action/ZoomToData"));
     252            setHelpId(ht("/Action/ZoomToData"));
    253253            break;
    254254        case LAYER:
    255             putValue("help", ht("/Action/ZoomToLayer"));
     255            setHelpId(ht("/Action/ZoomToLayer"));
    256256            break;
    257257        case SELECTION:
    258             putValue("help", ht("/Action/ZoomToSelection"));
     258            setHelpId(ht("/Action/ZoomToSelection"));
    259259            break;
    260260        case CONFLICT:
    261             putValue("help", ht("/Action/ZoomToConflict"));
     261            setHelpId(ht("/Action/ZoomToConflict"));
    262262            break;
    263263        case PROBLEM:
    264             putValue("help", ht("/Action/ZoomToProblem"));
     264            setHelpId(ht("/Action/ZoomToProblem"));
    265265            break;
    266266        case DOWNLOAD:
    267             putValue("help", ht("/Action/ZoomToDownload"));
     267            setHelpId(ht("/Action/ZoomToDownload"));
    268268            break;
    269269        case PREVIOUS:
    270             putValue("help", ht("/Action/ZoomToPrevious"));
     270            setHelpId(ht("/Action/ZoomToPrevious"));
    271271            break;
    272272        case NEXT:
    273             putValue("help", ht("/Action/ZoomToNext"));
     273            setHelpId(ht("/Action/ZoomToNext"));
    274274            break;
    275275        default:
  • trunk/src/org/openstreetmap/josm/actions/ChangesetManagerToggleAction.java

    r9067 r14397  
    3535        notifySelectedState();
    3636        changesetCacheManagerClosedHandler = new ChangesetCacheManagerClosedHandler();
    37         putValue("help", ht("/Dialog/ChangesetManager"));
     37        setHelpId(ht("/Dialog/ChangesetManager"));
    3838    }
    3939
  • trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java

    r14390 r14397  
    5252            true
    5353        );
    54         putValue("help", ht("/Action/CloseChangeset"));
     54        setHelpId(ht("/Action/CloseChangeset"));
    5555        setEnabled(!NetworkManager.isOffline(OnlineResource.OSM_API));
    5656
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r14256 r14397  
    5757        super(tr("Combine Way"), "combineway", tr("Combine several ways into one."),
    5858                Shortcut.registerShortcut("tools:combineway", tr("Tool: {0}", tr("Combine Way")), KeyEvent.VK_C, Shortcut.DIRECT), true);
    59         putValue("help", ht("/Action/CombineWay"));
     59        setHelpId(ht("/Action/CombineWay"));
    6060    }
    6161
  • trunk/src/org/openstreetmap/josm/actions/CopyAction.java

    r14153 r14397  
    3434                tr("Copy selected objects to paste buffer."),
    3535                Shortcut.registerShortcut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, Shortcut.CTRL), true);
    36         putValue("help", ht("/Action/Copy"));
     36        setHelpId(ht("/Action/Copy"));
    3737        // CUA shortcut for copy (https://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)
    3838        MainApplication.registerActionShortcut(this,
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r14194 r14397  
    6363            Shortcut.registerShortcut("tools:createcircle", tr("Tool: {0}", tr("Create Circle")),
    6464            KeyEvent.VK_O, Shortcut.SHIFT), true, "createcircle", true);
    65         putValue("help", ht("/Action/CreateCircle"));
     65        setHelpId(ht("/Action/CreateCircle"));
    6666    }
    6767
  • trunk/src/org/openstreetmap/josm/actions/DeleteAction.java

    r14153 r14397  
    6363        super(tr("Delete"), "dialogs/delete", tr("Delete selected objects."),
    6464                Shortcut.registerShortcut("system:delete", tr("Edit: {0}", tr("Delete")), KeyEvent.VK_DELETE, Shortcut.DIRECT), true);
    65         putValue("help", ht("/Action/Delete"));
     65        setHelpId(ht("/Action/Delete"));
    6666    }
    6767
  • trunk/src/org/openstreetmap/josm/actions/DeleteLayerAction.java

    r12636 r14397  
    2525                Shortcut.registerShortcut("system:deletelayer", tr("File: {0}", tr("Delete Layer")), KeyEvent.VK_F4, Shortcut.CTRL),
    2626                true, "delete-layer", true);
    27         putValue("help", ht("/Action/DeleteLayer"));
     27        setHelpId(ht("/Action/DeleteLayer"));
    2828    }
    2929
  • trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java

    r13090 r14397  
    3535              false
    3636        );
    37         putValue("help", ht("/ToggleDialogs"));
     37        setHelpId(ht("/ToggleDialogs"));
    3838        setSelected(Config.getPref().getBoolean("draw.dialogspanel", true));
    3939        notifySelectedState();
  • trunk/src/org/openstreetmap/josm/actions/DistributeAction.java

    r14134 r14397  
    4242              Shortcut.registerShortcut("tools:distribute", tr("Tool: {0}", tr("Distribute Nodes")), KeyEvent.VK_B, Shortcut.SHIFT),
    4343              true);
    44         putValue("help", ht("/Action/DistributeNodes"));
     44        setHelpId(ht("/Action/DistributeNodes"));
    4545    }
    4646
  • trunk/src/org/openstreetmap/josm/actions/DownloadAction.java

    r14390 r14397  
    2828              Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download data")), KeyEvent.VK_DOWN, Shortcut.CTRL_SHIFT),
    2929              true);
    30         putValue("help", ht("/Action/Download"));
     30        setHelpId(ht("/Action/Download"));
    3131    }
    3232
  • trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java

    r13761 r14397  
    3535        super(tr("Download object..."), "downloadprimitive", tr("Download OSM object by ID"),
    3636                SHORTCUT, true);
    37         putValue("help", ht("/Action/DownloadObject"));
     37        setHelpId(ht("/Action/DownloadObject"));
    3838    }
    3939
  • trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java

    r13559 r14397  
    3131                        tr("File: {0}", tr("Download parent ways/relations...")), KeyEvent.VK_D, Shortcut.ALT_CTRL),
    3232                true, "downloadreferrers", true);
    33         putValue("help", ht("/Action/DownloadParentWaysAndRelation"));
     33        setHelpId(ht("/Action/DownloadParentWaysAndRelation"));
    3434    }
    3535
  • trunk/src/org/openstreetmap/josm/actions/DuplicateAction.java

    r13434 r14397  
    2727                tr("Duplicate selection."),
    2828                Shortcut.registerShortcut("system:duplicate", tr("Edit: {0}", tr("Duplicate")), KeyEvent.VK_D, Shortcut.CTRL), true);
    29         putValue("help", ht("/Action/Duplicate"));
     29        setHelpId(ht("/Action/Duplicate"));
    3030    }
    3131
  • trunk/src/org/openstreetmap/josm/actions/ExitAction.java

    r12636 r14397  
    2323        super(tr("Exit"), "exit", tr("Exit the application."),
    2424                Shortcut.registerShortcut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, Shortcut.CTRL), true);
    25         putValue("help", ht("/Action/Exit"));
     25        setHelpId(ht("/Action/Exit"));
    2626    }
    2727
  • trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java

    r14153 r14397  
    4343              false /* register */
    4444        );
    45         putValue("help", ht("/Action/FullscreenView"));
     45        setHelpId(ht("/Action/FullscreenView"));
    4646        putValue("toolbar", "fullscreen");
    4747        MainApplication.getToolbar().register(this);
  • trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java

    r14153 r14397  
    3636        super(tr("Export to GPX..."), "exportgpx", tr("Export the data to GPX file."),
    3737                Shortcut.registerShortcut("file:exportgpx", tr("Export to GPX..."), KeyEvent.VK_E, Shortcut.CTRL));
    38         putValue("help", ht("/Action/GpxExport"));
     38        setHelpId(ht("/Action/GpxExport"));
    3939    }
    4040
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java

    r14153 r14397  
    3030                Shortcut.registerShortcut("core:historyinfo",
    3131                        tr("History"), KeyEvent.VK_H, Shortcut.CTRL), false);
    32         putValue("help", ht("/Action/ObjectHistory"));
     32        setHelpId(ht("/Action/ObjectHistory"));
    3333        putValue("toolbar", "action/historyinfo");
    3434        MainApplication.getToolbar().register(this);
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoWebAction.java

    r14119 r14397  
    2727                        tr("History (web)"), KeyEvent.VK_H, Shortcut.CTRL_SHIFT),
    2828                true, "action/historyinfoweb", true);
    29         putValue("help", ht("/Action/ObjectHistoryWeb"));
     29        setHelpId(ht("/Action/ObjectHistoryWeb"));
    3030    }
    3131
  • trunk/src/org/openstreetmap/josm/actions/InfoAction.java

    r13926 r14397  
    2929                tr("Advanced info"), KeyEvent.VK_I, Shortcut.CTRL),
    3030            true, "action/info", true);
    31         putValue("help", ht("/Action/InfoAboutElements"));
     31        setHelpId(ht("/Action/InfoAboutElements"));
    3232    }
    3333
  • trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java

    r14119 r14397  
    3131                        tr("Advanced info (web)"), KeyEvent.VK_I, Shortcut.CTRL_SHIFT),
    3232                true, "action/infoweb", true);
    33         putValue("help", ht("/Action/InfoAboutElementsWeb"));
     33        setHelpId(ht("/Action/InfoAboutElementsWeb"));
    3434    }
    3535
  • trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java

    r14134 r14397  
    6464                Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join Node to Way")),
    6565                        KeyEvent.VK_J, Shortcut.DIRECT), true);
    66         action.putValue("help", ht("/Action/JoinNodeWay"));
     66        action.setHelpId(ht("/Action/JoinNodeWay"));
    6767        return action;
    6868    }
     
    7878                Shortcut.registerShortcut("tools:movenodeontoway", tr("Tool: {0}", tr("Move Node onto Way")),
    7979                        KeyEvent.VK_N, Shortcut.DIRECT), true);
    80         action.putValue("help", ht("/Action/MoveNodeWay"));
     80        action.setHelpId(ht("/Action/MoveNodeWay"));
    8181        return action;
    8282    }
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r14291 r14397  
    269269            helpId = helpId.substring(0, helpId.length()-6);
    270270        }
     271        setHelpId(helpId);
     272    }
     273
     274    protected void setHelpId(String helpId) {
    271275        putValue("help", helpId);
    272276    }
  • trunk/src/org/openstreetmap/josm/actions/JumpToAction.java

    r14153 r14397  
    5151                Shortcut.registerShortcut("tools:jumpto", tr("Tool: {0}", tr("Jump to Position")),
    5252                        KeyEvent.VK_J, Shortcut.CTRL), true, "action/jumpto", true);
    53         putValue("help", ht("/Action/JumpToPosition"));
     53        setHelpId(ht("/Action/JumpToPosition"));
    5454    }
    5555
  • trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java

    r14153 r14397  
    8989                true
    9090        );
    91         putValue("help", ht("/Menu/Imagery"));
     91        setHelpId(ht("/Menu/Imagery"));
    9292
    9393        // Add default services
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r14338 r14397  
    4141            tr("Merge")), KeyEvent.VK_M, Shortcut.CTRL),
    4242            true, "action/mergelayer", true);
    43         putValue("help", ht("/Action/MergeLayer"));
     43        setHelpId(ht("/Action/MergeLayer"));
    4444    }
    4545
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r14153 r14397  
    6868        super(tr("Merge Nodes"), "mergenodes", tr("Merge nodes into the oldest one."),
    6969                Shortcut.registerShortcut("tools:mergenodes", tr("Tool: {0}", tr("Merge Nodes")), KeyEvent.VK_M, Shortcut.DIRECT), true);
    70         putValue("help", ht("/Action/MergeNodes"));
     70        setHelpId(ht("/Action/MergeNodes"));
    7171    }
    7272
  • trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java

    r13568 r14397  
    3535            true /* register */
    3636        );
    37         putValue("help", ht("/Action/MergeSelection"));
     37        setHelpId(ht("/Action/MergeSelection"));
    3838    }
    3939
  • trunk/src/org/openstreetmap/josm/actions/MirrorAction.java

    r14134 r14397  
    4040                Shortcut.registerShortcut("tools:mirror", tr("Tool: {0}", tr("Mirror")),
    4141                        KeyEvent.VK_M, Shortcut.SHIFT), true);
    42         putValue("help", ht("/Action/Mirror"));
     42        setHelpId(ht("/Action/Mirror"));
    4343    }
    4444
  • trunk/src/org/openstreetmap/josm/actions/MoveAction.java

    r14153 r14397  
    8787                calltosupermustbefirststatementinconstructor(dir), false);
    8888        myDirection = dir;
    89         putValue("help", ht("/Action/Move"));
     89        setHelpId(ht("/Action/Move"));
    9090        if (dir == Direction.UP) {
    9191            putValue("toolbar", "action/move/up");
  • trunk/src/org/openstreetmap/josm/actions/MoveNodeAction.java

    r14153 r14397  
    3030                null, /* no shortcut */
    3131                true);
    32         putValue("help", ht("/Action/MoveNode"));
     32        setHelpId(ht("/Action/MoveNode"));
    3333    }
    3434
  • trunk/src/org/openstreetmap/josm/actions/NewAction.java

    r12636 r14397  
    2424        super(tr("New Layer"), "new", tr("Create a new map layer."),
    2525                Shortcut.registerShortcut("system:new", tr("File: {0}", tr("New Layer")), KeyEvent.VK_N, Shortcut.CTRL), true);
    26         putValue("help", ht("/Action/NewLayer"));
     26        setHelpId(ht("/Action/NewLayer"));
    2727    }
    2828
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r14201 r14397  
    6868        super(tr("Open..."), "open", tr("Open a file."),
    6969                Shortcut.registerShortcut("system:open", tr("File: {0}", tr("Open...")), KeyEvent.VK_O, Shortcut.CTRL));
    70         putValue("help", ht("/Action/Open"));
     70        setHelpId(ht("/Action/Open"));
    7171    }
    7272
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r14153 r14397  
    8989                Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")),
    9090                        KeyEvent.VK_L, Shortcut.CTRL), true);
    91         putValue("help", ht("/Action/OpenLocation"));
     91        setHelpId(ht("/Action/OpenLocation"));
    9292        this.downloadTasks = new ArrayList<>();
    9393        addDownloadTaskClass(DownloadOsmTask.class);
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r14153 r14397  
    6565                        KeyEvent.VK_Q,
    6666                        Shortcut.DIRECT), true);
    67         putValue("help", ht("/Action/OrthogonalizeShape"));
     67        setHelpId(ht("/Action/OrthogonalizeShape"));
    6868    }
    6969
  • trunk/src/org/openstreetmap/josm/actions/PasteAction.java

    r12639 r14397  
    2323        super(tr("Paste"), "paste", tr("Paste contents of clipboard."),
    2424                Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.CTRL), true);
    25         putValue("help", ht("/Action/Paste"));
     25        setHelpId(ht("/Action/Paste"));
    2626        // CUA shortcut for paste (https://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)
    2727        MainApplication.registerActionShortcut(this,
  • trunk/src/org/openstreetmap/josm/actions/PasteAtSourcePositionAction.java

    r10766 r14397  
    2525                Shortcut.registerShortcut("menu:edit:pasteAtSource", tr("Edit: {0}", tr("Paste at source position")),
    2626                        KeyEvent.VK_V, Shortcut.ALT_CTRL), true, "pasteatsource");
    27         putValue("help", ht("/Action/Paste"));
     27        setHelpId(ht("/Action/Paste"));
    2828    }
    2929
  • trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java

    r13434 r14397  
    3434                Shortcut.registerShortcut("system:pastestyle", tr("Edit: {0}", tr("Paste Tags")),
    3535                KeyEvent.VK_V, Shortcut.CTRL_SHIFT), true);
    36         putValue("help", HELP);
     36        setHelpId(HELP);
    3737    }
    3838
  • trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java

    r14153 r14397  
    8989        super(tr("Preferences..."), "preference", tr("Open a preferences dialog for global settings."),
    9090                Shortcut.registerShortcut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, Shortcut.DIRECT), true);
    91         putValue("help", ht("/Action/Preferences"));
     91        setHelpId(ht("/Action/Preferences"));
    9292        this.tab = null;
    9393        this.subTab = null;
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r14153 r14397  
    7373                Shortcut.registerShortcut("system:purge", tr("Edit: {0}", tr("Purge")), KeyEvent.VK_P, Shortcut.CTRL_SHIFT),
    7474                true);
    75         putValue("help", HelpUtil.ht("/Action/Purge"));
     75        setHelpId(HelpUtil.ht("/Action/Purge"));
    7676    }
    7777
  • trunk/src/org/openstreetmap/josm/actions/RedoAction.java

    r14281 r14397  
    2828                Shortcut.registerShortcut("system:redo", tr("Edit: {0}", tr("Redo")), KeyEvent.VK_Y, Shortcut.CTRL), true);
    2929        setEnabled(false);
    30         putValue("help", ht("/Action/Redo"));
     30        setHelpId(ht("/Action/Redo"));
    3131    }
    3232
  • trunk/src/org/openstreetmap/josm/actions/RestartAction.java

    r14138 r14397  
    5050        super(tr("Restart"), "restart", tr("Restart the application."),
    5151                Shortcut.registerShortcut("file:restart", tr("File: {0}", tr("Restart")), KeyEvent.VK_J, Shortcut.ALT_CTRL_SHIFT), false);
    52         putValue("help", ht("/Action/Restart"));
     52        setHelpId(ht("/Action/Restart"));
    5353        putValue("toolbar", "action/restart");
    5454        if (MainApplication.getToolbar() != null) {
  • trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java

    r14256 r14397  
    107107        super(tr("Reverse Ways"), "wayflip", tr("Reverse the direction of all selected ways."),
    108108                Shortcut.registerShortcut("tools:reverse", tr("Tool: {0}", tr("Reverse Ways")), KeyEvent.VK_R, Shortcut.DIRECT), true);
    109         putValue("help", ht("/Action/ReverseWays"));
     109        setHelpId(ht("/Action/ReverseWays"));
    110110    }
    111111
  • trunk/src/org/openstreetmap/josm/actions/SaveAction.java

    r14153 r14397  
    2828        super(tr("Save"), "save", tr("Save the current data."),
    2929                Shortcut.registerShortcut("system:save", tr("File: {0}", tr("Save")), KeyEvent.VK_S, Shortcut.CTRL));
    30         putValue("help", ht("/Action/Save"));
     30        setHelpId(ht("/Action/Save"));
    3131    }
    3232
  • trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java

    r13329 r14397  
    2626            Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save As...")),
    2727            KeyEvent.VK_S, Shortcut.CTRL_SHIFT));
    28         putValue("help", ht("/Action/SaveAs"));
     28        setHelpId(ht("/Action/SaveAs"));
    2929    }
    3030
  • trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java

    r13938 r14397  
    2222        super(tr("Select All"), "selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
    2323                Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.CTRL), true);
    24         putValue("help", ht("/Action/SelectAll"));
     24        setHelpId(ht("/Action/SelectAll"));
    2525    }
    2626
  • trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java

    r14153 r14397  
    4949    public SessionLoadAction() {
    5050        super(tr("Load Session"), "open", tr("Load a session from file."), null, true, "load-session", true);
    51         putValue("help", ht("/Action/SessionLoad"));
     51        setHelpId(ht("/Action/SessionLoad"));
    5252    }
    5353
  • trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java

    r14153 r14397  
    7373        super(tr("Save Session As..."), "session", tr("Save the current session to a new file."),
    7474                null, toolbar, "save_as-session", installAdapters);
    75         putValue("help", ht("/Action/SessionSaveAs"));
     75        setHelpId(ht("/Action/SessionSaveAs"));
    7676        MainApplication.addMapFrameListener(this);
    7777    }
  • trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java

    r14153 r14397  
    6767                        tr("Show Status Report")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), false);
    6868
    69         putValue("help", ht("/Action/ShowStatusReport"));
     69        setHelpId(ht("/Action/ShowStatusReport"));
    7070        putValue("toolbar", "help/showstatusreport");
    7171        MainApplication.getToolbar().register(this);
  • trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java

    r14153 r14397  
    5050        super(tr("Simplify Way"), "simplify", tr("Delete unnecessary nodes from a way."),
    5151                Shortcut.registerShortcut("tools:simplify", tr("Tool: {0}", tr("Simplify Way")), KeyEvent.VK_Y, Shortcut.SHIFT), true);
    52         putValue("help", ht("/Action/SimplifyWay"));
     52        setHelpId(ht("/Action/SimplifyWay"));
    5353    }
    5454
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r14153 r14397  
    5555        super(tr("Split Way"), "splitway", tr("Split a way at the selected node."),
    5656                Shortcut.registerShortcut("tools:splitway", tr("Tool: {0}", tr("Split Way")), KeyEvent.VK_P, Shortcut.DIRECT), true);
    57         putValue("help", ht("/Action/SplitWay"));
     57        setHelpId(ht("/Action/SplitWay"));
    5858    }
    5959
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r14330 r14397  
    6464        super(tr("UnGlue Ways"), "unglueways", tr("Duplicate nodes that are used by multiple ways."),
    6565                Shortcut.registerShortcut("tools:unglue", tr("Tool: {0}", tr("UnGlue Ways")), KeyEvent.VK_G, Shortcut.DIRECT), true);
    66         putValue("help", ht("/Action/UnGlue"));
     66        setHelpId(ht("/Action/UnGlue"));
    6767    }
    6868
  • trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java

    r14134 r14397  
    3737                Shortcut.registerShortcut("tools:unjoinnodeway",
    3838                    tr("Tool: {0}", tr("Disconnect Node from Way")), KeyEvent.VK_J, Shortcut.ALT), true);
    39         putValue("help", ht("/Action/UnJoinNodeWay"));
     39        setHelpId(ht("/Action/UnJoinNodeWay"));
    4040    }
    4141
  • trunk/src/org/openstreetmap/josm/actions/UndoAction.java

    r14281 r14397  
    2828                Shortcut.registerShortcut("system:undo", tr("Edit: {0}", tr("Undo")), KeyEvent.VK_Z, Shortcut.CTRL), true);
    2929        setEnabled(false);
    30         putValue("help", ht("/Action/Undo"));
     30        setHelpId(ht("/Action/Undo"));
    3131    }
    3232
  • trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java

    r13926 r14397  
    2323            tr("Unselect All")), KeyEvent.VK_ESCAPE, Shortcut.DIRECT), true);
    2424
    25         putValue("help", ht("/Action/UnselectAll"));
     25        setHelpId(ht("/Action/UnselectAll"));
    2626    }
    2727
  • trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java

    r14121 r14397  
    3939                        KeyEvent.VK_U, Shortcut.CTRL),
    4040                true);
    41         putValue("help", ht("/Action/UpdateData"));
     41        setHelpId(ht("/Action/UpdateData"));
    4242    }
    4343
  • trunk/src/org/openstreetmap/josm/actions/UpdateModifiedAction.java

    r14214 r14397  
    3232                        Shortcut.ALT_CTRL),
    3333                        true, "updatemodified");
    34         putValue("help", ht("/Action/UpdateModified"));
     34        setHelpId(ht("/Action/UpdateModified"));
    3535    }
    3636
  • trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java

    r14214 r14397  
    9292                        Shortcut.ALT_CTRL),
    9393                true, "updateselection", true);
    94         putValue("help", ht("/Action/UpdateSelection"));
     94        setHelpId(ht("/Action/UpdateSelection"));
    9595    }
    9696
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r14390 r14397  
    142142        super(tr("Upload data..."), "upload", tr("Upload all changes in the active data layer to the OSM server"),
    143143                Shortcut.registerShortcut("file:upload", tr("File: {0}", tr("Upload data")), KeyEvent.VK_UP, Shortcut.CTRL_SHIFT), true);
    144         putValue("help", ht("/Action/Upload"));
     144        setHelpId(ht("/Action/Upload"));
    145145    }
    146146
  • trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java

    r14390 r14397  
    5252                // CHECKSTYLE.ON: LineLength
    5353                true);
    54         putValue("help", ht("/Action/UploadSelection"));
     54        setHelpId(ht("/Action/UploadSelection"));
    5555    }
    5656
  • trunk/src/org/openstreetmap/josm/actions/ViewportFollowToggleAction.java

    r12636 r14397  
    2828              true /* register shortcut */
    2929        );
    30         putValue("help", ht("/Action/ViewportFollowing"));
     30        setHelpId(ht("/Action/ViewportFollowing"));
    3131        setSelected(false);
    3232        notifySelectedState();
  • trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java

    r12639 r14397  
    2929                true
    3030        );
    31         putValue("help", ht("/Action/ZoomIn"));
     31        setHelpId(ht("/Action/ZoomIn"));
    3232        // On standard QWERTY, AZERTY and other common layouts the '+' key is obtained with Shift+EQUALS
    3333        MainApplication.registerActionShortcut(this,
  • trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java

    r12639 r14397  
    2323        super(tr("Zoom Out"), "dialogs/zoomout", tr("Zoom Out"),
    2424                Shortcut.registerShortcut("view:zoomout", tr("View: {0}", tr("Zoom Out")), KeyEvent.VK_MINUS, Shortcut.DIRECT), true);
    25         putValue("help", ht("/Action/ZoomOut"));
     25        setHelpId(ht("/Action/ZoomOut"));
    2626        // make numpad - behave like -
    2727        MainApplication.registerActionShortcut(this,
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioBackAction.java

    r12846 r14397  
    2828        super(trc("audio", "Back"), "audio-back", trc("audio", "Jump back."),
    2929        Shortcut.registerShortcut("audio:back", tr("Audio: {0}", trc("audio", "Back")), KeyEvent.VK_F6, Shortcut.DIRECT), true);
    30         this.putValue("help", ht("/Action/AudioBack"));
     30        setHelpId(ht("/Action/AudioBack"));
    3131    }
    3232
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFasterAction.java

    r6380 r14397  
    2323        super(trc("audio", "Faster"), "audio-faster", trc("audio", "Faster Forward"),
    2424        Shortcut.registerShortcut("audio:faster", tr("Audio: {0}", trc("audio", "Faster")), KeyEvent.VK_F9, Shortcut.DIRECT), true);
    25         this.putValue("help", ht("/Action/AudioFaster"));
     25        setHelpId(ht("/Action/AudioFaster"));
    2626    }
    2727}
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioSlowerAction.java

    r6380 r14397  
    2323        super(trc("audio", "Slower"), "audio-slower", trc("audio", "Slower Forward"),
    2424        Shortcut.registerShortcut("audio:slower", tr("Audio: {0}", trc("audio", "Slower")), KeyEvent.VK_F4, Shortcut.DIRECT), false);
    25         this.putValue("help", ht("/Action/AudioSlower"));
     25        setHelpId(ht("/Action/AudioSlower"));
    2626    }
    2727}
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r14273 r14397  
    14131413            super(tr("Angle snapping"), /* ICON() */ "anglesnap",
    14141414                    tr("Switch angle snapping mode while drawing"), null, false);
    1415             putValue("help", ht("/Action/Draw/AngleSnap"));
     1415            setHelpId(ht("/Action/Draw/AngleSnap"));
    14161416        }
    14171417
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r14134 r14397  
    199199            super(tr("Dual alignment"), /* ICON() */ "mapmode/extrude/dualalign",
    200200                    tr("Switch dual alignment mode while extruding"), null, false);
    201             putValue("help", ht("/Action/Extrude#DualAlign"));
     201            setHelpId(ht("/Action/Extrude#DualAlign"));
    202202        }
    203203
     
    222222                Shortcut.registerShortcut("mapmode:extrude", tr("Mode: {0}", tr("Extrude")), KeyEvent.VK_X, Shortcut.DIRECT),
    223223                ImageProvider.getCursor("normal", "rectangle"));
    224         putValue("help", ht("/Action/Extrude"));
     224        setHelpId(ht("/Action/Extrude"));
    225225        cursorCreateNew = ImageProvider.getCursor("normal", "rectangle_plus");
    226226        cursorTranslate = ImageProvider.getCursor("normal", "rectangle_move");
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r13434 r14397  
    155155                tr("Parallel")), KeyEvent.VK_P, Shortcut.SHIFT),
    156156            ImageProvider.getCursor("normal", "parallel"));
    157         putValue("help", ht("/Action/Parallel"));
     157        setHelpId(ht("/Action/Parallel"));
    158158        mv = mapFrame.mapView;
    159159    }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r14343 r14397  
    197197                ImageProvider.getCursor("normal", "selection"));
    198198        mv = mapFrame.mapView;
    199         putValue("help", ht("/Action/Select"));
     199        setHelpId(ht("/Action/Select"));
    200200        selectionManager = new SelectionManager(this, false, mv);
    201201    }
  • trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java

    r14214 r14397  
    6060            && ds != null && !ds.isLocked() && DownloadPolicy.BLOCKED != ds.getDownloadPolicy();
    6161    }
     62   
     63    protected void setHelpId(String helpId) {
     64        putValue("help", helpId);
     65    }
    6266}
  • trunk/src/org/openstreetmap/josm/actions/relation/DownloadMembersAction.java

    r13957 r14397  
    2929        putValue(NAME, tr("Download members"));
    3030        new ImageProvider("dialogs", "downloadincomplete").getResource().attachImageIcon(this, true);
    31         putValue("help", ht("/Dialog/RelationList#DownloadMembers"));
     31        setHelpId(ht("/Dialog/RelationList#DownloadMembers"));
    3232    }
    3333
  • trunk/src/org/openstreetmap/josm/actions/relation/ExportRelationToGpxAction.java

    r13957 r14397  
    8080        super(name(mode), mode.contains(TO_FILE) ? "exportgpx" : "dialogs/layerlist", tooltip(mode),
    8181                null, false, null, false);
    82         putValue("help", ht("/Action/ExportRelationToGpx"));
     82        setHelpId(ht("/Action/ExportRelationToGpx"));
    8383        this.mode = mode;
    8484    }
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r14153 r14397  
    172172        super(tr("Search..."), "dialogs/search", tr("Search for objects"),
    173173                Shortcut.registerShortcut("system:find", tr("Search..."), KeyEvent.VK_F, Shortcut.CTRL), true);
    174         putValue("help", ht("/Action/Search"));
     174        setHelpId(ht("/Action/Search"));
    175175    }
    176176
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java

    r14121 r14397  
    178178    }
    179179
     180    @Override
     181    public String helpTopic() {
     182        return HelpUtil.ht("/Dialog/ChangesetList");
     183    }
     184
    180185    protected void build() {
    181186        JPanel pnl = new JPanel(new BorderLayout());
     
    185190
    186191        cbInSelectionOnly.addItemListener(new FilterChangeHandler());
    187 
    188         HelpUtil.setHelpContext(pnl, HelpUtil.ht("/Dialog/ChangesetList"));
    189192
    190193        // -- select objects action
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r14153 r14397  
    241241        setMinimumSize(new Dimension(0, 0));
    242242        this.preferredHeight = preferredHeight;
    243         toggleAction = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortcut);
    244         String helpId = "Dialog/"+getClass().getName().substring(getClass().getName().lastIndexOf('.')+1);
    245         toggleAction.putValue("help", helpId.substring(0, helpId.length()-6));
     243        toggleAction = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortcut, helpTopic());
    246244
    247245        isShowing = Config.getPref().getBoolean(preferencePrefix+".visible", defShow);
     
    284282    public final class ToggleDialogAction extends JosmAction {
    285283
    286         private ToggleDialogAction(String name, String iconName, String tooltip, Shortcut shortcut) {
     284        private ToggleDialogAction(String name, String iconName, String tooltip, Shortcut shortcut, String helpId) {
    287285            super(name, iconName, tooltip, shortcut, false, false);
     286            setHelpId(helpId);
    288287        }
    289288
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r14153 r14397  
    249249                        Shortcut.ALT_SHIFT), 150, true);
    250250
    251         HelpUtil.setHelpContext(this, HelpUtil.ht("/Dialog/TagsMembership"));
    252 
    253251        setupTagsMenu();
    254252        buildTagsTable();
     
    299297
    300298        Config.getPref().addKeyPreferenceChangeListener("display.discardable-keys", preferenceListener);
     299    }
     300
     301    @Override
     302    public String helpTopic() {
     303        return HelpUtil.ht("/Dialog/TagsMembership");
    301304    }
    302305
Note: See TracChangeset for help on using the changeset viewer.