Bug 264899 Replace context name with computable debug string
Contexts currently are required to have a name, but this string is only used for debugging purposes. We should instead store this "debug string" in the context itself, allowing clients to use a computed value to add additional debug information. We can make this name optional by supplying a default value, which simplifies life for clients that don't care about the name (much as toString() is optional and a default is provided for those who don't care to implement it).
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/Workbench.java
import org.eclipse.e4.core.services.IContributionFactorySpi;
import org.eclipse.e4.core.services.context.EclipseContextFactory;
import org.eclipse.e4.core.services.context.IEclipseContext;
import org.eclipse.e4.core.services.context.spi.ComputedValue;
import org.eclipse.e4.ui.model.application.*;
import org.eclipse.e4.ui.model.workbench.*;
import org.eclipse.e4.ui.model.workbench.WorkbenchFactory;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.e4.workbench.ui.*;
import org.eclipse.e4.workbench.ui.renderers.swt.*;
import org.eclipse.e4.workbench.ui.utils.ResourceUtility;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osgi.service.datalocation.Location;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.*;
import org.osgi.framework.Bundle;
import org.osgi.service.packageadmin.PackageAdmin;
public class Workbench implements IWorkbench, IContributionFactory {
	public static final String ID = "org.eclipse.e4.workbench.fakedWBWindow"; 
	private MApplication<MWorkbenchWindow> workbench;
	private ResourceUtility resourceUtility;
	private static final boolean saveAndRestore = true;
	private File workbenchData;