diff options
author | Andrew Gvozdev | 2011-01-03 21:28:05 +0000 |
---|---|---|
committer | Andrew Gvozdev | 2011-01-03 21:28:05 +0000 |
commit | 2bb0e9a6a5a1ed4ee28df23625c6f5f008ba977b (patch) | |
tree | cd5c70d13c90d4f314b1467806add98a5f9a3739 /build/org.eclipse.cdt.managedbuilder.core | |
parent | 7c70ab5b89b83b42c16150df7b2b64567a3e9b7f (diff) | |
download | org.eclipse.cdt-2bb0e9a6a5a1ed4ee28df23625c6f5f008ba977b.tar.gz org.eclipse.cdt-2bb0e9a6a5a1ed4ee28df23625c6f5f008ba977b.tar.xz org.eclipse.cdt-2bb0e9a6a5a1ed4ee28df23625c6f5f008ba977b.zip |
bug 319512: Missing type arguments on managedbuilder.core
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core')
7 files changed, 43 insertions, 43 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IModificationStatus.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IModificationStatus.java index 83bb52985e9..61445971655 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IModificationStatus.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IModificationStatus.java @@ -45,7 +45,7 @@ public interface IModificationStatus extends IStatus { * If value is not null then the given value is not supported * If Value is not null then the fiven property is not supported */ - Map getUnsupportedProperties(); + Map<String, String> getUnsupportedProperties(); /** * @@ -53,13 +53,13 @@ public interface IModificationStatus extends IStatus { * If value is not null then the given value is not supported * If Value is not null then the fiven property is not supported */ - Map getUnsupportedRequiredProperties(); + Map<String, String> getUnsupportedRequiredProperties(); /** * * @return Set containing undefined property IDs */ - Set getUndefinedProperties(); + Set<String> getUndefinedProperties(); ITool[][] getToolsConflicts(); diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java index aa59e81c128..49bd9fcd744 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java @@ -57,10 +57,10 @@ public class ManagedCProjectNature implements IProjectNature { ICommand command = commands[i]; if (command.getBuilderName().equals("org.eclipse.cdt.core.cbuilder")) { //$NON-NLS-1$ // Remove the command - Vector vec = new Vector(Arrays.asList(commands)); + Vector<ICommand> vec = new Vector<ICommand>(Arrays.asList(commands)); vec.removeElementAt(i); vec.trimToSize(); - ICommand[] tempCommands = (ICommand[]) vec.toArray(new ICommand[commands.length-1]); + ICommand[] tempCommands = vec.toArray(new ICommand[commands.length-1]); description.setBuildSpec(tempCommands); break; } @@ -206,9 +206,9 @@ public class ManagedCProjectNature implements IProjectNature { public static void removeNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException { IProjectDescription description = project.getDescription(); String[] prevNatures = description.getNatureIds(); - List newNatures = new ArrayList(Arrays.asList(prevNatures)); + List<String> newNatures = new ArrayList<String>(Arrays.asList(prevNatures)); newNatures.remove(natureId); - description.setNatureIds((String[])newNatures.toArray(new String[newNatures.size()])); + description.setNatureIds(newNatures.toArray(new String[newNatures.size()])); project.setDescription(description, monitor); } diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedOptionValueHandler.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedOptionValueHandler.java index 18ec6953b56..d1d2a261615 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedOptionValueHandler.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedOptionValueHandler.java @@ -95,16 +95,15 @@ public class ManagedOptionValueHandler implements /* (non-Javadoc) * @see org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler#isDefaultValue(IConfiguration,IToolChain,IOption,String) */ - public boolean isDefaultValue(IBuildObject configuration, - IHoldsOptions holder, - IOption option, String extraArgument) { + public boolean isDefaultValue(IBuildObject configuration, IHoldsOptions holder, IOption option, String extraArgument) { // Get the default Value - Object defaultValue = option.getDefaultValue(); - if(defaultValue instanceof List){ - List list = (List)defaultValue; - defaultValue = list.toArray(new String[list.size()]); - } - + Object defaultValue = option.getDefaultValue(); + if (defaultValue instanceof List) { + @SuppressWarnings("unchecked") + List<String> list = (List<String>) defaultValue; + defaultValue = list.toArray(new String[list.size()]); + } + try { // Figure out which type the option is and implement default behaviour for it. switch (option.getValueType()) { diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java index d0f117e9570..c4197fcf38e 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ResourceChangeHandler2.java @@ -12,7 +12,6 @@ package org.eclipse.cdt.managedbuilder.core; import java.util.Arrays; import java.util.HashSet; -import java.util.Iterator; import java.util.Set; import org.eclipse.cdt.core.CCProjectNature; @@ -105,9 +104,9 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{ } private static class Visitor implements IResourceDeltaVisitor { - private Set fProjSet; + private Set<IProject> fProjSet; - Visitor(Set projSet){ + Visitor(Set<IProject> projSet){ fProjSet = projSet; } @@ -129,7 +128,7 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{ String cachedIds[] = ConfigurationDataProvider.getNaturesIdsUsedOnCache(cfgs[i]); if(checkNaturesNeedUpdate(cachedIds, natureIds)){ if(fProjSet == null) - fProjSet = new HashSet(); + fProjSet = new HashSet<IProject>(); fProjSet.add(project); break; @@ -143,7 +142,7 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{ } } - Set getProjSet(){ + Set<IProject> getProjSet(){ return fProjSet; } @@ -153,9 +152,9 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{ if(oldIds == null) return true; - Set oldSet = new HashSet(Arrays.asList(oldIds)); - Set oldSetCopy = new HashSet(oldSet); - Set newSet = new HashSet(Arrays.asList(newIds)); + Set<String> oldSet = new HashSet<String>(Arrays.asList(oldIds)); + Set<String> oldSetCopy = new HashSet<String>(oldSet); + Set<String> newSet = new HashSet<String>(Arrays.asList(newIds)); oldSet.removeAll(newSet); newSet.removeAll(oldSetCopy); if(oldSet.contains(CProjectNature.C_NATURE_ID) @@ -186,7 +185,7 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{ } } - private void postProcess(final Set projSet){ + private void postProcess(final Set<IProject> projSet){ if(projSet == null || projSet.size() == 0) return; @@ -197,8 +196,7 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{ @Override protected IStatus run(IProgressMonitor monitor) { - for(Iterator iter = projSet.iterator(); iter.hasNext();){ - IProject project = (IProject)iter.next(); + for (IProject project : projSet) { try { ManagedBuildManager.updateCoreSettings(project); } catch (CoreException e) { diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java index 0c777c39068..c1aefe518ac 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ModificationStatus.java @@ -22,9 +22,9 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; public class ModificationStatus extends Status implements IModificationStatus { - private HashMap fUnsupportedProperties = new HashMap(); - private HashMap fUnsupportedRequiredProperties = new HashMap(); - private HashSet fUndefinedProperties = new HashSet(); + private HashMap<String, String> fUnsupportedProperties = new HashMap<String, String>(); + private HashMap<String, String> fUnsupportedRequiredProperties = new HashMap<String, String>(); + private HashSet<String> fUndefinedProperties = new HashSet<String>(); private ITool[][] fToolConflicts; private ITool[] fNonManagedBuildTools; @@ -44,9 +44,9 @@ public class ModificationStatus extends Status implements IModificationStatus { fNonManagedBuildTools = new ITool[0]; } - ModificationStatus(Map unsupportedRequiredProps, - Map unsupportedProps, - Set undefinedProps, + ModificationStatus(Map<String, String> unsupportedRequiredProps, + Map<String, String> unsupportedProps, + Set<String> undefinedProps, ITool[][] conflicts, ITool nonMbsTools[]){ super(IStatus.OK, ManagedBuilderCorePlugin.getUniqueIdentifier(), ""); //$NON-NLS-1$ @@ -104,16 +104,19 @@ public class ModificationStatus extends Status implements IModificationStatus { } - public Map getUnsupportedProperties(){ - return (HashMap)fUnsupportedProperties.clone(); + @SuppressWarnings("unchecked") + public Map<String, String> getUnsupportedProperties(){ + return (HashMap<String, String>)fUnsupportedProperties.clone(); } - public Map getUnsupportedRequiredProperties(){ - return (HashMap)fUnsupportedRequiredProperties.clone(); + @SuppressWarnings("unchecked") + public Map<String, String> getUnsupportedRequiredProperties(){ + return (HashMap<String, String>)fUnsupportedRequiredProperties.clone(); } - public Set getUndefinedProperties(){ - return (HashSet)fUndefinedProperties.clone(); + @SuppressWarnings("unchecked") + public Set<String> getUndefinedProperties(){ + return (HashSet<String>)fUndefinedProperties.clone(); } public ITool[][] getToolsConflicts(){ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java index e3248264a06..b1977c172a4 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolListModificationInfo.java @@ -108,9 +108,9 @@ public class ToolListModificationInfo { ToolInfo[][] conflictInfos = calculateConflictingTools(fResultingTools); ITool[][] conflicting = toToolArray(conflictInfos, true); - Map unspecifiedRequiredProps = new HashMap(); - Map unspecifiedProps = new HashMap(); - Set undefinedSet = new HashSet(); + Map<String, String> unspecifiedRequiredProps = new HashMap<String, String>(); + Map<String, String> unspecifiedProps = new HashMap<String, String>(); + Set<String> undefinedSet = new HashSet<String>(); IConfiguration cfg = fRcInfo.getParent(); ITool[] nonManagedTools = null; if(cfg.isManagedBuildOn() && cfg.supportsBuild(true)){ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java index 013f932cddd..5aef81111c4 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java @@ -931,7 +931,7 @@ public class ToolReference implements IToolReference { public void setErrorParserIds(String ids) { } - public List getInterfaceExtensions() { + public List<String> getInterfaceExtensions() { return null; } |