Changeset 4c4442c in rtems-eclipse-plug-in


Ignore:
Timestamp:
Dec 3, 2008, 10:08:58 AM (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ca5befc
Parents:
22039d5
Message:

Delete discovered paths after an update of the tools.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • org.rtems.cdt.toolchain2/org/rtems/cdt/Storage.java

    r22039d5 r4c4442c  
    2020import java.util.List;
    2121
     22import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext;
     23import org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager;
     24import org.eclipse.cdt.core.model.CoreModel;
     25import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
     26import org.eclipse.cdt.core.settings.model.ICProjectDescription;
     27import org.eclipse.cdt.managedbuilder.core.IConfiguration;
     28import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
    2229import org.eclipse.core.resources.IProject;
    2330import org.eclipse.core.runtime.CoreException;
     
    7481                        e.printStackTrace();
    7582                }
     83        }
     84       
     85        public static IConfiguration [] getConfigurations( IProject project) {
     86                ICProjectDescription pd = CoreModel.getDefault().getProjectDescription( project);
     87               
     88                ICConfigurationDescription cds [] = pd.getConfigurations();
     89                IConfiguration cfgs [] = new IConfiguration [cds.length];
     90                for (int i = 0; i < cds.length; ++i) {
     91                        cfgs [i] = ManagedBuildManager.getConfigurationForDescription( cds [i]);
     92                }
     93
     94                return cfgs;
     95        }
     96       
     97        public static IConfiguration getActiveConfiguration( IProject project) {
     98                ICProjectDescription pd = CoreModel.getDefault().getProjectDescription( project);
     99               
     100                ICConfigurationDescription cd = pd.getActiveConfiguration();
     101                IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription( cd);
     102               
     103                return cfg;
    76104        }
    77105       
     
    148176                        }
    149177                }
     178               
     179                // Delete discovered paths for all configurations of the project
     180                for (IConfiguration cfg : getConfigurations( project)) {
     181                        CfgDiscoveredPathManager.getInstance().removeDiscoveredInfo(
     182                                project,
     183                                new CfgInfoContext( cfg)
     184                        );
     185                }
    150186        }
    151187       
Note: See TracChangeset for help on using the changeset viewer.