mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +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 given value is not supported
|
||||||
* If Value is not null then the fiven property 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 given value is not supported
|
||||||
* If Value is not null then the fiven property 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
|
* @return Set containing undefined property IDs
|
||||||
*/
|
*/
|
||||||
Set getUndefinedProperties();
|
Set<String> getUndefinedProperties();
|
||||||
|
|
||||||
ITool[][] getToolsConflicts();
|
ITool[][] getToolsConflicts();
|
||||||
|
|
||||||
|
|
|
@ -57,10 +57,10 @@ public class ManagedCProjectNature implements IProjectNature {
|
||||||
ICommand command = commands[i];
|
ICommand command = commands[i];
|
||||||
if (command.getBuilderName().equals("org.eclipse.cdt.core.cbuilder")) { //$NON-NLS-1$
|
if (command.getBuilderName().equals("org.eclipse.cdt.core.cbuilder")) { //$NON-NLS-1$
|
||||||
// Remove the command
|
// Remove the command
|
||||||
Vector vec = new Vector(Arrays.asList(commands));
|
Vector<ICommand> vec = new Vector<ICommand>(Arrays.asList(commands));
|
||||||
vec.removeElementAt(i);
|
vec.removeElementAt(i);
|
||||||
vec.trimToSize();
|
vec.trimToSize();
|
||||||
ICommand[] tempCommands = (ICommand[]) vec.toArray(new ICommand[commands.length-1]);
|
ICommand[] tempCommands = vec.toArray(new ICommand[commands.length-1]);
|
||||||
description.setBuildSpec(tempCommands);
|
description.setBuildSpec(tempCommands);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -206,9 +206,9 @@ public class ManagedCProjectNature implements IProjectNature {
|
||||||
public static void removeNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
|
public static void removeNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
|
||||||
IProjectDescription description = project.getDescription();
|
IProjectDescription description = project.getDescription();
|
||||||
String[] prevNatures = description.getNatureIds();
|
String[] prevNatures = description.getNatureIds();
|
||||||
List newNatures = new ArrayList(Arrays.asList(prevNatures));
|
List<String> newNatures = new ArrayList<String>(Arrays.asList(prevNatures));
|
||||||
newNatures.remove(natureId);
|
newNatures.remove(natureId);
|
||||||
description.setNatureIds((String[])newNatures.toArray(new String[newNatures.size()]));
|
description.setNatureIds(newNatures.toArray(new String[newNatures.size()]));
|
||||||
project.setDescription(description, monitor);
|
project.setDescription(description, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,13 +95,12 @@ public class ManagedOptionValueHandler implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler#isDefaultValue(IConfiguration,IToolChain,IOption,String)
|
* @see org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler#isDefaultValue(IConfiguration,IToolChain,IOption,String)
|
||||||
*/
|
*/
|
||||||
public boolean isDefaultValue(IBuildObject configuration,
|
public boolean isDefaultValue(IBuildObject configuration, IHoldsOptions holder, IOption option, String extraArgument) {
|
||||||
IHoldsOptions holder,
|
|
||||||
IOption option, String extraArgument) {
|
|
||||||
// Get the default Value
|
// Get the default Value
|
||||||
Object defaultValue = option.getDefaultValue();
|
Object defaultValue = option.getDefaultValue();
|
||||||
if(defaultValue instanceof List){
|
if (defaultValue instanceof List) {
|
||||||
List list = (List)defaultValue;
|
@SuppressWarnings("unchecked")
|
||||||
|
List<String> list = (List<String>) defaultValue;
|
||||||
defaultValue = list.toArray(new String[list.size()]);
|
defaultValue = list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ package org.eclipse.cdt.managedbuilder.core;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCProjectNature;
|
import org.eclipse.cdt.core.CCProjectNature;
|
||||||
|
@ -105,9 +104,9 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Visitor implements IResourceDeltaVisitor {
|
private static class Visitor implements IResourceDeltaVisitor {
|
||||||
private Set fProjSet;
|
private Set<IProject> fProjSet;
|
||||||
|
|
||||||
Visitor(Set projSet){
|
Visitor(Set<IProject> projSet){
|
||||||
fProjSet = projSet;
|
fProjSet = projSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +128,7 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{
|
||||||
String cachedIds[] = ConfigurationDataProvider.getNaturesIdsUsedOnCache(cfgs[i]);
|
String cachedIds[] = ConfigurationDataProvider.getNaturesIdsUsedOnCache(cfgs[i]);
|
||||||
if(checkNaturesNeedUpdate(cachedIds, natureIds)){
|
if(checkNaturesNeedUpdate(cachedIds, natureIds)){
|
||||||
if(fProjSet == null)
|
if(fProjSet == null)
|
||||||
fProjSet = new HashSet();
|
fProjSet = new HashSet<IProject>();
|
||||||
|
|
||||||
fProjSet.add(project);
|
fProjSet.add(project);
|
||||||
break;
|
break;
|
||||||
|
@ -143,7 +142,7 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Set getProjSet(){
|
Set<IProject> getProjSet(){
|
||||||
return fProjSet;
|
return fProjSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,9 +152,9 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{
|
||||||
if(oldIds == null)
|
if(oldIds == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Set oldSet = new HashSet(Arrays.asList(oldIds));
|
Set<String> oldSet = new HashSet<String>(Arrays.asList(oldIds));
|
||||||
Set oldSetCopy = new HashSet(oldSet);
|
Set<String> oldSetCopy = new HashSet<String>(oldSet);
|
||||||
Set newSet = new HashSet(Arrays.asList(newIds));
|
Set<String> newSet = new HashSet<String>(Arrays.asList(newIds));
|
||||||
oldSet.removeAll(newSet);
|
oldSet.removeAll(newSet);
|
||||||
newSet.removeAll(oldSetCopy);
|
newSet.removeAll(oldSetCopy);
|
||||||
if(oldSet.contains(CProjectNature.C_NATURE_ID)
|
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)
|
if(projSet == null || projSet.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -197,8 +196,7 @@ class ResourceChangeHandler2 extends ResourceChangeHandlerBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
for(Iterator iter = projSet.iterator(); iter.hasNext();){
|
for (IProject project : projSet) {
|
||||||
IProject project = (IProject)iter.next();
|
|
||||||
try {
|
try {
|
||||||
ManagedBuildManager.updateCoreSettings(project);
|
ManagedBuildManager.updateCoreSettings(project);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
|
|
@ -22,9 +22,9 @@ import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
|
||||||
public class ModificationStatus extends Status implements IModificationStatus {
|
public class ModificationStatus extends Status implements IModificationStatus {
|
||||||
private HashMap fUnsupportedProperties = new HashMap();
|
private HashMap<String, String> fUnsupportedProperties = new HashMap<String, String>();
|
||||||
private HashMap fUnsupportedRequiredProperties = new HashMap();
|
private HashMap<String, String> fUnsupportedRequiredProperties = new HashMap<String, String>();
|
||||||
private HashSet fUndefinedProperties = new HashSet();
|
private HashSet<String> fUndefinedProperties = new HashSet<String>();
|
||||||
private ITool[][] fToolConflicts;
|
private ITool[][] fToolConflicts;
|
||||||
private ITool[] fNonManagedBuildTools;
|
private ITool[] fNonManagedBuildTools;
|
||||||
|
|
||||||
|
@ -44,9 +44,9 @@ public class ModificationStatus extends Status implements IModificationStatus {
|
||||||
fNonManagedBuildTools = new ITool[0];
|
fNonManagedBuildTools = new ITool[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
ModificationStatus(Map unsupportedRequiredProps,
|
ModificationStatus(Map<String, String> unsupportedRequiredProps,
|
||||||
Map unsupportedProps,
|
Map<String, String> unsupportedProps,
|
||||||
Set undefinedProps,
|
Set<String> undefinedProps,
|
||||||
ITool[][] conflicts,
|
ITool[][] conflicts,
|
||||||
ITool nonMbsTools[]){
|
ITool nonMbsTools[]){
|
||||||
super(IStatus.OK, ManagedBuilderCorePlugin.getUniqueIdentifier(), ""); //$NON-NLS-1$
|
super(IStatus.OK, ManagedBuilderCorePlugin.getUniqueIdentifier(), ""); //$NON-NLS-1$
|
||||||
|
@ -104,16 +104,19 @@ public class ModificationStatus extends Status implements IModificationStatus {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map getUnsupportedProperties(){
|
@SuppressWarnings("unchecked")
|
||||||
return (HashMap)fUnsupportedProperties.clone();
|
public Map<String, String> getUnsupportedProperties(){
|
||||||
|
return (HashMap<String, String>)fUnsupportedProperties.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map getUnsupportedRequiredProperties(){
|
@SuppressWarnings("unchecked")
|
||||||
return (HashMap)fUnsupportedRequiredProperties.clone();
|
public Map<String, String> getUnsupportedRequiredProperties(){
|
||||||
|
return (HashMap<String, String>)fUnsupportedRequiredProperties.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set getUndefinedProperties(){
|
@SuppressWarnings("unchecked")
|
||||||
return (HashSet)fUndefinedProperties.clone();
|
public Set<String> getUndefinedProperties(){
|
||||||
|
return (HashSet<String>)fUndefinedProperties.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITool[][] getToolsConflicts(){
|
public ITool[][] getToolsConflicts(){
|
||||||
|
|
|
@ -108,9 +108,9 @@ public class ToolListModificationInfo {
|
||||||
ToolInfo[][] conflictInfos = calculateConflictingTools(fResultingTools);
|
ToolInfo[][] conflictInfos = calculateConflictingTools(fResultingTools);
|
||||||
ITool[][] conflicting = toToolArray(conflictInfos, true);
|
ITool[][] conflicting = toToolArray(conflictInfos, true);
|
||||||
|
|
||||||
Map unspecifiedRequiredProps = new HashMap();
|
Map<String, String> unspecifiedRequiredProps = new HashMap<String, String>();
|
||||||
Map unspecifiedProps = new HashMap();
|
Map<String, String> unspecifiedProps = new HashMap<String, String>();
|
||||||
Set undefinedSet = new HashSet();
|
Set<String> undefinedSet = new HashSet<String>();
|
||||||
IConfiguration cfg = fRcInfo.getParent();
|
IConfiguration cfg = fRcInfo.getParent();
|
||||||
ITool[] nonManagedTools = null;
|
ITool[] nonManagedTools = null;
|
||||||
if(cfg.isManagedBuildOn() && cfg.supportsBuild(true)){
|
if(cfg.isManagedBuildOn() && cfg.supportsBuild(true)){
|
||||||
|
|
|
@ -931,7 +931,7 @@ public class ToolReference implements IToolReference {
|
||||||
public void setErrorParserIds(String ids) {
|
public void setErrorParserIds(String ids) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List getInterfaceExtensions() {
|
public List<String> getInterfaceExtensions() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue