Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360828 - NPE during refactoring when project has decimals
Summary: NPE during refactoring when project has decimals
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Zhi Zhu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 09:51 EDT by Justin Spadea CLA
Modified: 2017-02-23 14:17 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.