use of org.eclipse.debug.ui.IDebugView in project webtools.servertools by eclipse.
the class ShowInDebugAction method selectProcess.
protected void selectProcess(IProcess process) {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page != null) {
IWorkbenchPart part = page.findView(IDebugUIConstants.ID_DEBUG_VIEW);
if (part == null) {
try {
part = page.showView(IDebugUIConstants.ID_DEBUG_VIEW);
} catch (PartInitException e) {
if (Trace.SEVERE) {
Trace.trace(Trace.STRING_SEVERE, "Could not open debug view");
}
}
}
if (part != null) {
IDebugView view = (IDebugView) part.getAdapter(IDebugView.class);
if (view != null) {
page.activate(part);
view.setFocus();
Viewer viewer = view.getViewer();
if (viewer != null) {
viewer.setSelection(new StructuredSelection(process));
}
}
}
}
}
}
Aggregations