// Content assist is available
UIUtils.createContentProposalDecorator(patternText,
Messages.Log4JPatternLayoutWizardPage_dec_contentAssistAvailable);
KeyStroke keyStroke = KeyStroke.getInstance("Ctrl+Space"); //$NON-NLS-1$
ContentProposalAdapter adapter = new ContentProposalAdapter(patternText,
new TextContentAdapter(),
new SimpleContentProposalProvider(patterns.toArray(new String[patterns.size()])),
keyStroke, null);
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
}
} catch (Exception e) {
// Log and show error
UIPlugin.logAndShowError(new CoreException(new Status(IStatus.ERROR,
UIPlugin.PLUGIN_ID, e.getLocalizedMessage(), e)), false);