private void finishEditing(boolean commit) {
    myDesigner.getSurfaceArea().removeSelectionListener(mySelectionListener);

    if (myInplaceComponent != null) {
      if (commit) {
        myDesigner.getToolProvider().execute(() -> {
          int size = myProperties.size();

          for (int i = 0; i < size; i++) {
            Property property = myProperties.get(i);
            Object oldValue = property.getValue(myRadComponent);
            Object newValue = myEditors.get(i).getValue();

            if (!Comparing.equal(oldValue, newValue)) {
              property.setValue(myRadComponent, newValue);
            }
          }
        }, DesignerBundle.message("command.set.property.value"), true);
      }

      for (PropertyEditor editor : myEditors) {
        editor.removePropertyEditorListener(myEditorListener);
      }

      removeInplaceComponent();
      myFocusWatcher.deinstall(myInplaceComponent);
      myInplaceComponent = null;
    }

    myRadComponent = null;
    myProperties = null;
    myEditors = null;

    myDesigner.getPreferredFocusedComponent().requestFocusInWindow();

    disableEvents(AWTEvent.MOUSE_EVENT_MASK);
    repaint();
  }
private void finishEditing(boolean commit)