void () { if (myInplaceComponent == null || myInsideChange) { // nothing to finish return; } myInsideChange = true; try{ // 1. Apply new value to the component LOG.assertTrue(myInplaceEditor != null); if (!myEditor.isUndoRedoInProgress()) { CommandProcessor.getInstance().executeCommand( myInplaceComponent.getProject(), () -> { try { final Object value = myInplaceEditor.getValue(); myInplaceProperty.setValue(myInplaceComponent, value); } catch (Exception ignored) { } myEditor.refreshAndSave(true); }, UIDesignerBundle.message("command.set.property.value"), null); } // 2. Remove editor from the layer if (myInplaceEditorComponent != null) { // reenterability guard removeInplaceEditorComponent(); myFocusWatcher.deinstall(myInplaceEditorComponent); } myInplaceEditor.removePropertyEditorListener(myPropertyEditorListener); myInplaceComponent = null; myInplaceEditorComponent = null; myInplaceComponent = null; // 3. Let AWT work disableEvents(MouseEvent.MOUSE_EVENT_MASK); }finally{ myInsideChange = false; } repaint(); }