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
|
* 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
|
||||||
|
@ -14,37 +14,36 @@ package org.eclipse.cdt.core.parser;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation for the {@link IExtendedScannerInfo} interface. Allows to configure
|
* Implementation for the {@link IExtendedScannerInfo} interface. Allows to configure the preprocessor.
|
||||||
* the preprocessor.
|
|
||||||
*/
|
*/
|
||||||
public class ExtendedScannerInfo extends ScannerInfo implements IExtendedScannerInfo {
|
public class ExtendedScannerInfo extends ScannerInfo implements IExtendedScannerInfo {
|
||||||
|
|
||||||
private static final String [] EMPTY_STRING_ARRAY = new String[ 0 ];
|
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 )
|
public ExtendedScannerInfo(Map<String, String> definedSymbols, String[] includePaths) {
|
||||||
{
|
super(definedSymbols, includePaths);
|
||||||
super(d,incs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtendedScannerInfo( Map<String, String> d, String [] incs, String [] macros, String [] includes )
|
public ExtendedScannerInfo(Map<String, String> definedSymbols, String[] includePaths,
|
||||||
{
|
String[] macroFiles, String[] includeFiles) {
|
||||||
super(d,incs);
|
|
||||||
m = macros;
|
super(definedSymbols, includePaths);
|
||||||
i = includes;
|
this.macroFiles = macroFiles;
|
||||||
|
this.includeFiles = includeFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtendedScannerInfo( IScannerInfo info )
|
public ExtendedScannerInfo(IScannerInfo info) {
|
||||||
{
|
|
||||||
super(info.getDefinedSymbols(), info.getIncludePaths());
|
super(info.getDefinedSymbols(), info.getIncludePaths());
|
||||||
if (info instanceof IExtendedScannerInfo) {
|
if (info instanceof IExtendedScannerInfo) {
|
||||||
IExtendedScannerInfo einfo = (IExtendedScannerInfo)info;
|
IExtendedScannerInfo einfo = (IExtendedScannerInfo) info;
|
||||||
m = einfo.getMacroFiles();
|
macroFiles = einfo.getMacroFiles();
|
||||||
i = einfo.getIncludeFiles();
|
includeFiles = einfo.getIncludeFiles();
|
||||||
localIncludePaths = einfo.getLocalIncludePath();
|
localIncludePaths = einfo.getLocalIncludePath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,23 +52,26 @@ public class ExtendedScannerInfo extends ScannerInfo implements IExtendedScanner
|
||||||
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getMacroFiles()
|
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getMacroFiles()
|
||||||
*/
|
*/
|
||||||
public String[] getMacroFiles() {
|
public String[] getMacroFiles() {
|
||||||
if( m == null ) return EMPTY_STRING_ARRAY;
|
if (macroFiles == null)
|
||||||
return m;
|
return EMPTY_STRING_ARRAY;
|
||||||
|
return macroFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getIncludeFiles()
|
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getIncludeFiles()
|
||||||
*/
|
*/
|
||||||
public String[] getIncludeFiles() {
|
public String[] getIncludeFiles() {
|
||||||
if( i == null ) return EMPTY_STRING_ARRAY;
|
if (includeFiles == null)
|
||||||
return i;
|
return EMPTY_STRING_ARRAY;
|
||||||
|
return includeFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getLocalIncludePath()
|
* @see org.eclipse.cdt.core.parser.IExtendedScannerInfo#getLocalIncludePath()
|
||||||
*/
|
*/
|
||||||
public String[] getLocalIncludePath() {
|
public String[] getLocalIncludePath() {
|
||||||
if ( localIncludePaths == null ) return EMPTY_STRING_ARRAY;
|
if (localIncludePaths == null)
|
||||||
|
return EMPTY_STRING_ARRAY;
|
||||||
return localIncludePaths;
|
return localIncludePaths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue