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
RowLayout layout = new RowLayout(SWT.HORIZONTAL);
		layout.marginLeft = layout.marginRight = 8;
		layout.marginBottom = 4;
		layout.marginTop = 6;
		comp.setLayout(layout);
		psTB = new ToolBar(comp, SWT.FLAT | SWT.WRAP | SWT.RIGHT);
		comp.addPaintListener(new PaintListener() {
			public void paintControl(PaintEvent e) {
				paint(e);
			}
		});
		toolParent = ((Control) toolControl.getParent().getWidget());
		toolParent.addPaintListener(new PaintListener() {
			public void paintControl(PaintEvent e) {
				e.gc.setForeground(borderColor);
				Rectangle bounds = ((Control) e.widget).getBounds();
				e.gc.drawLine(0, bounds.height - 1, bounds.width, bounds.height - 1);
			}
		});
		toolParent.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent e) {
				borderColor.dispose();
			}
		});
		comp.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent e) {
				dispose();
			}
		});
		psTB.addMenuDetectListener(new MenuDetectListener() {