Source:
private void handleSetData(Event event) { TableItem item= (TableItem) event.item; int index= fProposalTable.indexOf(item); if (0 <= index && index < fFilteredProposals.length) { ICompletionProposal current= fFilteredProposals[index]; String displayString; StyleRange[] styleRanges= null; Image image= null; try { if (fIsColoredLabelsSupportEnabled && current instanceof ICompletionProposalExtension6) { StyledString styledString= ((ICompletionProposalExtension6)current).getStyledDisplayString(); if (current instanceof ICompletionProposalExtension3 && current instanceof ICompletionProposalExtension7) { if (Helper.okToUse(fProposalShell)) { BoldStylerProvider boldStylerProvider= fContentAssistant.getBoldStylerProvider(); BoldStylerProvider stylerProvider; if (boldStylerProvider == null) { stylerProvider= new BoldStylerProvider(fProposalShell.getFont()); fContentAssistant.setBoldStylerProvider(stylerProvider); } else { stylerProvider= boldStylerProvider; } styledString= ((ICompletionProposalExtension7) current).emphasizeMatch(fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset, stylerProvider); } } displayString= styledString.getString(); styleRanges= styledString.getStyleRanges(); } else displayString= current.getDisplayString(); } catch (RuntimeException e) { displayString= JFaceTextMessages.getString("CompletionProposalPopup.error_retrieving_proposal"); String PLUGIN_ID= "org.eclipse.jface.text"; ILog log= Platform.getLog(Platform.getBundle(PLUGIN_ID)); log.log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, JFaceTextMessages.getString("CompletionProposalPopup.unexpected_error"), e)); } try { image= current.getImage(); } catch (RuntimeException e) { } item.setText(displayString); if (fIsColoredLabelsSupportEnabled) TableOwnerDrawSupport.storeStyleRanges(item, 0, styleRanges); item.setImage(image); item.setData(current); } else { } }

Target:
private void handleSetData(Event event) { TableItem item= (TableItem) event.item; int index= fProposalTable.indexOf(item); if (0 <= index && index < fFilteredProposals.length) { ICompletionProposal current= fFilteredProposals[index]; String displayString; StyleRange[] styleRanges= null; Image image= null; try { if (fIsColoredLabelsSupportEnabled && current instanceof ICompletionProposalExtension6) { StyledString styledString= ((ICompletionProposalExtension6)current).getStyledDisplayString(); if (current instanceof ICompletionProposalExtension3 && current instanceof ICompletionProposalExtension7) { if (Helper.okToUse(fProposalShell)) { if (fContentAssistant.getBoldStylerProvider() == null) { fContentAssistant.setBoldStylerProvider(new BoldStylerProvider(fProposalShell.getFont())); } styledString= ((ICompletionProposalExtension7) current).emphasizeMatch(fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset, fContentAssistant.getBoldStylerProvider()); } } displayString= styledString.getString(); styleRanges= styledString.getStyleRanges(); } else displayString= current.getDisplayString(); } catch (RuntimeException e) { displayString= JFaceTextMessages.getString("CompletionProposalPopup.error_retrieving_proposal"); String PLUGIN_ID= "org.eclipse.jface.text"; ILog log= Platform.getLog(Platform.getBundle(PLUGIN_ID)); log.log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, JFaceTextMessages.getString("CompletionProposalPopup.unexpected_error"), e)); } try { image= current.getImage(); } catch (RuntimeException e) { } item.setText(displayString); if (fIsColoredLabelsSupportEnabled) TableOwnerDrawSupport.storeStyleRanges(item, 0, styleRanges); item.setImage(image); item.setData(current); } else { } }