Changeset 8c274a7 in rtems-eclipse-plug-in


Ignore:
Timestamp:
Dec 3, 2008, 1:19:26 PM (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
fdc1d39
Parents:
ca5befc
Message:

Fixed problem due to library access restrictions.

Location:
org.rtems.cdt.toolchain2
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • org.rtems.cdt.toolchain2/org/rtems/cdt/build/WinScannerInfoCollector.java

    rca5befc r8c274a7  
    1313package org.rtems.cdt.build;
    1414
    15 import org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGnuWinScannerInfoCollector;
     15import java.util.Iterator;
     16import java.util.List;
     17import java.util.Map;
     18
     19import org.eclipse.cdt.make.core.scannerconfig.InfoContext;
     20import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3;
     21import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes;
     22import org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector;
     23import org.eclipse.cdt.make.internal.core.scannerconfig.util.CygpathTranslator;
     24import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector;
     25import org.eclipse.core.resources.IProject;
    1626
    1727/**
    1828 * This class exists only to disable the specialized UI elements of the scanner configuration.
     29 *
     30 * See also 'org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGnuWinScannerInfoCollector'.
    1931 */
    20 public class WinScannerInfoCollector extends DefaultGnuWinScannerInfoCollector {
    21         // Empty
     32public class WinScannerInfoCollector extends PerProjectSICollector implements IScannerInfoCollector3, IManagedScannerInfoCollector {
     33        private IProject mProject;
     34
     35        public void contributeToScannerConfig( Object resource, Map scannerInfo) {
     36                List<String> includes = (List<String>) scannerInfo.get( ScannerInfoTypes.INCLUDE_PATHS);
     37                List<String> translatedIncludes = CygpathTranslator.translateIncludePaths( mProject, includes);
     38
     39                Iterator<String> iter = translatedIncludes.listIterator();
     40                while (iter.hasNext()) {
     41                        String convertedPath = iter.next();
     42                        if (convertedPath.startsWith( "/")) {
     43                                iter.remove();
     44                        }
     45                }
     46                scannerInfo.put( ScannerInfoTypes.INCLUDE_PATHS, translatedIncludes);
     47               
     48                super.contributeToScannerConfig( resource, scannerInfo);
     49        }
     50
     51        public void setProject( IProject project) {
     52                mProject = project;
     53                super.setProject( project);
     54        }
     55
     56        public void setInfoContext( InfoContext context) {
     57                mProject = context.getProject();
     58                super.setInfoContext( context);
     59        }
    2260}
  • org.rtems.cdt.toolchain2/plugin.xml

    rca5befc r8c274a7  
    1919         point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">
    2020      <scannerInfoCollector
    21             class="org.rtems.cdt.build.ScannerInfoCollector"
     21            class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector"
    2222            scope="project"/>
    2323      <buildOutputProvider>
     
    3737         point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">
    3838      <scannerInfoCollector
    39             class="org.rtems.cdt.build.ScannerInfoCollector"
     39            class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector"
    4040            scope="project"/>
    4141      <buildOutputProvider>
     
    5555         point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">
    5656      <scannerInfoCollector
    57             class="org.rtems.cdt.build.ScannerInfoCollector"
     57            class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector"
    5858            scope="project"/>
    5959      <buildOutputProvider>
Note: See TracChangeset for help on using the changeset viewer.