Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358047 - EGLSource directory should not have rename option
Summary: EGLSource directory should not have rename option
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Tony Chen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 01:36 EDT by Tony Chen CLA
Modified: 2017-02-23 14:15 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chen CLA 2011-09-19 01:36:25 EDT
We should disable the refactor->rename operation for EGLSource folder. Renaming a source folder will cause all the (compiler) settings on package and files lost. 

In RBD, we don't allow rename the source folder. I don't see a need to allow user do this.
Comment 1 Justin Spadea CLA 2011-09-19 09:15:27 EDT
But if you rename a package or file then you're in the same situation - refactoring must support updating the project-level settings. One of the refactoring bugs has information on how to traverse the settings files so that it can update the keys.
Comment 2 Tony Chen CLA 2011-09-19 22:20:01 EDT
Justin, this is a good point. We should make sure refactoring folders and files will keep the compiler setting. What's the number of the refactoring bug you mentioned.
Comment 3 Justin Spadea CLA 2011-09-20 09:00:07 EDT
It's bug 346269.
Comment 4 Zhi Zhu CLA 2011-10-18 23:06:03 EDT
RBD supports 'EGLSource' refactoring. So from my understanding, EDT should also suppprt it.
  Rename 'EGLSource' will have the following effect:
   1. The name of 'EGLSource' is renamed.
   2. Path Entry in .eglpath are updated
   3. Project settings are updated
Comment 5 Tony Chen CLA 2011-10-20 08:01:24 EDT
I have a handler which calls a service in the same project using workspace binding. After renaming the EGLSource folder, run the handler reports dd can not be found. 

please do the green thread testing after renaming to make sure functions are not broken.
Comment 6 Zhi Zhu CLA 2011-10-24 03:02:15 EDT
When you change EGLSource folder, it will trigger a process to generate files under the folder again, and if the generation has no error, scenario described in this bug will not appear.

  whether the generator has error or not, you can see from:
    ASTFileInfo.setErrors() method.




How the error is generated is below:

WorkingCopyResourceChangeProcessor$WrokingCopyResourceChangeJob
   -- WorkingCopyResourceChangeProcessor$WrokingCopyResourceChangeJob.doRun(IProgressMonitor)  --364
      -- WorkingCopyResourceChangeProcessor$WrokingCopyResourceChangeJob.processAddedFile() -- 495
        --- WorkingCopyCompilerResourceFileInfoCreator.initializeASTInfo()
           --- WorkingCopyCompilerResourceFileInfoCreator.initializeParts()
              --- File.accept()
                --- Node.accept()
                  --- Handler.accept()
                     --- WorkingCopyCompilerResourceFileInfoCreator.processPart(ASTPartSourceReader reader, Part part, int partType, int sourceStart, int sourceLength)
                       --- WorkingCopyCompilerResourceFileInfoCreator.isDuplicatePart
Comment 7 Tony Chen CLA 2011-10-27 05:00:18 EDT
There's a problem in handling EGL Model when renaming Source folder, the working copy model is not updated, and still have old part information. The problem also exists in RBD. The problem will gone after close and reopen the project, or close relaunch EDT. 

beside this issue, renaming source folder works well. I'll close this one and open a new defect for the problem described above.