Bug 14113 Should listen to F_SOURCEATTACHED and F_SOURCEDETACHED java deltas
Build 20020416 Right now, when one change the attached source of a jar, a F_REMOVED_FROM_CLASSPATH java delta is fired, which is obviously wrong. As a consequence, the UI reacts by closing the class file editors opened on this jar, which is right for a F_REMOVED_FROM_CLASSPATH java delta. However I tried to fix the delta to be a (F_SOURCEDETACHED | F_SOURCEATTACHED) delta, but the UI would not react. In this case, I think it should refresh the class file editor to get the new source. For now, I will fire a (F_REMOVED_FROM_CLASSPATH | F_SOURCEDETACHED | F_SOURCEATTACHED) delta, and I will remove the F_REMOVED_FROM_CLASSPATH when this bug is fixed.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModelStatusConstants;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.JavaModelStatus;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
 * Java specific text editor.
 */
public class ClassFileEditor extends JavaEditor {
	
		/**
		 * A form to attach source to a class file.
		 */
		private class SourceAttachmentForm implements IPropertyChangeListener {
		
			private final IClassFile fFile;
			private ScrolledComposite fScrolledComposite;
			private Color fBackgroundColor;
			private Color fForegroundColor;
			private Color fSeparatorColor;
			private List fBannerLabels= new ArrayList();
			private List fHeaderLabels= new ArrayList();