Bug 4381 Replace from local histroy - workspace element included
- modify a CU in the workspace - select the CU - activate "Replace from local history" - the workspace element is included in the local histroy, but a histroy never includes the actual element. I was really suprised seeing the element.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
super(sp);
		fEditor= editor;
		setText(CompareMessages.getString("AddFromHistory.action.label")); 
		update();
	}
	
	/**
	 * @see Action#run
	 */
	public final void run() {
		
		String errorTitle= CompareMessages.getString("AddFromHistory.title"); 
		String errorMessage= CompareMessages.getString("AddFromHistory.internalErrorMessage"); 
		
		Shell shell= JavaPlugin.getActiveWorkbenchShell();
		
		
		ICompilationUnit cu= null;
		IParent parent= null;
		IMember input= null;
		
		
		ISelection selection= getSelection();
		if (selection.isEmpty()) {
			
			if (fEditor != null) {
				IEditorInput editorInput= fEditor.getEditorInput();
				IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
				if (manager != null) {
					cu= manager.getWorkingCopy(editorInput);