Community
Participate
Working Groups
Created attachment 267946 [details] Screenshot As I also change files outside of Eclipse, I frequently get the "Resource out of sync dialog" with no option to solve that. We should add the option to sync automatically on this dialog. To test: 1.) Change a file in a folder outside of Eclipse 2.) Try to rename the folder which contains the file -> Dialog without the option to do something
Patrik, something for you?
Out of the box this should just work since "Refresh on access" is enabled by default. It looks like Rename is not honoring this. This is either in Platform UI or Platform Resources.
Jonas, IIRC you suffered from missing auto-refresh in the past. Can you investigate? Steps: 1.) Find the code which triggers the dialog (easiest way it to start a runtime Eclipse and press the pause button to see the call stack). 2.) Check if preference is set and refresh resource if it is set Please start with 1.) once you found it, I can help with 2.).
To reproduce see Comment 0.
I could find the responsible code: Package is org.eclipse.ltk.ui.refactoring; Class RefactoringWizardOpenOperation And in there on line 175 I don't know where I can find the ltk packages. Any hints?
(In reply to Jonas Hungershausen from comment #5) > I could find the responsible code: > > Package is org.eclipse.ltk.ui.refactoring; > Class RefactoringWizardOpenOperation > And in there on line 175 > > I don't know where I can find the ltk packages. Any hints? Jdt UI repo
New Gerrit change created: https://git.eclipse.org/r/128360
Created attachment 275928 [details] After the patch I applied the patch and modified the file out of eclipse. Renamed the package name and got this message, I was expecting that it will either auto synch or give a dialog to perform synch. Have I missed any thing Lars ?
(In reply to Sarika Sinha from comment #8) > Created attachment 275928 [details] > After the patch > > I applied the patch and modified the file out of eclipse. > Renamed the package name and got this message, I was expecting that it will > either auto synch or give a dialog to perform synch. > Have I missed any thing Lars ? Or test was with for normal (non Java) files? Can test the case with a regular folder and text file? IIRC Java rename triggers a different code path.
(In reply to Sarika Sinha from comment #8) > Created attachment 275928 [details] > After the patch > > I applied the patch and modified the file out of eclipse. > Renamed the package name and got this message, I was expecting that it will > either auto synch or give a dialog to perform synch. > Have I missed any thing Lars ? Yes, you will need to test this with non java files in a folder (resources for example). Java file renames are not handled by the modified code.
Created attachment 275932 [details] After the patch txt file I created a folder in a java project and a .txt file under it. I closed the .txt file from editor.I modified the file out of eclipse and tried to rename the folder in Eclipse and got this error dialog.
(In reply to Sarika Sinha from comment #11) > Created attachment 275932 [details] > After the patch txt file > > I created a folder in a java project and a .txt file under it. I closed the > .txt file from editor.I modified the file out of eclipse and tried to rename > the folder in Eclipse and got this error dialog. Jonas, please see if you can reproduce this.
(In reply to Sarika Sinha from comment #11) > Created attachment 275932 [details] > After the patch txt file > > I created a folder in a java project and a .txt file under it. I closed the > .txt file from editor.I modified the file out of eclipse and tried to rename > the folder in Eclipse and got this error dialog. I couldn't reproduce this on ubuntu. Do you, by any chance have time to paste a stacktrace in here? My process was with a project named "test": 1. Create text file in the root of the "test" folder. 2. Rename text file to something else (from outside eclipse) 3. Rename the "test" folder to "test12" (from inside eclipse) Was this what you did?
Ok, Looks like some workspace issue. I am not seeing it anymore. I have provided couple of gerrit comments. After that, it should be good to go.
Gerrit change https://git.eclipse.org/r/128360 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=aee3004f2755266ba85b0b92ead213a6956c3954
Thanks Lars and Jonas!! Please verify the fix in the next I build.