mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 04:35:45 +02:00
fix for the tool-chain modification functionality
This commit is contained in:
parent
e8919fce50
commit
c451af9174
5 changed files with 11 additions and 11 deletions
|
@ -192,9 +192,9 @@ public class ConfigurationModification extends FolderInfoModification implements
|
||||||
clearToolCompatibilityInfo();
|
clearToolCompatibilityInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setToolChain(IToolChain tc) {
|
public void setToolChain(IToolChain tc, boolean force) {
|
||||||
setBuilder(tc.getBuilder());
|
setBuilder(tc.getBuilder());
|
||||||
super.setToolChain(tc);
|
super.setToolChain(tc, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeProjectTools(ITool removeTool, ITool addTool) {
|
public void changeProjectTools(ITool removeTool, ITool addTool) {
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class FileInfoModification extends
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(add)
|
if(add && tool != null)
|
||||||
changeProjectTools(null, tool);
|
changeProjectTools(null, tool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,7 +194,7 @@ public class FolderInfoModification extends ToolListModification implements IFol
|
||||||
return fSelectedToolChain;
|
return fSelectedToolChain;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setToolChain(IToolChain tc){
|
public final void setToolChain(IToolChain tc){
|
||||||
setToolChain(tc, false);
|
setToolChain(tc, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,10 +389,6 @@ public class FolderInfoModification extends ToolListModification implements IFol
|
||||||
newTools[i] = (Tool)ManagedBuildManager.getRealTool(newTools[i]);
|
newTools[i] = (Tool)ManagedBuildManager.getRealTool(newTools[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < newTools.length; i++){
|
|
||||||
TcModificationUtil.addPaths(toolMap, newTools[i], tcApplicability.fFolderInfoPaths);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(Iterator iter = tcApplicability.fToolPathMap.entrySet().iterator(); iter.hasNext(); ){
|
for(Iterator iter = tcApplicability.fToolPathMap.entrySet().iterator(); iter.hasNext(); ){
|
||||||
Map.Entry entry = (Map.Entry)iter.next();
|
Map.Entry entry = (Map.Entry)iter.next();
|
||||||
Tool tool = (Tool)entry.getKey();
|
Tool tool = (Tool)entry.getKey();
|
||||||
|
@ -401,6 +397,10 @@ public class FolderInfoModification extends ToolListModification implements IFol
|
||||||
TcModificationUtil.removePaths(toolMap, tool, pathSet);
|
TcModificationUtil.removePaths(toolMap, tool, pathSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < newTools.length; i++){
|
||||||
|
TcModificationUtil.addPaths(toolMap, newTools[i], tcApplicability.fFolderInfoPaths);
|
||||||
|
}
|
||||||
|
|
||||||
if(tcApplicability.fFileInfoPaths.size() != 0){
|
if(tcApplicability.fFileInfoPaths.size() != 0){
|
||||||
FolderInfo foInfo = (FolderInfo)getResourceInfo();
|
FolderInfo foInfo = (FolderInfo)getResourceInfo();
|
||||||
IManagedProject mProj = foInfo.getParent().getManagedProject();
|
IManagedProject mProj = foInfo.getParent().getManagedProject();
|
||||||
|
|
|
@ -37,9 +37,9 @@ public class PerTypeSetStorage implements Cloneable {
|
||||||
clone.fStorage = (ObjectTypeBasedStorage)fStorage.clone();
|
clone.fStorage = (ObjectTypeBasedStorage)fStorage.clone();
|
||||||
int types[] = ObjectTypeBasedStorage.getSupportedObjectTypes();
|
int types[] = ObjectTypeBasedStorage.getSupportedObjectTypes();
|
||||||
for(int i = 0; i < types.length; i++){
|
for(int i = 0; i < types.length; i++){
|
||||||
Object o = clone.fStorage.get(i);
|
Object o = clone.fStorage.get(types[i]);
|
||||||
if(o != null){
|
if(o != null){
|
||||||
clone.fStorage.set(i, createSet((Set)o));
|
clone.fStorage.set(types[i], createSet((Set)o));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return clone;
|
return clone;
|
||||||
|
|
|
@ -201,7 +201,7 @@ public class TcModificationUtil {
|
||||||
PerTypeSetStorage initStorage = (PerTypeSetStorage)initialMap.remove(oPath);
|
PerTypeSetStorage initStorage = (PerTypeSetStorage)initialMap.remove(oPath);
|
||||||
PerTypeSetStorage storage;
|
PerTypeSetStorage storage;
|
||||||
|
|
||||||
if(initStorage == null && initStorage.isEmpty(true)){
|
if(initStorage == null || initStorage.isEmpty(true)){
|
||||||
if(resStorage != null && !resStorage.isEmpty(true)){
|
if(resStorage != null && !resStorage.isEmpty(true)){
|
||||||
storage = (PerTypeSetStorage)resStorage.clone();
|
storage = (PerTypeSetStorage)resStorage.clone();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue