コード例 #1
0
    public AwtPopupWrapper(Popup popup) {
      myPopup = popup;

      if (SystemInfo.isMac && UIUtil.isUnderAquaLookAndFeel()) {
        final Component c =
            (Component) ReflectionUtil.getField(Popup.class, myPopup, Component.class, "component");
        c.setBackground(UIUtil.getPanelBackground());
      }
    }
コード例 #2
0
  public void dispose() {
    try {
      myVirtualMachine.dispose();
    } catch (UnsupportedOperationException e) {
      LOG.info(e);
    }

    // Memory leak workaround, see IDEA-163334
    TargetVM target =
        ReflectionUtil.getField(
            myVirtualMachine.getClass(), myVirtualMachine, TargetVM.class, "target");
    if (target != null) {
      Thread controller =
          ReflectionUtil.getField(target.getClass(), target, Thread.class, "eventController");
      if (controller != null) {
        controller.stop();
      }
    }
  }
コード例 #3
0
 static {
   Class<?> aClass = null;
   Set<String> files = null;
   try {
     aClass = Class.forName("java.io.DeleteOnExitHook");
     files = ReflectionUtil.getField(aClass, null, Set.class, "files");
   } catch (Exception ignored) {
   }
   DELETE_ON_EXIT_HOOK_CLASS = aClass;
   DELETE_ON_EXIT_HOOK_DOT_FILES = files;
 }
コード例 #4
0
 public Window getWindow() {
   final Component c =
       (Component) ReflectionUtil.getField(Popup.class, myPopup, Component.class, "component");
   return c instanceof JWindow ? (JWindow) c : null;
 }