Changeset 7022 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2014-04-29T02:07:27+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r7012 r7022 39 39 Object Ocom_apple_eawt_Application = Ccom_apple_eawt_Application.getConstructor((Class[])null).newInstance((Object[])null); 40 40 Class<?> Ccom_apple_eawt_ApplicationListener = Class.forName("com.apple.eawt.ApplicationListener"); 41 Method MaddApplicationListener = Ccom_apple_eawt_Application.getDeclaredMethod("addApplicationListener", new Class [] { Ccom_apple_eawt_ApplicationListener });42 Object Oproxy = Proxy.newProxyInstance(PlatformHookOsx.class.getClassLoader(), new Class [] { Ccom_apple_eawt_ApplicationListener }, ivhandler);41 Method MaddApplicationListener = Ccom_apple_eawt_Application.getDeclaredMethod("addApplicationListener", new Class<?>[] { Ccom_apple_eawt_ApplicationListener }); 42 Object Oproxy = Proxy.newProxyInstance(PlatformHookOsx.class.getClassLoader(), new Class<?>[] { Ccom_apple_eawt_ApplicationListener }, ivhandler); 43 43 MaddApplicationListener.invoke(Ocom_apple_eawt_Application, new Object[] { Oproxy }); 44 Method MsetEnabledPreferencesMenu = Ccom_apple_eawt_Application.getDeclaredMethod("setEnabledPreferencesMenu", new Class [] { boolean.class });44 Method MsetEnabledPreferencesMenu = Ccom_apple_eawt_Application.getDeclaredMethod("setEnabledPreferencesMenu", new Class<?>[] { boolean.class }); 45 45 MsetEnabledPreferencesMenu.invoke(Ocom_apple_eawt_Application, new Object[] { Boolean.TRUE }); 46 46 } catch (Exception ex) { … … 68 68 if (args[0] != null) { 69 69 try { 70 args[0].getClass().getDeclaredMethod("setHandled", new Class [] { boolean.class }).invoke(args[0], new Object[] { handled });70 args[0].getClass().getDeclaredMethod("setHandled", new Class<?>[] { boolean.class }).invoke(args[0], new Object[] { handled }); 71 71 } catch (Exception ex) { 72 72 Main.warn("Failed to report handled event: " + ex);
Note: See TracChangeset
for help on using the changeset viewer.