void (ComponentItem item, final ComponentDropLocation location) { myEditor.getActiveDecorationLayer().removeFeedback(); myEditor.setDesignTimeInsets(2); item = replaceAnyComponentItem(myEditor, item, UIDesignerBundle.message("palette.non.palette.component.title")); if (item == null) { return; } if (!validateNestedFormInsert(item)) { return; } if (!checkAddDependencyOnInsert(item)) { return; } if (!myEditor.ensureEditable()) { return; } final boolean forceBinding = item.isAutoCreateBinding(); myInsertedComponent = createInsertedComponent(myEditor, item); setCursor(Cursor.getDefaultCursor()); if (myInsertedComponent == null) { if (!mySticky) { PaletteToolWindowManager.getInstance(myEditor).clearActiveItem(); } return; } final ComponentItemDragObject dragObject = new ComponentItemDragObject(item); if (location.canDrop(dragObject)) { CommandProcessor.getInstance().executeCommand( myEditor.getProject(), () -> { createBindingWhenDrop(myEditor, myInsertedComponent, forceBinding); final RadComponent[] components = new RadComponent[]{myInsertedComponent}; location.processDrop(myEditor, components, null, dragObject); FormEditingUtil.selectSingleComponent(myEditor, myInsertedComponent); if (location.getContainer() != null && location.getContainer().isXY()) { Dimension newSize = myInsertedComponent.getPreferredSize(); Util.adjustSize(myInsertedComponent.getDelegee(), myInsertedComponent.getConstraints(), newSize); myInsertedComponent.setSize(newSize); } if (myInsertedComponent.getParent() instanceof RadRootContainer && myInsertedComponent instanceof RadAtomicComponent) { GridBuildUtil.convertToGrid(myEditor); FormEditingUtil.selectSingleComponent(myEditor, myInsertedComponent); } checkBindTopLevelPanel(); if (!mySticky) { PaletteToolWindowManager.getInstance(myEditor).clearActiveItem(); } myEditor.refreshAndSave(false); }, UIDesignerBundle.message("command.insert.component"), null); } myComponentToInsert = null; }