Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 374121 | Differences between
and this patch

Collapse All | Expand All

(-)a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/StandardTrim.java (+8 lines)
Lines 20-25 import org.eclipse.e4.ui.workbench.modeling.EModelService; Link Here
20
import org.eclipse.jface.action.StatusLineManager;
20
import org.eclipse.jface.action.StatusLineManager;
21
import org.eclipse.swt.widgets.Composite;
21
import org.eclipse.swt.widgets.Composite;
22
import org.eclipse.ui.IWorkbenchWindow;
22
import org.eclipse.ui.IWorkbenchWindow;
23
import org.eclipse.ui.PlatformUI;
23
import org.eclipse.ui.internal.progress.ProgressRegion;
24
import org.eclipse.ui.internal.progress.ProgressRegion;
24
import org.eclipse.ui.internal.util.PrefUtil;
25
import org.eclipse.ui.internal.util.PrefUtil;
25
26
Lines 79-84 public class StandardTrim { Link Here
79
		IEclipseContext context = modelService.getContainingContext(toolControl);
80
		IEclipseContext context = modelService.getContainingContext(toolControl);
80
		WorkbenchWindow wbw = (WorkbenchWindow) context.get(IWorkbenchWindow.class);
81
		WorkbenchWindow wbw = (WorkbenchWindow) context.get(IWorkbenchWindow.class);
81
		// wbw may be null if workspace is started with no open perspectives.
82
		// wbw may be null if workspace is started with no open perspectives.
83
		if (wbw == null) {
84
			// Create one assuming there's no defined perspective
85
			Workbench wb = (Workbench) PlatformUI.getWorkbench();
86
			wb.createWorkbenchWindow(wb.getDefaultPageInput(), null,
87
					modelService.getTopLevelWindowFor(toolControl), false);
88
			wbw = (WorkbenchWindow) context.get(IWorkbenchWindow.class);
89
		}
82
		if (wbw != null) {
90
		if (wbw != null) {
83
			manager = wbw.getStatusLineManager();
91
			manager = wbw.getStatusLineManager();
84
			manager.createControl(parent);
92
			manager.createControl(parent);

Return to bug 374121