List of usage examples for com.intellij.openapi.ui SelectFromListDialog.ToStringAspect SelectFromListDialog.ToStringAspect
SelectFromListDialog.ToStringAspect
From source file:com.microsoft.intellij.ui.azureroles.DebugConfigurationDialog.java
License:Open Source License
private ActionListener createProjTextListener() { return new ActionListener() { @Override/* w ww . j a va2 s. c om*/ public void actionPerformed(ActionEvent e) { SelectFromListDialog dialog = new SelectFromListDialog(project, ModuleManager.getInstance(project).getModules(), new SelectFromListDialog.ToStringAspect() { @Override public String getToStirng(Object obj) { return ((Module) obj).getName(); } }, message("dbgProjSelTitle"), ListSelectionModel.SINGLE_SELECTION); dialog.show(); if (dialog.getSelection() != null && dialog.getSelection().length > 0) projText.setText(((Module) dialog.getSelection()[0]).getName()); } }; }