Source:
<code>public Composite createBrowser(final Composite parent) { browserRootComposite = new Composite(parent, SWT.BORDER); browserRootComposite.setLayout(GridLayoutFactory.fillDefaults().create()); browserRootComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); browserErrorMessageComposite = new Composite(browserRootComposite, SWT.None); browserErrorMessageComposite.setLayout(GridLayoutFactory.fillDefaults().create()); browserErrorMessageLayoutData = new GridData(SWT.FILL, SWT.FILL, true, false); browserErrorMessageComposite.setLayoutData(browserErrorMessageLayoutData); browserErrorMessageLayoutData.exclude = true; Composite browserComposite = new Composite(browserRootComposite, SWT.None); browserComposite.setLayout(GridLayoutFactory.fillDefaults().create()); browserComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); browserErrorMessageText = new Text(browserErrorMessageComposite, SWT.MULTI | SWT.WRAP); browserErrorMessageText.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false)); browserErrorMessageText.setText(""); browserErrorMessageText.setForeground(browserRootComposite.getDisplay().getSystemColor(SWT.COLOR_RED)); try { browser = new Browser(browserComposite, SWT.FILL); browserGridData = new GridData(SWT.FILL, SWT.FILL, true, true); browserGridData.widthHint = 0; browserGridData.heightHint = 0; browser.setLayoutData(browserGridData); return browser; } catch (SWTError | NullPointerException e) { SiriusEditPlugin.getPlugin().getLog().log(new <START> Status(IStatus.ERROR, SiriusPlugin.ID, <END> Messages.OpenViewpointSelectionBrowser_Error_Message, e)); browserReplacementComposite = new Composite(browserComposite, SWT.None); browserReplacementComposite.setLayout(GridLayoutFactory.fillDefaults().create()); browserGridData = new GridData(SWT.FILL, SWT.FILL, true, true); browserGridData.widthHint = 0; browserGridData.heightHint = 0; browserReplacementComposite.setLayoutData(browserGridData); browserReplacementText = new Text(browserReplacementComposite, SWT.MULTI | SWT.WRAP); browserReplacementText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); browserReplacementText.setText(""); setBrowserErrorMessageText(Messages.No_Browser_Error_Message); return browserReplacementComposite; } }</code><technical_language>wondering if log a warning instead of error</technical_language>

Target:
public Composite createBrowser(final Composite parent) { browserRootComposite = new Composite(parent, SWT.BORDER); browserRootComposite.setLayout(GridLayoutFactory.fillDefaults().create()); browserRootComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); browserErrorMessageComposite = new Composite(browserRootComposite, SWT.None); browserErrorMessageComposite.setLayout(GridLayoutFactory.fillDefaults().create()); browserErrorMessageLayoutData = new GridData(SWT.FILL, SWT.FILL, true, false); browserErrorMessageComposite.setLayoutData(browserErrorMessageLayoutData); browserErrorMessageLayoutData.exclude = true; Composite browserComposite = new Composite(browserRootComposite, SWT.None); browserComposite.setLayout(GridLayoutFactory.fillDefaults().create()); browserComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); browserErrorMessageText = new Text(browserErrorMessageComposite, SWT.MULTI | SWT.WRAP); browserErrorMessageText.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false)); browserErrorMessageText.setText(""); browserErrorMessageText.setForeground(browserRootComposite.getDisplay().getSystemColor(SWT.COLOR_RED)); try { browser = new Browser(browserComposite, SWT.FILL); browserGridData = new GridData(SWT.FILL, SWT.FILL, true, true); browserGridData.widthHint = 0; browserGridData.heightHint = 0; browser.setLayoutData(browserGridData); return browser; } catch (Exception e) { SiriusEditPlugin.getPlugin().getLog().log(new Status(IStatus.WARNING, SiriusPlugin.ID, Messages.OpenViewpointSelectionBrowser_Error_Message, e)); browserReplacementComposite = new Composite(browserComposite, SWT.None); browserReplacementComposite.setLayout(GridLayoutFactory.fillDefaults().create()); browserGridData = new GridData(SWT.FILL, SWT.FILL, true, true); browserGridData.widthHint = 0; browserGridData.heightHint = 0; browserReplacementComposite.setLayoutData(browserGridData); browserReplacementText = new Text(browserReplacementComposite, SWT.MULTI | SWT.WRAP); browserReplacementText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); browserReplacementText.setText(""); setBrowserErrorMessageText(Messages.No_Browser_Error_Message); return browserReplacementComposite; } }