mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
Make ScannerInfo API compliant
This commit is contained in:
parent
1a4d4ec79e
commit
c5b863d340
1 changed files with 12 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2006 IBM Corporation and others.
|
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,9 +7,11 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Rational Software - Initial API and implementation
|
* IBM Rational Software - Initial API and implementation
|
||||||
|
* Anton Leherbauer (Wind River Systems)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.parser;
|
package org.eclipse.cdt.core.parser;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,8 +20,8 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public class ScannerInfo implements IScannerInfo
|
public class ScannerInfo implements IScannerInfo
|
||||||
{
|
{
|
||||||
private Map definedSymbols = null;
|
private Map definedSymbols = Collections.EMPTY_MAP;
|
||||||
private String [] includePaths = null;
|
private String [] includePaths = {};
|
||||||
|
|
||||||
public ScannerInfo()
|
public ScannerInfo()
|
||||||
{
|
{
|
||||||
|
@ -27,15 +29,19 @@ public class ScannerInfo implements IScannerInfo
|
||||||
|
|
||||||
public ScannerInfo( Map d, String [] incs )
|
public ScannerInfo( Map d, String [] incs )
|
||||||
{
|
{
|
||||||
definedSymbols = d;
|
if (d != null) {
|
||||||
includePaths = incs;
|
definedSymbols = d;
|
||||||
|
}
|
||||||
|
if (incs != null) {
|
||||||
|
includePaths = incs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param definitions
|
* @param definitions
|
||||||
*/
|
*/
|
||||||
public ScannerInfo(Map definitions) {
|
public ScannerInfo(Map definitions) {
|
||||||
this( definitions, (String [])null);
|
this(definitions, (String [])null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue