X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmi%2FInstructionTable.java;h=6ffc93e28abadf3348ad840271542385a041d264;hb=327ae273a10d9adc305cf4045322c6107dd70fb4;hp=7b17f2404d2f05cd697896de09583cedd28651c3;hpb=a4ef021616f9bf3b6a7778c7b5b6a22d5a7d1c20;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionTable.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionTable.java index 7b17f240..6ffc93e2 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionTable.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionTable.java @@ -38,19 +38,20 @@ public class InstructionTable private MicroInstructionMemory memory; private InstructionTableContentProvider provider; private final RowHighlighter highlighter; - private final ColorProvider cProv; + private final FontAndColorHelper cProv; public InstructionTable(Composite parent, DisplaySettings displaySettings, IThemeManager themeManager) { viewer = new LazyTableViewer(parent, SWT.FULL_SELECTION | SWT.BORDER | SWT.VIRTUAL); this.displaySettings = displaySettings; - this.cProv = new ColorProvider(viewer, themeManager); + this.cProv = new FontAndColorHelper(viewer, themeManager); this.highlighter = new RowHighlighter(viewer, cProv); Table table = viewer.getTable(); table.setHeaderVisible(true); table.setLinesVisible(true); viewer.setUseHashlookup(true); + table.addDisposeListener(e -> dispose()); TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(viewer, new FocusCellOwnerDrawHighlighter(viewer)); @@ -257,7 +258,7 @@ public class InstructionTable Display.getDefault().asyncExec(() -> viewer.refresh()); } - public void dispose() + private void dispose() { cProv.dispose(); viewer.getTable().dispose();