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

Bug 360828

Summary: NPE during refactoring when project has decimals
Product: z_Archived Reporter: Justin Spadea <jspadea>
Component: EDTAssignee: Zhi Zhu <zhuzhi>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: chenzhh, huozz, jinfahua, luyaoLy
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Justin Spadea CLA 2011-10-13 09:51:43 EDT
Create a basic EGL project "org.eclipse.edt.foo"

Add some part to it, then delete it from project explorer. The refactor code tries to update the DD file BUT it's looking for the wrong file name. The file was created as org_eclipse_edt_foo.egldd and it's looking for org.eclipse.edt.foo.egldd. There is no check that it actually exists.

1. RefactoringExecutionStarter.handleFileRemoval() needs to change the first line to:
if(eglddFile != null && eglddFile.exists()) {

2. CoreUtility.getExistingEGLDDFileHandle() needs to look for the correct file name.

3. I'm not familiar with this code, but is it entirely correct? Shouldn't it be gathering *all* the .egldd files in the project during a refactor? I see it'll try to update the "main" file but what about a other DD files containing service mappings? And why is it just checking services - what about when deleting RUI handlers?
Comment 1 fahua jin CLA 2011-10-13 20:30:20 EDT
Yao is responsible for the refactor function testing, add her to the copy list.
Comment 2 Zhi Zhu CLA 2011-10-14 02:16:31 EDT
Fix it.
CoreUtility.getExistingEGLDDFileHandle() returns all DD files for one project.

When deleting/renaming service/handler files, parts for those files in DD editors are also changed in accordance.
Comment 3 Justin Spadea CLA 2011-11-04 14:34:19 EDT
Closing since the original issue is fixed, but I've opened bug 362933 - not all DD files are updated by refactoring.