Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313443

Summary: FileChangeManager regression
Product: [Modeling] GMF-Runtime Reporter: Anthony Hunter <ahunter.eclipse>
Component: GeneralAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: agfitzp
Version: 2.3   
Target Milestone: 2.3   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch restoring the removed code none

Description Anthony Hunter CLA 2010-05-18 17:11:58 EDT
Look at http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui/src/org/eclipse/gmf/runtime/common/ui/resources/FileChangeManager.java?root=Modeling_Project&r1=1.8&r2=1.9

A piece of code was removed in this patch by mistake in the patch in Bug 310916 , in red around line 156.

This is bug and the code needs to be restored.

Alex F is confirming this was a bad mistake.
Comment 1 Alex Fitzpatrick CLA 2010-05-18 17:28:58 EDT
This is definitely causing a regression. We do need to be careful restoring the code since that change was made prior to the removal of the trace method.

To restore Gleb's change the following should be inserted on line 157:

                } else if (delta.getResource() instanceof IFile) { 	 
                    FileChangeEvent event = new FileChangeEvent( 	 
                        FileChangeEventType.CHANGED, (IFile) delta 	 
                            .getResource()); 	 
                    fileObserverManager.notify(event);
					if (Trace.shouldTrace(CommonUIPlugin.getDefault(),
						CommonUIDebugOptions.RESOURCE)) {
						Trace.trace(CommonUIPlugin.getDefault(),
								"...FileChangeManager: Resource " //$NON-NLS-1$ 	 
								+ getAbsolutePath(delta.getResource()) + " was added"); //$NON-NLS-1$
					}
Comment 2 Anthony Hunter CLA 2010-05-18 22:06:11 EDT
Created attachment 169040 [details]
Patch restoring the removed code

Patch restoring the removed code and applying Syed's fix in Bug 310916

Alex, the reason you cannot create a patch?

I am getting warnings with this file:

CVS file org.eclipse.gmp/org.eclipse.gmf.runtime/plugins/org.eclipse.gmf.runtime.common.ui/src/org/eclipse/gmf/runtime/common/ui/resources/FileChangeManager.java either contains invalid line endings on the server (CR/LF instead of just LF) or is a binary file that is not marked as -kb.

Interestingly I create this patch file on Linux.
Comment 3 Anthony Hunter CLA 2010-05-18 22:08:14 EDT
Committed to HEAD for RC1
Comment 4 Eclipse Webmaster CLA 2010-07-16 23:38:21 EDT
[target cleanup] 2.3 RC was the original target milestone for this
bug
Comment 5 Eclipse Webmaster CLA 2010-07-19 22:00:19 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug