Bug 299588 [Forms] Widget disposed exception when closing shell from a FormText selection
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java
final MenuItem copyItem = new MenuItem(menu, SWT.PUSH);
		copyItem.setText(Messages.FormText_copy);
		SelectionListener listener = new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e) {
				if (e.widget == copyItem) {
					copy();
				}
			}
		};
		copyItem.addSelectionListener(listener);
		menu.addMenuListener(new MenuListener() {
			public void menuShown(MenuEvent e) {
				copyItem.setEnabled(canCopy());
			}
			public void menuHidden(MenuEvent e) {
			}
		});
		menu.setData(INTERNAL_MENU);
		super.setMenu(menu);
	}
	/**
	 * Returns the hyperlink settings that are in effect for this control.
	 * 
	 * @return current hyperlinks settings
	 */
	public HyperlinkSettings getHyperlinkSettings() {
		return model.getHyperlinkSettings();
	}
	/**
	 * Sets the hyperlink settings to be used for this control. Settings will