1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 15:05:36 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-05-25 02:57:05 +00:00
parent 5536ac7496
commit b8e33bce4f

View file

@ -95,7 +95,6 @@ public class PathEntryTranslator {
public static final int INCLUDE_USER = 1 << 1;
public static final int INCLUDE_ALL = INCLUDE_BUILT_INS | INCLUDE_USER;
static String PATH_ENTRY = "pathentry"; //$NON-NLS-1$
static String ATTRIBUTE_KIND = "kind"; //$NON-NLS-1$
static String ATTRIBUTE_PATH = "path"; //$NON-NLS-1$
@ -125,7 +124,6 @@ public class PathEntryTranslator {
private Map<IPath, ResourceInfo> fResourceMap = new HashMap<IPath, ResourceInfo>();
private IWorkspaceRoot fRoot = ResourcesPlugin.getWorkspace().getRoot();
private static class VarSubstitutor extends CoreVariableSubstitutor {
ICConfigurationDescription fCfg;
ICdtVariableManager fMngr = CCorePlugin.getDefault().getCdtVariableManager();
@ -708,7 +706,6 @@ public class PathEntryTranslator {
}
}
result[0][i] = new Path(projName);
result[1][i] = valuePath;
} else if (pathVarPath.isRoot()) {
@ -856,9 +853,9 @@ public class PathEntryTranslator {
}
public void setRefProjects(IPath []paths) {
if(paths == null || paths.length == 0)
if (paths == null || paths.length == 0) {
fRefProjMap = null;
else {
} else {
fRefProjMap = new LinkedHashMap<IPath, PathEntryComposer>();
for (IPath path : paths) {
PathEntryComposer cs = new PathEntryComposer(path, fProject/*, fCfg*/);
@ -1077,11 +1074,9 @@ public class PathEntryTranslator {
}
private static boolean isBuiltIn(ICSettingEntry entry) {
return entry != null ?
entry.isBuiltIn() || entry.isReadOnly() : false;
return entry != null && (entry.isBuiltIn() || entry.isReadOnly());
}
public List<IPathEntry> getEntries(List<IPathEntry> list, int flags, ICConfigurationDescription cfg) {
if (list == null)
list = new ArrayList<IPathEntry>();
@ -1281,8 +1276,7 @@ public class PathEntryTranslator {
path = path.removeFirstSegments(1);
return new CSourceEntry(path,
entry.getExclusionPatterns(),
ICSettingEntry.VALUE_WORKSPACE_PATH
| ICSettingEntry.RESOLVED);
ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
}
private static ICOutputEntry toCOutputEntry(IOutputEntry entry, boolean makeProjRelative) {
@ -1291,8 +1285,7 @@ public class PathEntryTranslator {
path = path.removeFirstSegments(1);
return new COutputEntry(path,
entry.getExclusionPatterns(),
ICSettingEntry.VALUE_WORKSPACE_PATH
| ICSettingEntry.RESOLVED);
ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
}
private static ICSettingEntry[] replaceUserEntries(ICSettingEntry[] oldEntries, ICSettingEntry[] newUsrEntries) {
@ -1419,7 +1412,6 @@ public class PathEntryTranslator {
}
RcDesInfo desInfo = (RcDesInfo) c.getValue();
applyEntries(rcData, desInfo, op);
}
}
@ -1467,8 +1459,8 @@ public class PathEntryTranslator {
private void applyEntries(CResourceData data, RcDesInfo info, int op) {
CLanguageData lDatas[] = data.getType() == ICSettingBase.SETTING_FILE ?
new CLanguageData[]{((CFileData)data).getLanguageData()}
: ((CFolderData)data).getLanguageDatas();
new CLanguageData[] { ((CFileData)data).getLanguageData() } :
((CFolderData) data).getLanguageDatas();
for (CLanguageData lData : lDatas) {
if (lData == null)
@ -1704,7 +1696,7 @@ public class PathEntryTranslator {
ResourceInfo[] baseInfos = (ResourceInfo[])cr.getValue();
ResourceInfo[] result;
if (!baseInfos[0].fExists) {
//resource does not exis, always create new rc info and not add it to map
// resource does not exist, always create new rc info and not add it to map
ResourceInfo inexistent = new ResourceInfo(container.getFolder(path), false);
result = new ResourceInfo[]{inexistent};
} else {
@ -2015,8 +2007,8 @@ public class PathEntryTranslator {
ReferenceSettingsInfo refInfo = new ReferenceSettingsInfo(des);
ICConfigurationDescription[] allCfgs = des.isPreferenceConfiguration() ?
new ICConfigurationDescription[]{des}
: des.getProjectDescription().getConfigurations();
new ICConfigurationDescription[] { des } :
des.getProjectDescription().getConfigurations();
CConfigurationData[] allDatas = new CConfigurationData[allCfgs.length];
for (int i = 0; i < allCfgs.length; i++) {
@ -2041,7 +2033,6 @@ public class PathEntryTranslator {
final int kinds[] = KindBasedStore.getLanguageEntryKinds();
rcDatas.accept(new IPathSettingsContainerVisitor() {
public boolean visit(PathSettingsContainer container) {
CResourceData data = (CResourceData)container.getValue();
if (data != null) {
@ -2056,7 +2047,6 @@ public class PathEntryTranslator {
}
return true;
}
});
return cr;
}