protected void updateTitle() {
   TagProposal tagProposal = (TagProposal) getDropWizardModel().getTagProposal();
   StringBuilder titleText = new StringBuilder();
   titleText.append("<"); // $NON-NLS-1$
   if (!TagProposal.EMPTY_PREFIX.equals(tagProposal.getPrefix())) {
     titleText.append(tagProposal.getPrefix()).append(":"); // $NON-NLS-1$
   }
   titleText.append(tagProposal.getName()).append(">"); // $NON-NLS-1$
   setTitle(titleText.toString());
 }
 @Override
 public Object execute(ExecutionEvent event) throws ExecutionException {
   IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
   ISelection selection = HandlerUtil.getCurrentSelectionChecked(event);
   if (part instanceof MarketDataView && selection instanceof IStructuredSelection) {
     MarketDataView view = (MarketDataView) part;
     IStructuredSelection sselection = (IStructuredSelection) selection;
     StringBuilder builder = new StringBuilder();
     for (Object obj : sselection.toArray()) {
       if (obj instanceof MarketDataViewItem) {
         MarketDataViewItem item = (MarketDataViewItem) obj;
         builder.append(item);
         builder.append(System.getProperty("line.separator")); // $NON-NLS-1$
       }
     }
     view.getClipboard()
         .setContents(
             new Object[] {builder.toString()}, new Transfer[] {TextTransfer.getInstance()});
   }
   return null;
 }
 private void testSelectionEvent(final Scale scale) {
   final StringBuilder log = new StringBuilder();
   SelectionListener selectionListener =
       new SelectionAdapter() {
         public void widgetSelected(SelectionEvent event) {
           assertEquals(scale, event.getSource());
           assertEquals(null, event.item);
           assertEquals(SWT.NONE, event.detail);
           assertEquals(0, event.x);
           assertEquals(0, event.y);
           assertEquals(0, event.width);
           assertEquals(0, event.height);
           assertEquals(true, event.doit);
           log.append("widgetSelected");
         }
       };
   scale.addSelectionListener(selectionListener);
   String scaleId = WidgetUtil.getId(scale);
   Fixture.fakeRequestParam(JSConst.EVENT_WIDGET_SELECTED, scaleId);
   Fixture.readDataAndProcessAction(scale);
   assertEquals("widgetSelected", log.toString());
 }