Bug 317250 [Compatibility] second Java perspective in perspective switcher
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java
}
		MPerspective persp = AdvancedFactoryImpl.eINSTANCE.createPerspective();
		
		persp.setElementId(desc.getId());
		persp.setLabel(desc.getLabel());
		List<MPerspective> children = getPerspectiveStack().getChildren();
		
		IPerspectiveFactory factory = (desc).createFactory();
		ModeledPageLayout modelLayout = new ModeledPageLayout(window, modelService, partService,
				persp, desc, (WorkbenchPage) PlatformUI.getWorkbench().getActiveWorkbenchWindow()
						.getActivePage(), true);
		factory.createInitialLayout(modelLayout);
		PerspectiveTagger.tagPerspective(persp, modelService);
		
		children.add(persp);
		
		getPerspectiveStack().setSelectedElement(persp);
		window.getContext().set(IContextConstants.ACTIVE_CHILD, persp.getContext());
	}
	private void selectPerspective() {
		SelectPerspectiveDialog dialog = new SelectPerspectiveDialog(psTB.getShell(), PlatformUI
				.getWorkbench().getPerspectiveRegistry());
		dialog.open();
		if (dialog.getReturnCode() == Window.CANCEL) {
			return;
		}
		IPerspectiveDescriptor descriptor = dialog.getSelection();
		if (descriptor != null) {
			MPerspective persp = getPerspectiveFor(descriptor);
			if (persp != null) {