修复部分操作系统token无法复制问题

This commit is contained in:
makejava 2019-10-25 12:55:41 +08:00
parent 24816ae58b
commit 42de42f222
2 changed files with 7 additions and 2 deletions

View File

@ -136,7 +136,6 @@ public abstract class AbstractTableGroupPanel<T extends AbstractGroup<E>, E> {
//初始化列
columnConfigInfo = initColumn();
tableModel = new DefaultTableModel();
table.setModel(tableModel);
for (ColumnConfig column : columnConfigInfo) {
tableModel.addColumn(column.getTitle());
}

View File

@ -228,8 +228,14 @@ public class MainSetting implements Configurable, Configurable.Composite {
// 关闭并退出
dialogWrapper.close(DialogWrapper.OK_EXIT_CODE);
if (result != null) {
// 提取token
String token = "error";
if (result.contains("token")) {
int startLocation = result.indexOf("token") + 6;
token = result.substring(startLocation, result.indexOf("", startLocation));
}
// 显示token
Messages.showInfoMessage(result, MsgValue.TITLE_INFO);
Messages.showInputDialog(project, result, MsgValue.TITLE_INFO, AllIcons.General.InformationDialog, token, new NonEmptyInputValidator());
}
}
});