mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 00:36:16 +02:00
bug 319512: Missing type arguments on managedbuilder.core
This commit is contained in:
parent
7c70ab5b89
commit
2bb0e9a6a5
7 changed files with 43 additions and 43 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(){
|
||||
|
|
|
@ -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)){
|
||||
|
|
|
@ -931,7 +931,7 @@ public class ToolReference implements IToolReference {
|
|||
public void setErrorParserIds(String ids) {
|
||||
}
|
||||
|
||||
public List getInterfaceExtensions() {
|
||||
public List<String> getInterfaceExtensions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue