mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 15:35:24 +02:00
Cosmetics.
This commit is contained in:
parent
5536ac7496
commit
b8e33bce4f
1 changed files with 307 additions and 317 deletions
|
@ -95,7 +95,6 @@ public class PathEntryTranslator {
|
||||||
public static final int INCLUDE_USER = 1 << 1;
|
public static final int INCLUDE_USER = 1 << 1;
|
||||||
public static final int INCLUDE_ALL = INCLUDE_BUILT_INS | INCLUDE_USER;
|
public static final int INCLUDE_ALL = INCLUDE_BUILT_INS | INCLUDE_USER;
|
||||||
|
|
||||||
|
|
||||||
static String PATH_ENTRY = "pathentry"; //$NON-NLS-1$
|
static String PATH_ENTRY = "pathentry"; //$NON-NLS-1$
|
||||||
static String ATTRIBUTE_KIND = "kind"; //$NON-NLS-1$
|
static String ATTRIBUTE_KIND = "kind"; //$NON-NLS-1$
|
||||||
static String ATTRIBUTE_PATH = "path"; //$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 Map<IPath, ResourceInfo> fResourceMap = new HashMap<IPath, ResourceInfo>();
|
||||||
private IWorkspaceRoot fRoot = ResourcesPlugin.getWorkspace().getRoot();
|
private IWorkspaceRoot fRoot = ResourcesPlugin.getWorkspace().getRoot();
|
||||||
|
|
||||||
|
|
||||||
private static class VarSubstitutor extends CoreVariableSubstitutor {
|
private static class VarSubstitutor extends CoreVariableSubstitutor {
|
||||||
ICConfigurationDescription fCfg;
|
ICConfigurationDescription fCfg;
|
||||||
ICdtVariableManager fMngr = CCorePlugin.getDefault().getCdtVariableManager();
|
ICdtVariableManager fMngr = CCorePlugin.getDefault().getCdtVariableManager();
|
||||||
|
@ -708,7 +706,6 @@ public class PathEntryTranslator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
result[0][i] = new Path(projName);
|
result[0][i] = new Path(projName);
|
||||||
result[1][i] = valuePath;
|
result[1][i] = valuePath;
|
||||||
} else if (pathVarPath.isRoot()) {
|
} else if (pathVarPath.isRoot()) {
|
||||||
|
@ -856,9 +853,9 @@ public class PathEntryTranslator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRefProjects(IPath []paths) {
|
public void setRefProjects(IPath []paths) {
|
||||||
if(paths == null || paths.length == 0)
|
if (paths == null || paths.length == 0) {
|
||||||
fRefProjMap = null;
|
fRefProjMap = null;
|
||||||
else {
|
} else {
|
||||||
fRefProjMap = new LinkedHashMap<IPath, PathEntryComposer>();
|
fRefProjMap = new LinkedHashMap<IPath, PathEntryComposer>();
|
||||||
for (IPath path : paths) {
|
for (IPath path : paths) {
|
||||||
PathEntryComposer cs = new PathEntryComposer(path, fProject/*, fCfg*/);
|
PathEntryComposer cs = new PathEntryComposer(path, fProject/*, fCfg*/);
|
||||||
|
@ -1077,11 +1074,9 @@ public class PathEntryTranslator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isBuiltIn(ICSettingEntry entry) {
|
private static boolean isBuiltIn(ICSettingEntry entry) {
|
||||||
return entry != null ?
|
return entry != null && (entry.isBuiltIn() || entry.isReadOnly());
|
||||||
entry.isBuiltIn() || entry.isReadOnly() : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<IPathEntry> getEntries(List<IPathEntry> list, int flags, ICConfigurationDescription cfg) {
|
public List<IPathEntry> getEntries(List<IPathEntry> list, int flags, ICConfigurationDescription cfg) {
|
||||||
if (list == null)
|
if (list == null)
|
||||||
list = new ArrayList<IPathEntry>();
|
list = new ArrayList<IPathEntry>();
|
||||||
|
@ -1281,8 +1276,7 @@ public class PathEntryTranslator {
|
||||||
path = path.removeFirstSegments(1);
|
path = path.removeFirstSegments(1);
|
||||||
return new CSourceEntry(path,
|
return new CSourceEntry(path,
|
||||||
entry.getExclusionPatterns(),
|
entry.getExclusionPatterns(),
|
||||||
ICSettingEntry.VALUE_WORKSPACE_PATH
|
ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
|
||||||
| ICSettingEntry.RESOLVED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ICOutputEntry toCOutputEntry(IOutputEntry entry, boolean makeProjRelative) {
|
private static ICOutputEntry toCOutputEntry(IOutputEntry entry, boolean makeProjRelative) {
|
||||||
|
@ -1291,8 +1285,7 @@ public class PathEntryTranslator {
|
||||||
path = path.removeFirstSegments(1);
|
path = path.removeFirstSegments(1);
|
||||||
return new COutputEntry(path,
|
return new COutputEntry(path,
|
||||||
entry.getExclusionPatterns(),
|
entry.getExclusionPatterns(),
|
||||||
ICSettingEntry.VALUE_WORKSPACE_PATH
|
ICSettingEntry.VALUE_WORKSPACE_PATH | ICSettingEntry.RESOLVED);
|
||||||
| ICSettingEntry.RESOLVED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ICSettingEntry[] replaceUserEntries(ICSettingEntry[] oldEntries, ICSettingEntry[] newUsrEntries) {
|
private static ICSettingEntry[] replaceUserEntries(ICSettingEntry[] oldEntries, ICSettingEntry[] newUsrEntries) {
|
||||||
|
@ -1419,7 +1412,6 @@ public class PathEntryTranslator {
|
||||||
}
|
}
|
||||||
|
|
||||||
RcDesInfo desInfo = (RcDesInfo) c.getValue();
|
RcDesInfo desInfo = (RcDesInfo) c.getValue();
|
||||||
|
|
||||||
applyEntries(rcData, desInfo, op);
|
applyEntries(rcData, desInfo, op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1467,8 +1459,8 @@ public class PathEntryTranslator {
|
||||||
|
|
||||||
private void applyEntries(CResourceData data, RcDesInfo info, int op) {
|
private void applyEntries(CResourceData data, RcDesInfo info, int op) {
|
||||||
CLanguageData lDatas[] = data.getType() == ICSettingBase.SETTING_FILE ?
|
CLanguageData lDatas[] = data.getType() == ICSettingBase.SETTING_FILE ?
|
||||||
new CLanguageData[]{((CFileData)data).getLanguageData()}
|
new CLanguageData[] { ((CFileData)data).getLanguageData() } :
|
||||||
: ((CFolderData)data).getLanguageDatas();
|
((CFolderData) data).getLanguageDatas();
|
||||||
|
|
||||||
for (CLanguageData lData : lDatas) {
|
for (CLanguageData lData : lDatas) {
|
||||||
if (lData == null)
|
if (lData == null)
|
||||||
|
@ -1704,7 +1696,7 @@ public class PathEntryTranslator {
|
||||||
ResourceInfo[] baseInfos = (ResourceInfo[])cr.getValue();
|
ResourceInfo[] baseInfos = (ResourceInfo[])cr.getValue();
|
||||||
ResourceInfo[] result;
|
ResourceInfo[] result;
|
||||||
if (!baseInfos[0].fExists) {
|
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);
|
ResourceInfo inexistent = new ResourceInfo(container.getFolder(path), false);
|
||||||
result = new ResourceInfo[]{inexistent};
|
result = new ResourceInfo[]{inexistent};
|
||||||
} else {
|
} else {
|
||||||
|
@ -2015,8 +2007,8 @@ public class PathEntryTranslator {
|
||||||
|
|
||||||
ReferenceSettingsInfo refInfo = new ReferenceSettingsInfo(des);
|
ReferenceSettingsInfo refInfo = new ReferenceSettingsInfo(des);
|
||||||
ICConfigurationDescription[] allCfgs = des.isPreferenceConfiguration() ?
|
ICConfigurationDescription[] allCfgs = des.isPreferenceConfiguration() ?
|
||||||
new ICConfigurationDescription[]{des}
|
new ICConfigurationDescription[] { des } :
|
||||||
: des.getProjectDescription().getConfigurations();
|
des.getProjectDescription().getConfigurations();
|
||||||
|
|
||||||
CConfigurationData[] allDatas = new CConfigurationData[allCfgs.length];
|
CConfigurationData[] allDatas = new CConfigurationData[allCfgs.length];
|
||||||
for (int i = 0; i < allCfgs.length; i++) {
|
for (int i = 0; i < allCfgs.length; i++) {
|
||||||
|
@ -2041,7 +2033,6 @@ public class PathEntryTranslator {
|
||||||
|
|
||||||
final int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
final int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
||||||
rcDatas.accept(new IPathSettingsContainerVisitor() {
|
rcDatas.accept(new IPathSettingsContainerVisitor() {
|
||||||
|
|
||||||
public boolean visit(PathSettingsContainer container) {
|
public boolean visit(PathSettingsContainer container) {
|
||||||
CResourceData data = (CResourceData)container.getValue();
|
CResourceData data = (CResourceData)container.getValue();
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
|
@ -2056,7 +2047,6 @@ public class PathEntryTranslator {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
return cr;
|
return cr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue