Buggy code:
public class GenericDetailsPage extends AbstractFormPart implements ISelectionProvider , IDetailsPage { private final class EStructuralfeatureComparator implements Comparator < EStructuralFeature > { public int compare ( EStructuralFeature o1 , EStructuralFeature o2 ) { } private String nullSafe ( EStructuralFeature o ) { } } private EObjectImpl input ; private Composite main ; private EEditor editor ; public GenericDetailsPage ( EObjectImpl object , EEditor editor ) { } public void createContents ( Composite parent ) { } private void createGenericPart ( Menu menu ) { if ( ( input ) != null ) { cleanUpMainComposite ( ) ; EList < EStructuralFeature > allStructuralFeatures = new org . eclipse . emf . common . util . BasicEList < EStructuralFeature > ( input . eClass ( ) . getEAllStructuralFeatures ( ) ) ; Collections . sort ( allStructuralFeatures , new GenericDetailsPage . EStructuralfeatureComparator ( ) ) ; <START_BUG> factory = new EmfSwtBindingFactory ( editor . getAdapterFactory ( ) , editor . getEditingDomain ( ) , input , main , getManagedForm ( ) . getToolkit ( ) , editor . getOawFacade ( ) ) ; <END_BUG> final IActionBars actionBars = editor . getActionBars ( ) ; final IAction ecoreCopy = actionBars . getGlobalActionHandler ( COPY . getId ( ) ) ; final IAction ecoreCut = actionBars . getGlobalActionHandler ( CUT . getId ( ) ) ; final IAction ecorePaste = actionBars . getGlobalActionHandler ( PASTE . getId ( ) ) ; final IAction ecoreDelete = actionBars . getGlobalActionHandler ( DELETE . getId ( ) ) ; for ( final EStructuralFeature feature : allStructuralFeatures ) { if ( ( ( feature . isChangeable ( ) ) && ( ! ( feature . isDerived ( ) ) ) ) && ( ! ( ( feature instanceof EReference ) && ( ( ( ( EReference ) ( feature ) ) . isContainment ( ) ) || ( ( ( EReference ) ( feature ) ) . isContainer ( ) ) ) ) ) ) { createLabel ( editor . getExtendedReflectiveItemProvider ( ) . getTextForFeature ( feature ) ) ; final Control contr = factory . create ( feature ) ; contr . setMenu ( menu ) ; contr . addFocusListener ( new FocusAdapter ( ) { @ Override public void focusGained ( FocusEvent e ) { if ( contr instanceof Text ) { TextActionHandler textHandlerh = new TextActionHandler ( actionBars ) ; Text t = ( ( Text ) ( contr ) ) ; textHandlerh . addText ( t ) ; textHandlerh . setCopyAction ( ecoreCopy ) ; textHandlerh . setCutAction ( ecoreCut ) ; textHandlerh . setPasteAction ( ecorePaste ) ; textHandlerh . setDeleteAction ( ecoreDelete ) ; actionBars . updateActionBars ( ) ; } setSelection ( new org . eclipse . jface . viewers . StructuredSelection ( feature ) ) ; } @ Override public void focusLost ( FocusEvent e ) { actionBars . setGlobalActionHandler ( COPY . getId ( ) , ecoreCopy ) ; actionBars . setGlobalActionHandler ( CUT . getId ( ) , ecoreCut ) ; actionBars . setGlobalActionHandler ( DELETE . getId ( ) , ecoreDelete ) ; actionBars . setGlobalActionHandler ( PASTE . getId ( ) , ecorePaste ) ; } } ) ; } } getManagedForm ( ) . getToolkit ( ) . paintBordersFor ( main ) ; } } private void cleanUpMainComposite ( ) { } private Label createLabel ( String string ) { } @ Override public void dispose ( ) { } @ Override public void setFocus ( ) { } public Control locateControl ( String key , Object data ) { } private List < ISelectionChangedListener > selListeners = new ArrayList < ISelectionChangedListener > ( ) ; private ISelection partSelection = null ; private EmfSwtBindingFactory factory ; public void addSelectionChangedListener ( ISelectionChangedListener listener ) { } public ISelection getSelection ( ) { } public void removeSelectionChangedListener ( ISelectionChangedListener listener ) { } public void setSelection ( ISelection selection ) { } public void selectionChanged ( IFormPart part , ISelection selection ) { } }

Fix:
factory = new EmfSwtBindingFactory ( editor . getAdapterFactory ( ) , editor . getEditingDomain ( ) , input , main , getManagedForm ( ) . getToolkit ( ) , editor . getExtXptFacade ( ) ) ;