Bug 7330 Make more actions available on text selection
I could not find the action "Add Javadoc Comment" until I switched to the Outline view. I expected the action to be 1. in the context menu and if not 2. in the Edit (or some other global) menu I think currently we distribute the actions on a personal taste basis. This should be changed. It is not clear to users why some actions are in the context menu and some are not (OK - not all need to be in the context menu but all must be reachable from the editor e.g. via Edit menu). It is not acceptable to force users to switch the view.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ImportActionGroup.java
* context menu.
 * 
 * @sine 2.0
 */
public class ImportActionGroup extends ActionGroup {
	private static final String GROUP_IMPORT= "group.import";
	private ImportResourcesAction fImportAction;
	private ExportResourcesAction fExportAction;
	/**
	 * Creates a new <code>ImportActionGroup</code>.
	 * 
	 * @param part the view part that owns this action group
	 */
	public ImportActionGroup(IViewPart part) {
		IWorkbench workbench = part.getSite().getWorkbenchWindow().getWorkbench();
		fImportAction= new ImportResourcesAction(workbench);
		fExportAction= new ExportResourcesAction(workbench);			
	}
	
	/* (non-Javadoc)
	 * Method declared in ActionGroup
	 */
	public void fillContextMenu(IMenuManager menu) {
		IStructuredSelection selection= getStructuredSelection();
		if (selection == null)
			return;
			
		if (checkSelection(selection)) {
			menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new Separator(GROUP_IMPORT));
			menu.appendToGroup(GROUP_IMPORT, fImportAction);