Bug 126658 [CommonNavigator] [DND] Complete definition of DND API
bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PortingActionProvider.java
if(!contribute)
			return;
		Assert.isTrue(!disposed);
		ISelection selection = getContext().getSelection();
		if (selection.isEmpty() || !(selection instanceof IStructuredSelection))
			addSimplePortingMenus(aMenu);
		else if (((IStructuredSelection) selection).size() > 1)
			addSimplePortingMenus(aMenu);
		else {
			addImportMenu(aMenu);
			addExportMenu(aMenu);
		}
	}
	/**
	 * Returns the image descriptor with the given relative path.
	 */
	protected ImageDescriptor getImageDescriptor(String relativePath) {
		String iconPath = "icons/full/";  
		URL url = WorkbenchNavigatorPlugin.getDefault().find(
				new Path(iconPath + relativePath));
		if (url == null)
			return ImageDescriptor.getMissingImageDescriptor();
		return ImageDescriptor.createFromURL(url);
	}
	private void addSimplePortingMenus(IMenuManager aMenu) {
		aMenu.appendToGroup(ICommonMenuConstants.GROUP_PORT, importAction);
		aMenu.appendToGroup(ICommonMenuConstants.GROUP_PORT, exportAction);
	}
	private void addImportMenu(IMenuManager aMenu) {
		importWizardActionGroup.setContext(getContext());