Source:
<code>protected Control renderControl(SWTGridCell cell, Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption { final CTabFolder folder = new CTabFolder(parent, SWT.BOTTOM); folder.setBackground(parent.getBackground()); final ComposedAdapterFactory composedAdapterFactory = new ComposedAdapterFactory(new AdapterFactory[] { new ReflectiveItemProviderAdapterFactory(), new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE) }); final AdapterFactoryItemDelegator adapterFactoryItemDelegator = new AdapterFactoryItemDelegator( composedAdapterFactory); final EList<VAbstractCategorization> categorizations = getCategorizations(); for (final VAbstractCategorization categorization : categorizations) { final CTabItem item = new CTabItem(folder, SWT.NULL); final IItemPropertyDescriptor itemPropertyDescriptor = adapterFactoryItemDelegator.getPropertyDescriptor( categorization, VViewPackage.eINSTANCE.getElement_Name()); String categorizationName; if (itemPropertyDescriptor == null) { categorizationName = "Categorization"; } else { <START> final PropertyValueWrapper valueWrapper = (PropertyValueWrapper) itemPropertyDescriptor <END> .getPropertyValue(categorization); if (valueWrapper == null) { categorizationName = itemPropertyDescriptor.getDisplayName(categorization); } else { categorizationName = (String) ((PropertyValueWrapper) itemPropertyDescriptor .getPropertyValue(categorization)).getEditableValue(categorization); } } item.setText(categorizationName); final AbstractSWTRenderer<VElement> renderer = getSWTRendererFactory().getRenderer(categorization, getViewModelContext()); final SWTGridDescription gridDescription = renderer.getGridDescription(GridDescriptionFactory.INSTANCE .createEmptyGridDescription()); for (final SWTGridCell gridCell : gridDescription.getGrid()) { final Control render = renderer.render(gridCell, folder); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true) .applyTo(render); item.setControl(render); } } composedAdapterFactory.dispose(); if (folder.getItemCount() > 0) { folder.setSelection(0); } return folder; }</code><technical_language>is a PropertyValueWrapper? do need it</technical_language>

Target:
protected Control renderControl(SWTGridCell cell, Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption { final CTabFolder folder = new CTabFolder(parent, SWT.BOTTOM); folder.setBackground(parent.getBackground()); final ComposedAdapterFactory composedAdapterFactory = new ComposedAdapterFactory(new AdapterFactory[] { new ReflectiveItemProviderAdapterFactory(), new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE) }); final EList<VAbstractCategorization> categorizations = getCategorizations(); for (final VAbstractCategorization categorization : categorizations) { final CTabItem item = new CTabItem(folder, SWT.NULL); final IItemLabelProvider itemLabelProvider = (IItemLabelProvider) composedAdapterFactory.adapt( categorization, IItemLabelProvider.class); String categorizationName; if (itemLabelProvider == null) { categorizationName = "Leaf Category"; } else { categorizationName = itemLabelProvider.getText(categorization); } item.setText(categorizationName); final AbstractSWTRenderer<VElement> renderer = getSWTRendererFactory().getRenderer(categorization, getViewModelContext()); final SWTGridDescription gridDescription = renderer.getGridDescription(GridDescriptionFactory.INSTANCE .createEmptyGridDescription()); for (final SWTGridCell gridCell : gridDescription.getGrid()) { final Control render = renderer.render(gridCell, folder); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true) .applyTo(render); item.setControl(render); } } composedAdapterFactory.dispose(); if (folder.getItemCount() > 0) { folder.setSelection(0); } return folder; }