mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
bug 319512: compilation warnings
This commit is contained in:
parent
007e46e51f
commit
5a1885c1a6
3 changed files with 50 additions and 50 deletions
|
@ -23,13 +23,13 @@ import org.eclipse.cdt.utils.cdtvariables.IVariableContextInfo;
|
|||
import org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor;
|
||||
|
||||
public class BuildSystemSpecificVariableSubstitutor extends SupplierBasedCdtVariableSubstitutor{
|
||||
private static final Set fFileVarsSet = new HashSet(Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_FILE)));
|
||||
private static final Set fOptionVarsSet = new HashSet(Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_OPTION)));
|
||||
private static final Set fToolVarsSet = new HashSet(Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_TOOL)));
|
||||
private static final Set<String> fFileVarsSet = new HashSet<String>(Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_FILE)));
|
||||
private static final Set<String> fOptionVarsSet = new HashSet<String>(Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_OPTION)));
|
||||
private static final Set<String> fToolVarsSet = new HashSet<String>(Arrays.asList(MbsMacroSupplier.getInstance().getMacroNames(IBuildMacroProvider.CONTEXT_TOOL)));
|
||||
|
||||
public BuildSystemSpecificVariableSubstitutor(
|
||||
IVariableContextInfo contextInfo, String inexistentMacroValue,
|
||||
String listDelimiter, Map delimiterMap,
|
||||
String listDelimiter, Map<String, String> delimiterMap,
|
||||
String incorrectlyReferencedMacroValue) {
|
||||
super(contextInfo, inexistentMacroValue, listDelimiter, delimiterMap,
|
||||
incorrectlyReferencedMacroValue);
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.managedbuilder.internal.dataprovider;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext;
|
||||
import org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager;
|
||||
|
@ -100,26 +100,26 @@ public class ProfileInfoProvider {
|
|||
return new ICLanguageSettingEntry[0];
|
||||
}
|
||||
|
||||
private ICLanguageSettingEntry[] calculateEntries(int kind, int flags, Map map){
|
||||
private ICLanguageSettingEntry[] calculateEntries(int kind, int flags, Map<String, String> map){
|
||||
ICLanguageSettingEntry entries[] = new ICLanguageSettingEntry[map.size()];
|
||||
int num = 0;
|
||||
for(Iterator iter = map.entrySet().iterator(); iter.hasNext();){
|
||||
Map.Entry entry = (Map.Entry)iter.next();
|
||||
String name = (String)entry.getKey();
|
||||
String value = (String)entry.getValue();
|
||||
Set<Entry<String, String>> entrySet = map.entrySet();
|
||||
for (Entry<String, String> entry : entrySet) {
|
||||
String name = entry.getKey();
|
||||
String value = entry.getValue();
|
||||
entries[num++] = (ICLanguageSettingEntry)CDataUtil.createEntry(kind, name, value, null, flags);
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
private ICLanguageSettingEntry[] calculateEntries(int kind, int flags, String[] values){
|
||||
ICLanguageSettingEntry entries[] = new ICLanguageSettingEntry[values.length];
|
||||
for(int i = 0; i < values.length; i++){
|
||||
String name = values[i];
|
||||
entries[i] = (ICLanguageSettingEntry)CDataUtil.createEntry(kind, name, null, null, flags);
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
// private ICLanguageSettingEntry[] calculateEntries(int kind, int flags, String[] values){
|
||||
// ICLanguageSettingEntry entries[] = new ICLanguageSettingEntry[values.length];
|
||||
// for(int i = 0; i < values.length; i++){
|
||||
// String name = values[i];
|
||||
// entries[i] = (ICLanguageSettingEntry)CDataUtil.createEntry(kind, name, null, null, flags);
|
||||
// }
|
||||
// return entries;
|
||||
// }
|
||||
|
||||
private ICLanguageSettingEntry[] calculateEntries(int kind, int flags, IPath[] values){
|
||||
ICLanguageSettingEntry entries[] = new ICLanguageSettingEntry[values.length];
|
||||
|
@ -130,13 +130,13 @@ public class ProfileInfoProvider {
|
|||
return entries;
|
||||
}
|
||||
|
||||
private ICLanguageSettingEntry[] calculateEntries(int kind, int flags, List list){
|
||||
ICLanguageSettingEntry entries[] = new ICLanguageSettingEntry[list.size()];
|
||||
int num = 0;
|
||||
for(Iterator iter = list.iterator(); iter.hasNext();){
|
||||
String name = (String)iter.next();
|
||||
entries[num++] = (ICLanguageSettingEntry)CDataUtil.createEntry(kind, name, null, null, flags);
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
// private ICLanguageSettingEntry[] calculateEntries(int kind, int flags, List list){
|
||||
// ICLanguageSettingEntry entries[] = new ICLanguageSettingEntry[list.size()];
|
||||
// int num = 0;
|
||||
// for(Iterator iter = list.iterator(); iter.hasNext();){
|
||||
// String name = (String)iter.next();
|
||||
// entries[num++] = (ICLanguageSettingEntry)CDataUtil.createEntry(kind, name, null, null, flags);
|
||||
// }
|
||||
// return entries;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
return false;
|
||||
|
||||
IProjectDescription eDes = project.getDescription();
|
||||
Set natureSet = new HashSet(Arrays.asList(eDes.getNatureIds()));
|
||||
Set<String> natureSet = new HashSet<String>(Arrays.asList(eDes.getNatureIds()));
|
||||
if(natureSet.contains(OLD_MAKE_NATURE_ID))
|
||||
return true;
|
||||
|
||||
|
@ -112,7 +112,7 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
|
||||
public ICProjectDescription convertProject(IProject project, IProjectDescription eDes, String oldOwnerId, ICProjectDescription oldDes)
|
||||
throws CoreException {
|
||||
Set natureSet = new HashSet(Arrays.asList(eDes.getNatureIds()));
|
||||
Set<String> natureSet = new HashSet<String>(Arrays.asList(eDes.getNatureIds()));
|
||||
CoreModel model = CoreModel.getDefault();
|
||||
ICProjectDescription newDes = null;
|
||||
IManagedBuildInfo info = null;
|
||||
|
@ -161,14 +161,14 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
changeEDes = true;
|
||||
|
||||
if(changeEDes)
|
||||
eDes.setNatureIds((String[])natureSet.toArray(new String[natureSet.size()]));
|
||||
eDes.setNatureIds(natureSet.toArray(new String[natureSet.size()]));
|
||||
|
||||
changeEDes = false;
|
||||
ICommand[] cmds = eDes.getBuildSpec();
|
||||
List list = new ArrayList(Arrays.asList(cmds));
|
||||
List<ICommand> list = new ArrayList<ICommand>(Arrays.asList(cmds));
|
||||
ICommand makeBuilderCmd = null;
|
||||
for(Iterator iter = list.iterator(); iter.hasNext();){
|
||||
ICommand cmd = (ICommand)iter.next();
|
||||
for(Iterator<ICommand> iter = list.iterator(); iter.hasNext();){
|
||||
ICommand cmd = iter.next();
|
||||
if(OLD_MAKE_BUILDER_ID.equals(cmd.getBuilderName())){
|
||||
makeBuilderCmd = cmd;
|
||||
iter.remove();
|
||||
|
@ -220,7 +220,7 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
// }
|
||||
|
||||
if(changeEDes){
|
||||
cmds = (ICommand[])list.toArray(new ICommand[list.size()]);
|
||||
cmds = list.toArray(new ICommand[list.size()]);
|
||||
eDes.setBuildSpec(cmds);
|
||||
}
|
||||
|
||||
|
@ -346,9 +346,9 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
toTarget.setBuildAttribute(IMakeTarget.BUILD_ARGUMENTS, fromTarget.getBuildAttribute(IMakeTarget.BUILD_ARGUMENTS, null));
|
||||
toTarget.setBuildAttribute(IMakeTarget.BUILD_TARGET, fromTarget.getBuildAttribute(IMakeTarget.BUILD_TARGET, null));
|
||||
|
||||
Map fromMap = fromTarget.getEnvironment();
|
||||
Map<String, String> fromMap = fromTarget.getEnvironment();
|
||||
if(fromMap != null)
|
||||
toTarget.setEnvironment(new HashMap(fromMap));
|
||||
toTarget.setEnvironment(new HashMap<String, String>(fromMap));
|
||||
|
||||
// toTarget.setErrorParsers(fromTarget.getErrorParsers());
|
||||
|
||||
|
@ -368,9 +368,9 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
if(el != null){
|
||||
IPathEntry[] entries = PathEntryTranslator.decodePathEntries(project, el);
|
||||
if(entries.length != 0){
|
||||
List list = new ArrayList(Arrays.asList(entries));
|
||||
for(Iterator iter = list.iterator(); iter.hasNext();){
|
||||
IPathEntry entry = (IPathEntry)iter.next();
|
||||
List<IPathEntry> list = new ArrayList<IPathEntry>(Arrays.asList(entries));
|
||||
for(Iterator<IPathEntry> iter = list.iterator(); iter.hasNext();){
|
||||
IPathEntry entry = iter.next();
|
||||
if(entry.getEntryKind() == IPathEntry.CDT_CONTAINER){
|
||||
iter.remove();
|
||||
continue;
|
||||
|
@ -379,7 +379,7 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
|
||||
if(list.size() != 0){
|
||||
PathEntryTranslator tr = new PathEntryTranslator(project, data);
|
||||
entries = (IPathEntry[])list.toArray(new IPathEntry[list.size()]);
|
||||
entries = list.toArray(new IPathEntry[list.size()]);
|
||||
ReferenceSettingsInfo refInfo = tr.applyPathEntries(entries, null, PathEntryTranslator.OP_REPLACE);
|
||||
ICExternalSetting extSettings[] = refInfo.getExternalSettings();
|
||||
des.removeExternalSettings();
|
||||
|
@ -396,7 +396,7 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
|
||||
IPath projPaths[] = refInfo.getReferencedProjectsPaths();
|
||||
if(projPaths.length != 0){
|
||||
Map map = new HashMap(projPaths.length);
|
||||
Map<String, String> map = new HashMap<String, String>(projPaths.length);
|
||||
for(int i = 0; i < projPaths.length; i++){
|
||||
map.put(projPaths[i].segment(0), ""); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -411,13 +411,13 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
}
|
||||
}
|
||||
|
||||
private String[] idsFromRefs(ICConfigExtensionReference refs[]){
|
||||
String ids[] = new String[refs.length];
|
||||
for(int i = 0; i < ids.length; i++){
|
||||
ids[i] = refs[i].getID();
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
// private String[] idsFromRefs(ICConfigExtensionReference refs[]){
|
||||
// String ids[] = new String[refs.length];
|
||||
// for(int i = 0; i < ids.length; i++){
|
||||
// ids[i] = refs[i].getID();
|
||||
// }
|
||||
// return ids;
|
||||
// }
|
||||
|
||||
// private void loadDiscoveryOptions(ICConfigurationDescription des, IConfiguration cfg){
|
||||
// try {
|
||||
|
@ -496,7 +496,7 @@ public class ProjectConverter implements ICProjectConverter {
|
|||
|
||||
final IProjectDescription eDes = project.getDescription();
|
||||
String natureIds[] = eDes.getNatureIds();
|
||||
Set set = new HashSet(Arrays.asList(natureIds));
|
||||
Set<String> set = new HashSet<String>(Arrays.asList(natureIds));
|
||||
if(!set.contains(OLD_MAKE_NATURE_ID)){
|
||||
if(throwExceptions)
|
||||
throw new CoreException(new Status(IStatus.ERROR,
|
||||
|
|
Loading…
Add table
Reference in a new issue