Bug 331062 NPE with EModelService's getElementLocation(MUIElement) on a model within a perspective that's not under the application
java.lang.NullPointerException at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.getElementLocation(ModelServiceImpl.java:740)
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java
* 
	 * @see
	 * org.eclipse.e4.ui.workbench.modeling.EModelService#bringToTop(org.eclipse.e4.ui.model.application
	 * .ui.MUIElement)
	 */
	public void bringToTop(MUIElement element) {
		if (element instanceof MApplication)
			return;
		MWindow window = getTopLevelWindowFor(element);
		if (window == element) {
			if (!element.isToBeRendered()) {
				element.setToBeRendered(true);
			}
			window.getParent().setSelectedElement(window);
		} else {
			showElementInWindow(window, element);
		}
	}
	private void showElementInWindow(MWindow window, MUIElement element) {
		if (element instanceof MPartStack && !element.isVisible()) {
			String trimId = element.getElementId() + "(minimized)"; 
			MPerspective persp = getPerspectiveFor(element);
			if (persp != null)
				trimId = element.getElementId() + '(' + persp.getElementId() + ')';
			MToolControl trimCtrl = (MToolControl) find(trimId, window);
			if (trimCtrl != null && trimCtrl.getObject() != null) {
				IEclipseContext ctxt = EclipseContextFactory.create();
				ctxt.set("show", true); 
				ContextInjectionFactory.invoke(trimCtrl.getObject(), Execute.class, ctxt);
			}