Search in sources :

Example 1 with INavigationHistory

use of org.eclipse.ui.INavigationHistory in project webtools.sourceediting by eclipse.

the class DesignViewGraphicalViewer method setInputAndMarkLocation.

public void setInputAndMarkLocation(IADTObject object) {
    IADTObject oldInput = getInput();
    INavigationHistory navigationHistory = null;
    IWorkbench workbench = PlatformUI.getWorkbench();
    if (workbench != null) {
        IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
        if (activeWorkbenchWindow != null) {
            IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
            if (activePage != null) {
                navigationHistory = activePage.getNavigationHistory();
            }
        }
    }
    setInput(object);
    if (editorPart != null && oldInput != object) {
        navigationHistory.markLocation(editorPart);
    }
}
Also used : IWorkbench(org.eclipse.ui.IWorkbench) IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) IADTObject(org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) INavigationHistory(org.eclipse.ui.INavigationHistory)

Aggregations

INavigationHistory (org.eclipse.ui.INavigationHistory)1 IWorkbench (org.eclipse.ui.IWorkbench)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1 IADTObject (org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject)1