mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 319512: Missing type arguments on managedbuilder.core
This commit is contained in:
parent
8fba5a99e5
commit
4212fa9054
1 changed files with 30 additions and 27 deletions
|
@ -251,9 +251,9 @@ public class ManagedBuildManager extends AbstractCExtension {
|
||||||
// Environment Build Paths Change Listener
|
// Environment Build Paths Change Listener
|
||||||
private static IEnvironmentBuildPathsChangeListener fEnvironmentBuildPathsChangeListener;
|
private static IEnvironmentBuildPathsChangeListener fEnvironmentBuildPathsChangeListener;
|
||||||
|
|
||||||
private static HashMap<String, List<IToolChain>> fSortedToolChains;
|
private static HashMap<MatchKey, List<ToolChain>> fSortedToolChains;
|
||||||
private static HashMap<String, List<ITool>> fSortedTools;
|
private static HashMap<MatchKey, List<Tool>> fSortedTools;
|
||||||
private static HashMap<String, List<IBuilder>> fSortedBuilders;
|
private static HashMap<MatchKey, List<Builder>> fSortedBuilders;
|
||||||
|
|
||||||
private static Map<IProject, IManagedBuildInfo> fInfoMap = new HashMap<IProject, IManagedBuildInfo>();
|
private static Map<IProject, IManagedBuildInfo> fInfoMap = new HashMap<IProject, IManagedBuildInfo>();
|
||||||
|
|
||||||
|
@ -4198,36 +4198,38 @@ public class ManagedBuildManager extends AbstractCExtension {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static HashMap<String, List<IToolChain>> getSortedToolChains(){
|
private static HashMap<MatchKey, List<ToolChain>> getSortedToolChains(){
|
||||||
if(fSortedToolChains == null){
|
if(fSortedToolChains == null){
|
||||||
fSortedToolChains = getSortedElements(ManagedBuildManager.getExtensionToolChainMap().values());
|
Collection<? extends ToolChain> toolChains = (Collection<? extends ToolChain>)ManagedBuildManager.getExtensionToolChainMap().values();
|
||||||
|
fSortedToolChains = (HashMap)getSortedElements(toolChains);
|
||||||
}
|
}
|
||||||
return fSortedToolChains;
|
return fSortedToolChains;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static HashMap<String, List<ITool>> getSortedTools(){
|
private static HashMap<MatchKey, List<Tool>> getSortedTools(){
|
||||||
if(fSortedTools == null){
|
if(fSortedTools == null){
|
||||||
fSortedTools = getSortedElements(ManagedBuildManager.getExtensionToolMap().values());
|
Collection<? extends Tool> tools = (Collection<? extends Tool>)ManagedBuildManager.getExtensionToolMap().values();
|
||||||
|
fSortedTools = (HashMap)getSortedElements(tools);
|
||||||
}
|
}
|
||||||
return fSortedTools;
|
return fSortedTools;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static HashMap<String, List<IBuilder>> getSortedBuilders(){
|
private static HashMap<MatchKey, List<Builder>> getSortedBuilders(){
|
||||||
if(fSortedBuilders == null){
|
if(fSortedBuilders == null){
|
||||||
fSortedBuilders = getSortedElements(ManagedBuildManager.getExtensionBuilderMap().values());
|
Collection<? extends Builder> builders = (Collection<? extends Builder>)ManagedBuildManager.getExtensionBuilderMap().values();
|
||||||
|
fSortedBuilders = (HashMap)getSortedElements(builders);
|
||||||
}
|
}
|
||||||
return fSortedBuilders;
|
return fSortedBuilders;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static HashMap getSortedElements(Collection elements){
|
private static HashMap<MatchKey, List> getSortedElements(Collection<? extends IMatchKeyProvider> elements){
|
||||||
HashMap map = new HashMap();
|
HashMap<MatchKey, List> map = new HashMap();
|
||||||
for(Iterator iter = elements.iterator(); iter.hasNext();){
|
for (IMatchKeyProvider p : elements) {
|
||||||
IMatchKeyProvider p = (IMatchKeyProvider)iter.next();
|
|
||||||
MatchKey key = p.getMatchKey();
|
MatchKey key = p.getMatchKey();
|
||||||
if(key == null)
|
if(key == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
List list = (List)map.get(key);
|
List list = map.get(key);
|
||||||
if(list == null){
|
if(list == null){
|
||||||
list = new ArrayList();
|
list = new ArrayList();
|
||||||
map.put(key, list);
|
map.put(key, list);
|
||||||
|
@ -4236,37 +4238,38 @@ public class ManagedBuildManager extends AbstractCExtension {
|
||||||
p.setIdenticalList(list);
|
p.setIdenticalList(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Iterator iter = map.values().iterator(); iter.hasNext();){
|
Collection<List> values = map.values();
|
||||||
Collections.sort((List)iter.next());
|
for (List list : values) {
|
||||||
|
Collections.sort(list);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IToolChain[] getRealToolChains(){
|
public static IToolChain[] getRealToolChains(){
|
||||||
HashMap<String, List<IToolChain>> map = getSortedToolChains();
|
HashMap<MatchKey, List<ToolChain>> map = getSortedToolChains();
|
||||||
IToolChain tcs[] = new ToolChain[map.size()];
|
IToolChain tcs[] = new ToolChain[map.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (List<IToolChain> list : map.values()) {
|
for (List<ToolChain> list : map.values()) {
|
||||||
tcs[i++] = list.get(0);
|
tcs[i++] = list.get(0);
|
||||||
}
|
}
|
||||||
return tcs;
|
return tcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ITool[] getRealTools(){
|
public static ITool[] getRealTools(){
|
||||||
HashMap<String, List<ITool>> map = getSortedTools();
|
HashMap<MatchKey, List<Tool>> map = getSortedTools();
|
||||||
Tool ts[] = new Tool[map.size()];
|
Tool ts[] = new Tool[map.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (List<ITool> list : map.values()) {
|
for (List<Tool> list : map.values()) {
|
||||||
ts[i++] = (Tool)list.get(0);
|
ts[i++] = list.get(0);
|
||||||
}
|
}
|
||||||
return ts;
|
return ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IBuilder[] getRealBuilders(){
|
public static IBuilder[] getRealBuilders(){
|
||||||
HashMap<String, List<IBuilder>> map = getSortedBuilders();
|
HashMap<MatchKey, List<Builder>> map = getSortedBuilders();
|
||||||
IBuilder bs[] = new Builder[map.size()];
|
IBuilder bs[] = new Builder[map.size()];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (List<IBuilder> list : map.values()) {
|
for (List<Builder> list : map.values()) {
|
||||||
bs[i++] = list.get(0);
|
bs[i++] = list.get(0);
|
||||||
}
|
}
|
||||||
return bs;
|
return bs;
|
||||||
|
@ -4380,9 +4383,9 @@ public class ManagedBuildManager extends AbstractCExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IToolChain[] getExtensionsToolChains(String propertyType, String propertyValue, boolean supportedPropsOnly){
|
public static IToolChain[] getExtensionsToolChains(String propertyType, String propertyValue, boolean supportedPropsOnly){
|
||||||
HashMap<String, List<IToolChain>> all = getSortedToolChains();
|
HashMap<MatchKey, List<ToolChain>> all = getSortedToolChains();
|
||||||
List<IToolChain> result = new ArrayList<IToolChain>();
|
List<IToolChain> result = new ArrayList<IToolChain>();
|
||||||
for (List<IToolChain> list : all.values()) {
|
for (List<ToolChain> list : all.values()) {
|
||||||
IToolChain tc = findToolChain(list, propertyType, propertyValue, supportedPropsOnly);
|
IToolChain tc = findToolChain(list, propertyType, propertyValue, supportedPropsOnly);
|
||||||
if(tc != null)
|
if(tc != null)
|
||||||
result.add(tc);
|
result.add(tc);
|
||||||
|
@ -4405,14 +4408,14 @@ public class ManagedBuildManager extends AbstractCExtension {
|
||||||
getSortedBuilders();
|
getSortedBuilders();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IToolChain findToolChain(List<IToolChain> list, String propertyType, String propertyValue, boolean supportedOnly){
|
private static IToolChain findToolChain(List<ToolChain> list, String propertyType, String propertyValue, boolean supportedOnly){
|
||||||
ToolChain bestMatch = null;
|
ToolChain bestMatch = null;
|
||||||
IConfiguration cfg = null;
|
IConfiguration cfg = null;
|
||||||
IProjectType type = null;
|
IProjectType type = null;
|
||||||
boolean valueSupported = false;
|
boolean valueSupported = false;
|
||||||
|
|
||||||
for(int i = 0; i < list.size(); i++){
|
for(int i = 0; i < list.size(); i++){
|
||||||
ToolChain tc = (ToolChain)list.get(i);
|
ToolChain tc = list.get(i);
|
||||||
if(tc.supportsValue(propertyType, propertyValue)){
|
if(tc.supportsValue(propertyType, propertyValue)){
|
||||||
valueSupported = true;
|
valueSupported = true;
|
||||||
} else if (valueSupported){
|
} else if (valueSupported){
|
||||||
|
|
Loading…
Add table
Reference in a new issue