void (final ActionEvent e) { // 1. Show editor dialog final GuiEditor guiEditor = DesignerToolWindowManager.getInstance(myProject).getActiveFormEditor(); LOG.assertTrue(guiEditor != null); final StringEditorDialog dialog = new StringEditorDialog( myTfWithButton.getTextField(), getValue(), // we have pass here "live" (modified) value guiEditor.getStringDescriptorLocale(), guiEditor ); CommandProcessor.getInstance().executeCommand( myProject, () -> { if (!guiEditor.ensureEditable()) { return; } if (!dialog.showAndGet()) { return; } // 2. Apply new value final StringDescriptor descriptor = dialog.getDescriptor(); if (descriptor == null) { return; } setValue(descriptor); fireValueCommitted(true, false); if (myProperty != null) { myProperty.refreshValue(myComponent); } guiEditor.refreshAndSave(false); }, UIDesignerBundle.message("command.edit.string.property"), null); }