1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Small converter update

This commit is contained in:
Mikhail Sennikovsky 2007-03-16 18:29:10 +00:00
parent 4612d251d4
commit 2c66e22885

View file

@ -108,10 +108,7 @@ public class ProjectConverter implements ICProjectConverter {
String[] binErrParserIds = null; String[] binErrParserIds = null;
// boolean convertMakeTargetInfo = false; // boolean convertMakeTargetInfo = false;
if(natureSet.contains(OLD_MNG_NATURE_ID)){ if(natureSet.contains(OLD_MAKE_NATURE_ID)){
newDes = model.createProjectDescription(project, false);
info = convertManagedBuildInfo(project, newDes);
} else if(natureSet.contains(OLD_MAKE_NATURE_ID)){
newDes = oldDes; newDes = oldDes;
ICConfigurationDescription des = newDes.getConfigurations()[0]; ICConfigurationDescription des = newDes.getConfigurations()[0];
ICConfigExtensionReference refs[] = des.get(OLD_BINARY_PARSER_ID); ICConfigExtensionReference refs[] = des.get(OLD_BINARY_PARSER_ID);
@ -130,6 +127,9 @@ public class ProjectConverter implements ICProjectConverter {
cfg.setConfigurationDescription(des); cfg.setConfigurationDescription(des);
des.setConfigurationData(ManagedBuildManager.CFG_DATA_PROVIDER_ID, cfg.getConfigurationData()); des.setConfigurationData(ManagedBuildManager.CFG_DATA_PROVIDER_ID, cfg.getConfigurationData());
} else if(natureSet.contains(OLD_MNG_NATURE_ID)){
newDes = model.createProjectDescription(project, false);
info = convertManagedBuildInfo(project, newDes);
} }
if(newDes == null || !newDes.isValid() || newDes.getConfigurations().length == 0){ if(newDes == null || !newDes.isValid() || newDes.getConfigurations().length == 0){
@ -372,22 +372,22 @@ public class ProjectConverter implements ICProjectConverter {
private static boolean convertOldStdMakeToNewStyle(final IProject project, boolean checkOnly, IProgressMonitor monitor, boolean throwExceptions) throws CoreException { private static boolean convertOldStdMakeToNewStyle(final IProject project, boolean checkOnly, IProgressMonitor monitor, boolean throwExceptions) throws CoreException {
try { try {
ICDescriptor dr = CCorePlugin.getDefault().getCProjectDescription(project, false); // ICDescriptor dr = CCorePlugin.getDefault().getCProjectDescription(project, false);
if(dr == null){ // if(dr == null){
if(throwExceptions) // if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, // throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), // ManagedBuilderCorePlugin.getUniqueIdentifier(),
DataProviderMessages.getString("ProjectConverter.0"))); //$NON-NLS-1$ // DataProviderMessages.getString("ProjectConverter.0"))); //$NON-NLS-1$
return false; // return false;
} // }
//
if(!MakeCorePlugin.MAKE_PROJECT_ID.equals(dr.getProjectOwner().getID())){ // if(!MakeCorePlugin.MAKE_PROJECT_ID.equals(dr.getProjectOwner().getID())){
if(throwExceptions) // if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, // throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), // ManagedBuilderCorePlugin.getUniqueIdentifier(),
DataProviderMessages.getString("ProjectConverter.1") + dr.getProjectOwner().getID())); //$NON-NLS-1$ // DataProviderMessages.getString("ProjectConverter.1") + dr.getProjectOwner().getID())); //$NON-NLS-1$
return false; // return false;
} // }
ICProjectDescription des = CCorePlugin.getDefault().getProjectDescription(project, false); ICProjectDescription des = CCorePlugin.getDefault().getProjectDescription(project, false);
ICConfigurationDescription cfgs[] = des.getConfigurations(); ICConfigurationDescription cfgs[] = des.getConfigurations();