mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
cleanup: renamed private fields, reformatted
This commit is contained in:
parent
cb1d5a3dfb
commit
6fa46c7bb1
1 changed files with 31 additions and 29 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2005, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -14,37 +14,36 @@ package org.eclipse.cdt.core.parser;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Implementation for the {@link IExtendedScannerInfo} interface. Allows to configure
|
||||
* the preprocessor.
|
||||
* Implementation for the {@link IExtendedScannerInfo} interface. Allows to configure the preprocessor.
|
||||
*/
|
||||
public class ExtendedScannerInfo extends ScannerInfo implements IExtendedScannerInfo {
|
||||
|
||||
private static final String[] EMPTY_STRING_ARRAY = new String[0];
|
||||
private String [] m, i, localIncludePaths;
|
||||
private String[] macroFiles;
|
||||
private String[] includeFiles;
|
||||
private String[] localIncludePaths;
|
||||
|
||||
public ExtendedScannerInfo()
|
||||
{
|
||||
public ExtendedScannerInfo() {
|
||||
}
|
||||
|
||||
public ExtendedScannerInfo( Map<String, String> d, String [] incs )
|
||||
{
|
||||
super(d,incs);
|
||||
public ExtendedScannerInfo(Map<String, String> definedSymbols, String[] includePaths) {
|
||||
super(definedSymbols, includePaths);
|
||||
}
|
||||
|
||||
public ExtendedScannerInfo( Map<String, String> d, String [] incs, String [] macros, String [] includes )
|
||||
{
|
||||
super(d,incs);
|
||||
m = macros;
|
||||
i = includes;
|
||||
public ExtendedScannerInfo(Map<String, String> definedSymbols, String[] includePaths,
|
||||
String[] macroFiles, String[] includeFiles) {
|
||||
|
||||
super(definedSymbols, includePaths);
|
||||
this.macroFiles = macroFiles;
|
||||
this.includeFiles = includeFiles;
|
||||
}
|
||||
|
||||
public ExtendedScannerInfo( IScannerInfo info )
|
||||
{
|
||||
public ExtendedScannerInfo(IScannerInfo info) {
|
||||
super(info.getDefinedSymbols(), info.getIncludePaths());
|
||||
if (info instanceof IExtendedScannerInfo) {
|
||||
IExtendedScannerInfo einfo = (IExtendedScannerInfo) info;
|
||||
m = einfo.getMacroFiles();
|
||||
i = einfo.getIncludeFiles();
|
||||
macroFiles = einfo.getMacroFiles();
|
||||
includeFiles = einfo.getIncludeFiles();
|
||||
localIncludePaths = einfo.getLocalIncludePath();
|
||||
}
|
||||
}
|
||||
|
@ -53,23 +52,26 @@ public class ExtendedScannerInfo extends ScannerInfo implements IExtendedScanner
|
|||
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getMacroFiles()
|
||||
*/
|
||||
public String[] getMacroFiles() {
|
||||
if( m == null ) return EMPTY_STRING_ARRAY;
|
||||
return m;
|
||||
if (macroFiles == null)
|
||||
return EMPTY_STRING_ARRAY;
|
||||
return macroFiles;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getIncludeFiles()
|
||||
*/
|
||||
public String[] getIncludeFiles() {
|
||||
if( i == null ) return EMPTY_STRING_ARRAY;
|
||||
return i;
|
||||
if (includeFiles == null)
|
||||
return EMPTY_STRING_ARRAY;
|
||||
return includeFiles;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getLocalIncludePath()
|
||||
*/
|
||||
public String[] getLocalIncludePath() {
|
||||
if ( localIncludePaths == null ) return EMPTY_STRING_ARRAY;
|
||||
if (localIncludePaths == null)
|
||||
return EMPTY_STRING_ARRAY;
|
||||
return localIncludePaths;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue