mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
bug 286384: Renaming the project doesn't update the macros and makes sources to appear as excluded from build
Patch from Alex Freidin
This commit is contained in:
parent
b7d18ff2d0
commit
3979025bff
2 changed files with 21 additions and 2 deletions
|
@ -286,8 +286,25 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
|
|||
CProjectDescriptionStorageManager.getInstance().projectClosedRemove(project);
|
||||
}
|
||||
|
||||
public void projectMove(IProject from, IProject to) {
|
||||
/**
|
||||
*
|
||||
* @param from Project to move the description from
|
||||
* @param to Project where the description is moved to
|
||||
* @return <b>ICProjectDescription</b> - non serialized, modified, writable
|
||||
* project description. To serialize, call <code>setProjectDescription()</code>
|
||||
*
|
||||
*/
|
||||
public ICProjectDescription projectMove(IProject from, IProject to) {
|
||||
CProjectDescriptionStorageManager.getInstance().projectMove(from, to);
|
||||
|
||||
int flags = CProjectDescriptionManager.INTERNAL_GET_IGNORE_CLOSE |
|
||||
CProjectDescriptionManager.GET_WRITABLE;
|
||||
CProjectDescription des = (CProjectDescription)getProjectDescription(to, flags);
|
||||
// set configuration descriptions to "writable" state
|
||||
for (ICConfigurationDescription cfgDes : des.getConfigurations()) {
|
||||
des.updateChild((CConfigurationDescription)cfgDes, true);
|
||||
}
|
||||
return des;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -78,8 +78,10 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
IProject toProject = toRc.getProject();
|
||||
switch(toRc.getType()){
|
||||
case IResource.PROJECT:{
|
||||
fMngr.projectMove(fromProject, toProject);
|
||||
ICProjectDescription des = fMngr.projectMove(fromProject, toProject);
|
||||
fRemovedProjSet.add(fromProject);
|
||||
if(des != null)
|
||||
fProjDesMap.put(toProject, des);
|
||||
}
|
||||
break;
|
||||
case IResource.FOLDER:{
|
||||
|
|
Loading…
Add table
Reference in a new issue