package org.mwc.debrief.dis.listeners.impl;

import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;

import MWC.GUI.Layers;

public class DISContext
{
  Layers _myLayers = null;

  public Layers getLayers()
  {
    if (_myLayers == null)
    {

      Display.getDefault().syncExec(new Runnable()
      {
        @Override
        public void run()
        {
          IWorkbenchWindow iw =
              PlatformUI.getWorkbench().getActiveWorkbenchWindow();
          IWorkbenchPage activePage = iw.getActivePage();
          IEditorPart editor = activePage.getActiveEditor();
          _myLayers = (Layers) editor.getAdapter(Layers.class);
        }
      });

    }
    return _myLayers;
  }

}

@@ -250,16 +250,25 @@
 ayers;%0A%0A
+abstract 
 public c
@@ -313,16 +313,143 @@
  null;%0A%0A
+  /** whether a UI should update on each new data item%0A   * %0A   * @return%0A   */%0A  abstract public boolean getLiveUpdates();%0A  %0A
   public

add support for live updates