void (@NotNull DataContext dataContext) { String content = CopyPasteManager.getInstance().getContents(DataFlavor.stringFlavor); if (StringUtil.isEmpty(content)) { return; } Map<String, String> map = parseEnvsFromText(content); TableView<EnvironmentVariable> view = getTableView(); if ((view.isEditing() || map.isEmpty())) { int row = view.getEditingRow(); int column = view.getEditingColumn(); if (row < 0 || column < 0) { row = view.getSelectedRow(); column = view.getSelectedColumn(); } if (row >= 0 && column >= 0) { TableCellEditor editor = view.getCellEditor(); if (editor != null) { Component component = ((DefaultCellEditor)editor).getComponent(); if (component instanceof JTextField) { ((JTextField)component).paste(); } } } return; } stopEditing(); List<EnvironmentVariable> parsed = new ArrayList<>(); for (Map.Entry<String, String> entry : map.entrySet()) { parsed.add(new EnvironmentVariable(entry.getKey(), entry.getValue(), false)); } List<EnvironmentVariable> variables = new ArrayList<>(getEnvironmentVariables()); variables.addAll(parsed); variables = ContainerUtil.filter(variables, variable -> !StringUtil.isEmpty(variable.getName()) || !StringUtil.isEmpty(variable.getValue())); setValues(variables); }