protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); notesViewer = new TopicNotesViewer(); if (editable) { notesViewer.setContributor(contributor = new NotesPopupActionBarContributor()); } int style = IRichTextEditViewer.DEFAULT_CONTROL_STYLE; if (!editable) { style |= SWT.READ_ONLY; } notesViewer.createControl(composite, style); GridData gridData = new GridData(GridData.FILL_BOTH); gridData.widthHint = 400; notesViewer.getControl().setLayoutData(gridData); ITopic topic = topicPart.getTopic(); notesAdapter = new RichDocumentNotesAdapter(topic); notesViewer.setInput(notesAdapter); notesViewer .getControl() .addDisposeListener( new DisposeListener() { public void widgetDisposed(DisposeEvent e) { if (notesAdapter != null) { notesAdapter.dispose(); notesAdapter = null; } } }); notesViewer.getImplementation().addSelectionChangedListener(this); notesViewer.getImplementation().getDocument().addDocumentListener(this); notesViewer.getImplementation().getDocument().addRichDocumentListener(this); new PopupKeyboardListener().hook(notesViewer.getImplementation().getFocusControl()); update(); addSpellCheck(); return composite; }