Changeset 15507 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2019-11-04T22:12:14+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io/remotecontrol
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/PermissionPrefWithDefault.java
r15500 r15507 76 76 */ 77 77 public static List<PermissionPrefWithDefault> getPermissionPrefs() { 78 if (PREFS.isEmpty()) 79 RequestProcessor.initialize(); 78 80 return Collections.unmodifiableList(PREFS); 79 81 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r15500 r15507 74 74 private static Map<String, Class<? extends RequestHandler>> handlers = new TreeMap<>(); 75 75 76 static { 77 initialize(); 78 } 79 76 80 /** 77 81 * Constructor … … 138 142 139 143 /** 140 * Add default request handlers and permission preferences (order is important) 141 */ 142 static { 143 addRequestHandlerClass(LoadAndZoomHandler.command, LoadAndZoomHandler.class, true); 144 addRequestHandlerClass(LoadAndZoomHandler.command2, LoadAndZoomHandler.class, true); 145 addRequestHandlerClass(LoadObjectHandler.command, LoadObjectHandler.class, true); 146 addRequestHandlerClass(LoadDataHandler.command, LoadDataHandler.class, true); 147 addRequestHandlerClass(ImportHandler.command, ImportHandler.class, true); 148 addRequestHandlerClass(OpenFileHandler.command, OpenFileHandler.class, true); 149 addRequestHandlerClass(ImageryHandler.command, ImageryHandler.class, true); 150 PermissionPrefWithDefault.addPermissionPref(PermissionPrefWithDefault.CHANGE_SELECTION); 151 PermissionPrefWithDefault.addPermissionPref(PermissionPrefWithDefault.CHANGE_VIEWPORT); 152 addRequestHandlerClass(AddNodeHandler.command, AddNodeHandler.class, true); 153 addRequestHandlerClass(AddWayHandler.command, AddWayHandler.class, true); 154 addRequestHandlerClass(VersionHandler.command, VersionHandler.class, true); 155 addRequestHandlerClass(FeaturesHandler.command, FeaturesHandler.class, true); 144 * Force the class to initialize and load the handlers 145 */ 146 public static void initialize() { 147 if (handlers.isEmpty()) { 148 addRequestHandlerClass(LoadAndZoomHandler.command, LoadAndZoomHandler.class, true); 149 addRequestHandlerClass(LoadAndZoomHandler.command2, LoadAndZoomHandler.class, true); 150 addRequestHandlerClass(LoadObjectHandler.command, LoadObjectHandler.class, true); 151 addRequestHandlerClass(LoadDataHandler.command, LoadDataHandler.class, true); 152 addRequestHandlerClass(ImportHandler.command, ImportHandler.class, true); 153 addRequestHandlerClass(OpenFileHandler.command, OpenFileHandler.class, true); 154 addRequestHandlerClass(ImageryHandler.command, ImageryHandler.class, true); 155 PermissionPrefWithDefault.addPermissionPref(PermissionPrefWithDefault.CHANGE_SELECTION); 156 PermissionPrefWithDefault.addPermissionPref(PermissionPrefWithDefault.CHANGE_VIEWPORT); 157 addRequestHandlerClass(AddNodeHandler.command, AddNodeHandler.class, true); 158 addRequestHandlerClass(AddWayHandler.command, AddWayHandler.class, true); 159 addRequestHandlerClass(VersionHandler.command, VersionHandler.class, true); 160 addRequestHandlerClass(FeaturesHandler.command, FeaturesHandler.class, true); 161 } 156 162 } 157 163
Note:
See TracChangeset
for help on using the changeset viewer.