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);
}
}
Aggregations