Skip to content

Commit 869b57c

Browse files
committed
feat: optimizing performance
1 parent 27eb6a5 commit 869b57c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/nvs/dialog/NvsCsvEditorPage.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
import org.eclipse.jface.dialogs.MessageDialog;
2626
import org.eclipse.jface.fieldassist.ControlDecoration;
2727
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
28+
import org.eclipse.jface.viewers.ArrayContentProvider;
2829
import org.eclipse.jface.viewers.CellEditor;
2930
import org.eclipse.jface.viewers.ComboBoxCellEditor;
3031
import org.eclipse.jface.viewers.ICellModifier;
31-
import org.eclipse.jface.viewers.IStructuredContentProvider;
3232
import org.eclipse.jface.viewers.TableViewer;
3333
import org.eclipse.jface.viewers.TextCellEditor;
3434
import org.eclipse.jface.viewers.ViewerCell;
@@ -467,12 +467,7 @@ private void createSizeOfPartitionLable(Composite parent)
467467
private void createTableViewer()
468468
{
469469
tableViewer = new TableViewer(csvTable);
470-
tableViewer.setContentProvider((IStructuredContentProvider) input -> {
471-
@SuppressWarnings("unchecked")
472-
List<NvsTableBean> list = (List<NvsTableBean>) input;
473-
return list.toArray();
474-
});
475-
470+
tableViewer.setContentProvider(ArrayContentProvider.getInstance());
476471
try
477472
{
478473
List<NvsTableBean> list = new NvsTableDataService().parseCsv(Paths.get(csvFile.getLocationURI()));

0 commit comments

Comments
 (0)