Bug 114491 [refactoring] CCE in NullRefactoringHistory
3.2 M3 test pass I deleted some projects in (Java and Resource) working sets, but not quite sure what action triggered the exception. !ENTRY org.eclipse.core.resources 4 2 2005-11-01 11:29:35.216 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". !STACK 0 java.lang.ClassCastException: org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService$NullRefactoringHistory at org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService$WorkspaceChangeListener.removeDescriptors(RefactoringHistoryService.java:410) at org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryService$WorkspaceChangeListener.resourceChanged(RefactoringHistoryService.java:454) at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:276) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044) at org.eclipse.core.runtime.Platform.run(Platform.java:783) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:270) at org.eclipse.core.internal.events.NotificationManager.handleEvent(NotificationManager.java:254) at org.eclipse.core.internal.resources.Workspace.broadcastEvent(Workspace.java:201) at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1573) at org.eclipse.core.internal.resources.Resource.delete(Resource.java:670) at org.eclipse.core.internal.resources.Project.delete(Project.java:332) at org.eclipse.ui.actions.DeleteResourceAction.delete(DeleteResourceAction.java:419) at org.eclipse.ui.actions.DeleteResourceAction.delete(DeleteResourceAction.java:395) at org.eclipse.ui.actions.DeleteResourceAction.access$0(DeleteResourceAction.java:385) at org.eclipse.ui.actions.DeleteResourceAction$3.run(DeleteResourceAction.java:502) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1705) at org.eclipse.ui.actions.DeleteResourceAction$2.run(DeleteResourceAction.java:500) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/history/RefactoringHistoryService.java
for (int index= 0; index < fExecutionListeners.size(); index++) {
			final IRefactoringExecutionListener listener= (IRefactoringExecutionListener) fExecutionListeners.get(index);
			Platform.run(new ISafeRunnable() {
				public void handleException(final Throwable throwable) {
					RefactoringCorePlugin.log(throwable);
				}
				public void run() throws Exception {
					listener.executionNotification(new RefactoringExecutionEvent(RefactoringHistoryService.this, RefactoringExecutionEvent.UNDONE, descriptor));
				}
			});
		}
	}
	/**
	 * {@inheritDoc}
	 */
	public RefactoringHistory getProjectHistory(final IProject project, IProgressMonitor monitor) {
		Assert.isNotNull(project);
		Assert.isTrue(project.exists());
		if (project.isOpen()) {
			if (monitor == null)
				monitor= new NullProgressMonitor();
			try {
				monitor.beginTask(RefactoringCoreMessages.RefactoringHistoryService_retrieving_history, 12);
				if (fUndoStack.needsRecaching())
					fUndoStack.populateCache(new SubProgressMonitor(monitor, 4));
				else
					monitor.worked(4);
				final URI uri= project.getLocationURI();
				if (uri != null)
					return new RefactoringHistoryManager(uri).readHistory(Long.MIN_VALUE, Long.MAX_VALUE, new SubProgressMonitor(monitor, 8));