private @Nullable ComponentItem getComponentToInsert() {
    return (myComponentToInsert != null)
           ? myComponentToInsert
           : PaletteToolWindowManager.getInstance(myEditor).getActiveItem(ComponentItem.class);
  }
private @Nullable ComponentItem getComponentToInsert()