source: rtems-eclipse-plug-in/org.rtems.cdt.toolchain2/org/rtems/cdt/build/RunScannerInfoProvider.java @ 493763b

Last change on this file since 493763b was 493763b, checked in by Sebastian Huber <sebastian.huber@…>, on 12/01/08 at 09:59:31

Added tool options parser.
Removed obsolete properties and preferences.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 * Copyright (c) 2008
3 * Embedded Brains GmbH
4 * Obere Lagerstr. 30
5 * D-82178 Puchheim
6 * Germany
7 * rtems@embedded-brains.de
8 *
9 * The license and distribution terms for this file may be found in the file
10 * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
11 */
12
13package org.rtems.cdt.build;
14
15import org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider;
16import org.eclipse.core.resources.IProject;
17import org.eclipse.core.runtime.CoreException;
18import org.eclipse.core.runtime.Path;
19import org.rtems.cdt.Constants;
20import org.rtems.cdt.Storage;
21
22public class RunScannerInfoProvider extends GCCSpecsRunSIProvider {
23        protected boolean initialize() {
24                if (!super.initialize()) {
25                        return false;
26                }
27
28                IProject project = resource.getProject();
29               
30                /*
31                 * FIXME: This is a hack to avoid to early discovery of internal
32                 * compiler include paths and symbols.  The discovery is suppressed for
33                 * empty projects which contain only the '.project' and '.cproject'
34                 * files.
35                 */
36                try {
37                        if (project.members().length < 3) {
38                                return false;
39                        }
40                } catch (CoreException e) {
41                        e.printStackTrace();
42                        return false;
43                }
44               
45                /*
46                 * FIXME: Added absolute path since it seams that the build
47                 * environment is ignored.
48                 */
49                fCompileCommand = new Path(
50                        Storage.getProperty( project, Constants.BASE_PATH_KEY)
51                );
52                fCompileCommand = fCompileCommand.append( "bin");
53                fCompileCommand = fCompileCommand.append(
54                        Storage.getProperty( project, Constants.TOOL_COMPILER_C_KEY)
55                );
56               
57                return true;
58        }
59}
Note: See TracBrowser for help on using the repository browser.