Bug 255076 [EditorMgmt] File icon not updated when file changed (content change or move/rename)
M20081008-0800 File icons are not updated when a file is changed (content change or move/rename the file). Steps: - create file a.xml - paste this into the opened text editor: <?xml version="1.0" encoding="UTF-8"?> <project name="project" default="default"> <target name="default"> </target> </project> - save => expected: file icon should turn into Ant file => was: nothing happens (in Package Explorer and Navigator) - File > Refresh refreshes the icon - rename file to a.xml2 => expected: File icon should turn into plain text file => was: Ant icon stays, even if I try to refresh - move file to another folder => was: Ant icon stays, even if I try to refresh - copy file and paste into same folder, use suggested name => was: copy uses plain text icon (good)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java
if (workbench.isClosing()) {
					return;
				}
				ImageDescriptor image = workbench
						.getEditorRegistry().getImageDescriptor(file.getName(),
								contentType);
				if (image != null) {
					
					
					try {
						file.setSessionProperty(WorkbenchFile.IMAGE_CACHE_KEY, image);
					} catch (CoreException e) {
						
					}
					decoration.addOverlay(image);
				}
			}
		}
	}
	public void addListener(ILabelProviderListener listener) {
	}
	public void dispose() {
	}
	public boolean isLabelProperty(Object element, String property) {
		return false;
	}
	public void removeListener(ILabelProviderListener listener) {
	}
}