public void updateElement(int index) { if (range == null) return; /* //System.out.println(index); int addr = index * chunkSize; DecodedRow row = (DecodedRow) tableViewer.getElementAt(index); if (row == null) { Pair<Object, Integer> info = decoderProvider.decode(addr,chunkSize); row = new DecodedRow(addr, range, info.first, info.second); } */ DecodedRow row = (DecodedRow) tableViewer.getElementAt(index); if (row != null) { IDecodedContent content = row.getContent(); if (changes.isTouched(content.getAddr(), content.getSize())) { row = null; } } if (row == null) { IDecodedContent content = decoderProvider.decodeItem(index + firstIndex); byte[] bytes = new byte[content.getSize()]; for (int i = 0; i < bytes.length; i++) bytes[i] = range.getEntry().flatReadByte(content.getAddr() + i); row = new DecodedRow(content, bytes); } tableViewer.replace(row, index); }
/** * @param menu * @param row */ public void fillMenu(Menu menu, DecodedRow row) { decoderProvider.fillMenu(menu, row.getContent()); }