Bug 280049 [UI] Don't use deprecated SWT API
Current CVS HEAD We should not use deprecated SWT API when there is an equivalent API available.
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/StackModelFactory.java
}
		}
	}
	private CTabItem findItemForPart(MPart<?> folder, MPart<?> part) {
		CTabFolder ctf = (CTabFolder) folder.getWidget();
		if (ctf == null)
			return null;
		CTabItem[] items = ctf.getItems();
		for (int i = 0; i < items.length; i++) {
			if (items[i].getData(OWNING_ME) == part)
				return items[i];
		}
		return null;
	}
	private void hookTabControllerLogic(final MPart<?> parentElement,
			final MPart<?> childElement, final CTabItem cti) {
		
		((EObject) childElement).eAdapters().add(new AdapterImpl() {
			@Override
			public void notifyChanged(Notification msg) {
				if (ApplicationPackage.Literals.MPART__VISIBLE.equals(msg
						.getFeature())) {
					MPart<?> changedPart = (MPart<?>) msg.getNotifier();
					if (changedPart.isVisible()) {
						childAdded(changedPart.getParent(), changedPart);
					} else {
						childRemoved(changedPart.getParent(), changedPart);
					}
				}
			}