public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
    this.tableViewer = (TableViewer) viewer;
    if (changes != null) {
      changes.removeMemoryListener();
      //			range.getEntry().getDomain().removeWriteListener(this);
      decoderProvider.reset();
    }

    range = (MemoryRange) newInput;
    changes = null;
    if (range != null) {
      changes = new MemoryRangeChanges(range);
      changes.attachMemoryListener();
      //			range.getEntry().getDomain().addWriteListener(this);

      decoderProvider.addRange(range.getAddress(), range.getSize());

      // clear
      tableViewer.setItemCount(0);
      tableViewer.refresh();

      updateRange();

    } else {
      decoderProvider.reset();
      tableViewer.setItemCount(0);
      tableViewer.refresh(true);
    }
  }
  public void refresh() {
    changes.fetchChanges();
    if (changes.isTouched(range.getAddress(), range.getSize())) {

      decoderProvider.updateRange(changes.getChangeSet());

      updateRange();
    }
  }
 private synchronized void updateRange() {
   firstIndex = decoderProvider.getFirstItemIndex(range.getAddress());
   tableViewer.setItemCount(decoderProvider.getItemCount(range.getAddress(), range.getSize()));
   tableViewer.refresh();
 }