Search in sources :

Example 1 with History

use of de.janrufmonitor.ui.jface.application.history.History in project janrufmonitor by tbrandt77.

the class HistoryAction method run.

public void run() {
    Viewer v = this.m_app.getApplication().getViewer();
    if (v != null) {
        IStructuredSelection selection = (IStructuredSelection) v.getSelection();
        if (!selection.isEmpty()) {
            Object o = selection.getFirstElement();
            if (o instanceof ICall) {
                o = ((ICall) o).getCaller();
            }
            if (o instanceof ICaller) {
                History h = new History(((ICaller) o));
                h.open();
            }
        }
    }
}
Also used : ICaller(de.janrufmonitor.framework.ICaller) ICall(de.janrufmonitor.framework.ICall) Viewer(org.eclipse.jface.viewers.Viewer) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) History(de.janrufmonitor.ui.jface.application.history.History)

Aggregations

ICall (de.janrufmonitor.framework.ICall)1 ICaller (de.janrufmonitor.framework.ICaller)1 History (de.janrufmonitor.ui.jface.application.history.History)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 Viewer (org.eclipse.jface.viewers.Viewer)1