Changeset 1814 in josm for trunk/src/org/openstreetmap/josm/actions/JosmAction.java
- Timestamp:
- 2009-07-19T19:04:49+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r1415 r1814 9 9 import org.openstreetmap.josm.Main; 10 10 import org.openstreetmap.josm.data.osm.DataSet; 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 11 12 import org.openstreetmap.josm.tools.Destroyable; 12 13 import org.openstreetmap.josm.tools.ImageProvider; … … 61 62 putValue(SHORT_DESCRIPTION, Main.platform.makeTooltip(tooltip, sc)); 62 63 putValue("toolbar", iconName); 63 if (register) 64 if (register) { 64 65 Main.toolbar.register(this); 66 } 65 67 } 66 68 … … 92 94 private void setHelpId() { 93 95 String helpId = "Action/"+getClass().getName().substring(getClass().getName().lastIndexOf('.')+1); 94 if (helpId.endsWith("Action")) 96 if (helpId.endsWith("Action")) { 95 97 helpId = helpId.substring(0, helpId.length()-6); 98 } 96 99 putValue("help", helpId); 97 100 } 101 102 /** 103 * Replies the current edit layer 104 * 105 * @return the current edit layer. null, if no edit layer exists 106 */ 107 protected OsmDataLayer getEditLayer() { 108 return Main.main.getEditLayer(); 109 } 110 111 /** 112 * Replies the current dataset 113 * 114 * @return the current dataset. null, if no current dataset exists 115 */ 116 protected DataSet getCurrentDataSet() { 117 return Main.main.getCurrentDataSet(); 118 } 98 119 }
Note:
See TracChangeset
for help on using the changeset viewer.