mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
bug 319512: Missing type arguments on managedbuilder.core
This commit is contained in:
parent
6cfbdd8726
commit
2b31fd592f
6 changed files with 47 additions and 51 deletions
|
@ -76,9 +76,12 @@ public class ScannerConfigBuilder extends ACBuilder {
|
||||||
* @see IncrementalProjectBuilder#build
|
* @see IncrementalProjectBuilder#build
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected IProject [] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
|
protected IProject [] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor) throws CoreException {
|
||||||
if (DEBUG_EVENTS)
|
if (DEBUG_EVENTS) {
|
||||||
printEvent(kind, args);
|
@SuppressWarnings("unchecked")
|
||||||
|
Map<String, String> argsMap = args;
|
||||||
|
printEvent(kind, argsMap);
|
||||||
|
}
|
||||||
|
|
||||||
// If auto discovery is disabled, do nothing
|
// If auto discovery is disabled, do nothing
|
||||||
// boolean autodiscoveryEnabled;
|
// boolean autodiscoveryEnabled;
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
((FolderInfo)cInfo.fLoadContext.getConfiguration().getRootFolderInfo()).setContainsDiscoveredScannerInfo(true);
|
((FolderInfo)cInfo.fLoadContext.getConfiguration().getRootFolderInfo()).setContainsDiscoveredScannerInfo(true);
|
||||||
Map map = baseInfo.getSymbols();
|
Map<String, String> map = baseInfo.getSymbols();
|
||||||
IPath paths[] = baseInfo.getIncludePaths();
|
IPath paths[] = baseInfo.getIncludePaths();
|
||||||
|
|
||||||
PathInfo info = new PathInfo(paths, null, map, null, null);
|
PathInfo info = new PathInfo(paths, null, map, null, null);
|
||||||
|
@ -214,7 +214,7 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
|
||||||
IRcSettingInfo[] rcInfos = calculator.getSettingInfos(cInfo.fLoadContext.getConfiguration().getOwner().getProject(), data, info, true);
|
IRcSettingInfo[] rcInfos = calculator.getSettingInfos(cInfo.fLoadContext.getConfiguration().getOwner().getProject(), data, info, true);
|
||||||
|
|
||||||
CResourceData rcDatas[] = data.getResourceDatas();
|
CResourceData rcDatas[] = data.getResourceDatas();
|
||||||
Map rcDataMap = new HashMap();
|
Map<IPath, CResourceData> rcDataMap = new HashMap<IPath, CResourceData>();
|
||||||
CResourceData rcData;
|
CResourceData rcData;
|
||||||
for(int i = 0; i < rcDatas.length; i++){
|
for(int i = 0; i < rcDatas.length; i++){
|
||||||
rcData = rcDatas[i];
|
rcData = rcDatas[i];
|
||||||
|
@ -243,8 +243,8 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
|
||||||
|
|
||||||
if(!rcDataMap.isEmpty()){
|
if(!rcDataMap.isEmpty()){
|
||||||
CResourceData tmpRcData;
|
CResourceData tmpRcData;
|
||||||
for(Iterator iter = rcDataMap.values().iterator(); iter.hasNext();){
|
for(Iterator<CResourceData> iter = rcDataMap.values().iterator(); iter.hasNext();){
|
||||||
tmpRcData = (CResourceData)iter.next();
|
tmpRcData = iter.next();
|
||||||
if(tmpRcData.getPath().segmentCount() == 0 && tmpRcData.getType() == ICSettingBase.SETTING_FOLDER){
|
if(tmpRcData.getPath().segmentCount() == 0 && tmpRcData.getType() == ICSettingBase.SETTING_FOLDER){
|
||||||
cache(cInfo, PerFileSettingsCalculator.createEmptyRcSettingInfo((CFolderData)tmpRcData));
|
cache(cInfo, PerFileSettingsCalculator.createEmptyRcSettingInfo((CFolderData)tmpRcData));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -80,9 +80,9 @@ public class CfgSCJobsUtil {
|
||||||
}
|
}
|
||||||
final IScannerInfoCollector collector = profileInstance.getScannerInfoCollector();
|
final IScannerInfoCollector collector = profileInstance.getScannerInfoCollector();
|
||||||
|
|
||||||
List providerIds = buildInfo.getProviderIdList();
|
List<String> providerIds = buildInfo.getProviderIdList();
|
||||||
for (int i = 0; i < providerIds.size(); ++i) {
|
for (int i = 0; i < providerIds.size(); ++i) {
|
||||||
final String providerId = (String) providerIds.get(i);
|
final String providerId = providerIds.get(i);
|
||||||
if (buildInfo.isProviderOutputParserEnabled(providerId)) {
|
if (buildInfo.isProviderOutputParserEnabled(providerId)) {
|
||||||
final IExternalScannerInfoProvider esiProvider = profileInstance.
|
final IExternalScannerInfoProvider esiProvider = profileInstance.
|
||||||
createExternalScannerInfoProvider(providerId);
|
createExternalScannerInfoProvider(providerId);
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.io.FileInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
@ -75,7 +74,7 @@ class UpdateManagedProject12 {
|
||||||
private static final String ID_OPTIONS = "options"; //$NON-NLS-1$
|
private static final String ID_OPTIONS = "options"; //$NON-NLS-1$
|
||||||
private static final String ID_PATHS = "paths"; //$NON-NLS-1$
|
private static final String ID_PATHS = "paths"; //$NON-NLS-1$
|
||||||
private static final String ID_PREPROC = "preprocessor"; //$NON-NLS-1$
|
private static final String ID_PREPROC = "preprocessor"; //$NON-NLS-1$
|
||||||
private static final String ID_RELEASE = "release"; //$NON-NLS-1$
|
// private static final String ID_RELEASE = "release"; //$NON-NLS-1$
|
||||||
private static final String ID_SEPARATOR = "."; //$NON-NLS-1$
|
private static final String ID_SEPARATOR = "."; //$NON-NLS-1$
|
||||||
private static final String ID_SHARED = "so"; //$NON-NLS-1$
|
private static final String ID_SHARED = "so"; //$NON-NLS-1$
|
||||||
private static final String ID_SOLARIS = "solaris"; //$NON-NLS-1$
|
private static final String ID_SOLARIS = "solaris"; //$NON-NLS-1$
|
||||||
|
@ -103,7 +102,7 @@ class UpdateManagedProject12 {
|
||||||
private static final int TYPE_EXE = 0;
|
private static final int TYPE_EXE = 0;
|
||||||
private static final int TYPE_SHARED = 1;
|
private static final int TYPE_SHARED = 1;
|
||||||
private static final int TYPE_STATIC = 2;
|
private static final int TYPE_STATIC = 2;
|
||||||
private static Map configIdMap;
|
private static Map<String, IConfiguration> configIdMap;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* Generates a valid 2.1 eqivalent ID for an old 1.2 format
|
* Generates a valid 2.1 eqivalent ID for an old 1.2 format
|
||||||
|
@ -120,13 +119,13 @@ class UpdateManagedProject12 {
|
||||||
boolean debug = false;
|
boolean debug = false;
|
||||||
int type = -1;
|
int type = -1;
|
||||||
|
|
||||||
Vector idTokens = new Vector(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
|
Vector<String> idTokens = new Vector<String>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
|
||||||
try {
|
try {
|
||||||
String platform = (String) idTokens.get(0);
|
String platform = idTokens.get(0);
|
||||||
if (platform.equalsIgnoreCase(ID_CYGWIN)) {
|
if (platform.equalsIgnoreCase(ID_CYGWIN)) {
|
||||||
cygwin = builtIn = true;
|
cygwin = builtIn = true;
|
||||||
} else if ((platform.equalsIgnoreCase(ID_LINUX) || platform.equalsIgnoreCase(ID_SOLARIS))
|
} else if ((platform.equalsIgnoreCase(ID_LINUX) || platform.equalsIgnoreCase(ID_SOLARIS))
|
||||||
&& ((String)idTokens.get(1)).equalsIgnoreCase(ID_GNU)) {
|
&& (idTokens.get(1)).equalsIgnoreCase(ID_GNU)) {
|
||||||
builtIn = true;
|
builtIn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,9 +140,7 @@ class UpdateManagedProject12 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise make the conversion
|
// Otherwise make the conversion
|
||||||
Iterator iter = idTokens.iterator();
|
for (String id : idTokens) {
|
||||||
while (iter.hasNext()) {
|
|
||||||
String id = (String) iter.next();
|
|
||||||
if(id.equalsIgnoreCase(ID_EXEC)) {
|
if(id.equalsIgnoreCase(ID_EXEC)) {
|
||||||
type = TYPE_EXE;
|
type = TYPE_EXE;
|
||||||
} else if(id.equalsIgnoreCase(ID_SHARED)) {
|
} else if(id.equalsIgnoreCase(ID_SHARED)) {
|
||||||
|
@ -246,11 +243,11 @@ class UpdateManagedProject12 {
|
||||||
|
|
||||||
String optId = null;
|
String optId = null;
|
||||||
String[] idTokens = oldId.split(REGEXP_SEPARATOR);
|
String[] idTokens = oldId.split(REGEXP_SEPARATOR);
|
||||||
Vector oldIdVector = new Vector(Arrays.asList(idTokens));
|
Vector<String> oldIdVector = new Vector<String>(Arrays.asList(idTokens));
|
||||||
if (isBuiltInOption(oldIdVector)) {
|
if (isBuiltInOption(oldIdVector)) {
|
||||||
|
|
||||||
// New ID will be in form gnu.[c|c++|both].[compiler|link|lib].option.{1.2_component}
|
// New ID will be in form gnu.[c|c++|both].[compiler|link|lib].option.{1.2_component}
|
||||||
Vector newIdVector = new Vector(idTokens.length + 2);
|
Vector<String> newIdVector = new Vector<String>(idTokens.length + 2);
|
||||||
|
|
||||||
// We can ignore the first element of the old IDs since it is just [cygwin|linux|solaris]
|
// We can ignore the first element of the old IDs since it is just [cygwin|linux|solaris]
|
||||||
for (int index = 1; index < idTokens.length; ++index) {
|
for (int index = 1; index < idTokens.length; ++index) {
|
||||||
|
@ -258,12 +255,12 @@ class UpdateManagedProject12 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// In the case of some Cygwin C++ tools, the old ID will be missing gnu
|
// In the case of some Cygwin C++ tools, the old ID will be missing gnu
|
||||||
if (!((String)newIdVector.firstElement()).equals(ID_GNU)) {
|
if (!(newIdVector.firstElement()).equals(ID_GNU)) {
|
||||||
newIdVector.add(0, ID_GNU);
|
newIdVector.add(0, ID_GNU);
|
||||||
}
|
}
|
||||||
|
|
||||||
// In some old IDs the language specifier is missing for librarian and C++ options
|
// In some old IDs the language specifier is missing for librarian and C++ options
|
||||||
String langToken = (String)newIdVector.get(1);
|
String langToken = newIdVector.get(1);
|
||||||
if(!langToken.equals(TOOL_LANG_C)) {
|
if(!langToken.equals(TOOL_LANG_C)) {
|
||||||
// In the case of the librarian the language must be set to both
|
// In the case of the librarian the language must be set to both
|
||||||
if (langToken.equals(TOOL_NAME_LIB) || langToken.equals(TOOL_NAME_AR)) {
|
if (langToken.equals(TOOL_NAME_LIB) || langToken.equals(TOOL_NAME_AR)) {
|
||||||
|
@ -274,7 +271,7 @@ class UpdateManagedProject12 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Standardize the next token to compiler, link, or lib
|
// Standardize the next token to compiler, link, or lib
|
||||||
String toolToken = (String)newIdVector.get(2);
|
String toolToken = newIdVector.get(2);
|
||||||
if (toolToken.equals(ID_PREPROC)) {
|
if (toolToken.equals(ID_PREPROC)) {
|
||||||
// Some compiler preprocessor options are missing this
|
// Some compiler preprocessor options are missing this
|
||||||
newIdVector.add(2, TOOL_NAME_COMPILER);
|
newIdVector.add(2, TOOL_NAME_COMPILER);
|
||||||
|
@ -289,7 +286,7 @@ class UpdateManagedProject12 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add in the option tag
|
// Add in the option tag
|
||||||
String optionToken = (String)newIdVector.get(3);
|
String optionToken = newIdVector.get(3);
|
||||||
if (optionToken.equals(ID_OPTIONS)) {
|
if (optionToken.equals(ID_OPTIONS)) {
|
||||||
// Some old-style options had "options" in the id
|
// Some old-style options had "options" in the id
|
||||||
newIdVector.remove(3);
|
newIdVector.remove(3);
|
||||||
|
@ -297,7 +294,7 @@ class UpdateManagedProject12 {
|
||||||
newIdVector.add(3, ID_OPTION);
|
newIdVector.add(3, ID_OPTION);
|
||||||
|
|
||||||
// Convert any lingering "incpaths" to "include.paths"
|
// Convert any lingering "incpaths" to "include.paths"
|
||||||
String badToken = (String) newIdVector.lastElement();
|
String badToken = newIdVector.lastElement();
|
||||||
if (badToken.equals(ID_INCPATHS)) {
|
if (badToken.equals(ID_INCPATHS)) {
|
||||||
newIdVector.remove(newIdVector.lastElement());
|
newIdVector.remove(newIdVector.lastElement());
|
||||||
newIdVector.addElement(ID_INCLUDE);
|
newIdVector.addElement(ID_INCLUDE);
|
||||||
|
@ -331,7 +328,7 @@ class UpdateManagedProject12 {
|
||||||
// Construct the new ID
|
// Construct the new ID
|
||||||
optId = new String();
|
optId = new String();
|
||||||
for (int rebuildIndex = 0; rebuildIndex < newIdVector.size(); ++ rebuildIndex) {
|
for (int rebuildIndex = 0; rebuildIndex < newIdVector.size(); ++ rebuildIndex) {
|
||||||
String token = (String) newIdVector.get(rebuildIndex);
|
String token = newIdVector.get(rebuildIndex);
|
||||||
optId += token;
|
optId += token;
|
||||||
if (rebuildIndex < newIdVector.size() - 1) {
|
if (rebuildIndex < newIdVector.size() - 1) {
|
||||||
optId += ID_SEPARATOR;
|
optId += ID_SEPARATOR;
|
||||||
|
@ -405,7 +402,7 @@ class UpdateManagedProject12 {
|
||||||
case IOption.PREPROCESSOR_SYMBOLS:
|
case IOption.PREPROCESSOR_SYMBOLS:
|
||||||
case IOption.LIBRARIES:
|
case IOption.LIBRARIES:
|
||||||
case IOption.OBJECTS:
|
case IOption.OBJECTS:
|
||||||
Vector values = new Vector();
|
Vector<String> values = new Vector<String>();
|
||||||
NodeList nodes = optRef.getElementsByTagName(IOption.LIST_VALUE);
|
NodeList nodes = optRef.getElementsByTagName(IOption.LIST_VALUE);
|
||||||
for (int i = 0; i < nodes.getLength(); ++i) {
|
for (int i = 0; i < nodes.getLength(); ++i) {
|
||||||
Node node = nodes.item(i);
|
Node node = nodes.item(i);
|
||||||
|
@ -416,7 +413,7 @@ class UpdateManagedProject12 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
configuration.setOption(tool, newOpt, (String[])values.toArray(new String[values.size()]));
|
configuration.setOption(tool, newOpt, values.toArray(new String[values.size()]));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (BuildException e) {
|
} catch (BuildException e) {
|
||||||
|
@ -442,13 +439,13 @@ class UpdateManagedProject12 {
|
||||||
// Is this a built-in target or one we cannot convert
|
// Is this a built-in target or one we cannot convert
|
||||||
boolean builtIn = false;
|
boolean builtIn = false;
|
||||||
|
|
||||||
Vector idTokens = new Vector(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
|
Vector<String> idTokens = new Vector<String>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
|
||||||
try {
|
try {
|
||||||
String platform = (String) idTokens.get(0);
|
String platform = idTokens.get(0);
|
||||||
if (platform.equalsIgnoreCase(ID_CYGWIN)) {
|
if (platform.equalsIgnoreCase(ID_CYGWIN)) {
|
||||||
builtIn = true;
|
builtIn = true;
|
||||||
} else if ((platform.equalsIgnoreCase(ID_LINUX) || platform.equalsIgnoreCase(ID_SOLARIS))
|
} else if ((platform.equalsIgnoreCase(ID_LINUX) || platform.equalsIgnoreCase(ID_SOLARIS))
|
||||||
&& ((String)idTokens.get(1)).equalsIgnoreCase(ID_GNU)) {
|
&& (idTokens.get(1)).equalsIgnoreCase(ID_GNU)) {
|
||||||
posix = builtIn = true;
|
posix = builtIn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,9 +458,7 @@ class UpdateManagedProject12 {
|
||||||
return oldId;
|
return oldId;
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator iter = idTokens.iterator();
|
for (String token : idTokens) {
|
||||||
while (iter.hasNext()) {
|
|
||||||
String token = (String) iter.next();
|
|
||||||
if (token.equalsIgnoreCase(ID_EXEC)){
|
if (token.equalsIgnoreCase(ID_EXEC)){
|
||||||
type = TYPE_EXE;
|
type = TYPE_EXE;
|
||||||
} else if (token.equalsIgnoreCase(ID_SHARED)){
|
} else if (token.equalsIgnoreCase(ID_SHARED)){
|
||||||
|
@ -552,11 +547,9 @@ class UpdateManagedProject12 {
|
||||||
int toolType = -1;
|
int toolType = -1;
|
||||||
|
|
||||||
// Figure out what kind of tool the ref pointed to
|
// Figure out what kind of tool the ref pointed to
|
||||||
Vector idTokens = new Vector(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
|
Vector<String> idTokens = new Vector<String>(Arrays.asList(oldId.split(REGEXP_SEPARATOR)));
|
||||||
|
|
||||||
Iterator iter = idTokens.iterator();
|
for (String token : idTokens) {
|
||||||
while (iter.hasNext()) {
|
|
||||||
String token = (String) iter.next();
|
|
||||||
if(token.equals(TOOL_LANG_C)) {
|
if(token.equals(TOOL_LANG_C)) {
|
||||||
cppFlag = false;
|
cppFlag = false;
|
||||||
} else if (token.equalsIgnoreCase(TOOL_NAME_COMPILER)) {
|
} else if (token.equalsIgnoreCase(TOOL_NAME_COMPILER)) {
|
||||||
|
@ -731,7 +724,7 @@ class UpdateManagedProject12 {
|
||||||
try {
|
try {
|
||||||
Element defaultConfig = (Element) defaultConfiguration.item(0);
|
Element defaultConfig = (Element) defaultConfiguration.item(0);
|
||||||
String oldDefaultConfigId = defaultConfig.getAttribute(IBuildObject.ID);
|
String oldDefaultConfigId = defaultConfig.getAttribute(IBuildObject.ID);
|
||||||
IConfiguration newDefaultConfig = (IConfiguration) getConfigIdMap().get(oldDefaultConfigId);
|
IConfiguration newDefaultConfig = getConfigIdMap().get(oldDefaultConfigId);
|
||||||
if (newDefaultConfig != null) {
|
if (newDefaultConfig != null) {
|
||||||
info.setDefaultConfiguration(newDefaultConfig);
|
info.setDefaultConfiguration(newDefaultConfig);
|
||||||
info.setSelectedConfiguration(newDefaultConfig);
|
info.setSelectedConfiguration(newDefaultConfig);
|
||||||
|
@ -785,17 +778,17 @@ class UpdateManagedProject12 {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @return Returns the configIdMap.
|
* @return Returns the configIdMap.
|
||||||
*/
|
*/
|
||||||
protected static Map getConfigIdMap() {
|
protected static Map<String, IConfiguration> getConfigIdMap() {
|
||||||
if (configIdMap == null) {
|
if (configIdMap == null) {
|
||||||
configIdMap = new HashMap();
|
configIdMap = new HashMap<String, IConfiguration>();
|
||||||
}
|
}
|
||||||
return configIdMap;
|
return configIdMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static boolean isBuiltInOption(Vector idTokens) {
|
protected static boolean isBuiltInOption(Vector<String> idTokens) {
|
||||||
try {
|
try {
|
||||||
String platform = (String) idTokens.firstElement();
|
String platform = idTokens.firstElement();
|
||||||
String secondToken = (String) idTokens.get(1);
|
String secondToken = idTokens.get(1);
|
||||||
if (platform.equals(ID_CYGWIN)) {
|
if (platform.equals(ID_CYGWIN)) {
|
||||||
// bit of a mess since was done first
|
// bit of a mess since was done first
|
||||||
// but valid second tokens are 'compiler',
|
// but valid second tokens are 'compiler',
|
||||||
|
|
|
@ -437,7 +437,7 @@ class UpdateManagedProject20 {
|
||||||
case IOption.PREPROCESSOR_SYMBOLS:
|
case IOption.PREPROCESSOR_SYMBOLS:
|
||||||
case IOption.LIBRARIES:
|
case IOption.LIBRARIES:
|
||||||
case IOption.OBJECTS:{
|
case IOption.OBJECTS:{
|
||||||
Vector values = new Vector();
|
Vector<String> values = new Vector<String>();
|
||||||
NodeList nodes = optRef.getElementsByTagName(IOption.LIST_VALUE);
|
NodeList nodes = optRef.getElementsByTagName(IOption.LIST_VALUE);
|
||||||
for (int j = 0; j < nodes.getLength(); ++j) {
|
for (int j = 0; j < nodes.getLength(); ++j) {
|
||||||
Node node = nodes.item(j);
|
Node node = nodes.item(j);
|
||||||
|
@ -448,7 +448,7 @@ class UpdateManagedProject20 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
configuration.setOption(tool,option,(String[])values.toArray(new String[values.size()]));
|
configuration.setOption(tool,option,values.toArray(new String[values.size()]));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -44,7 +44,7 @@ import org.eclipse.ui.dialogs.IOverwriteQuery;
|
||||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||||
*/
|
*/
|
||||||
public class UpdateManagedProjectManager {
|
public class UpdateManagedProjectManager {
|
||||||
static private ThreadLocal fThreadInfo = new ThreadLocal();
|
static private ThreadLocal<Map<String, UpdateManagedProjectManager>> fThreadInfo = new ThreadLocal<Map<String, UpdateManagedProjectManager>>();
|
||||||
static private IOverwriteQuery fBackupFileOverwriteQuery = null;
|
static private IOverwriteQuery fBackupFileOverwriteQuery = null;
|
||||||
static private IOverwriteQuery fOpenQuestionQuery = null;
|
static private IOverwriteQuery fOpenQuestionQuery = null;
|
||||||
static private IOverwriteQuery fUpdateProjectQuery = null;
|
static private IOverwriteQuery fUpdateProjectQuery = null;
|
||||||
|
@ -77,7 +77,7 @@ public class UpdateManagedProjectManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
static private UpdateManagedProjectManager getExistingUpdateManager(IProject project){
|
static private UpdateManagedProjectManager getExistingUpdateManager(IProject project){
|
||||||
Map map = getManagerMap(false);
|
Map<String, UpdateManagedProjectManager> map = getManagerMap(false);
|
||||||
return map != null ? (UpdateManagedProjectManager)map.get(project.getName()) : null;
|
return map != null ? (UpdateManagedProjectManager)map.get(project.getName()) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,10 +102,10 @@ public class UpdateManagedProjectManager {
|
||||||
getManagerMap(false).remove(project.getName());
|
getManagerMap(false).remove(project.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
static private Map getManagerMap(boolean create){
|
static private Map<String, UpdateManagedProjectManager> getManagerMap(boolean create){
|
||||||
Map map = (Map)fThreadInfo.get();
|
Map<String, UpdateManagedProjectManager> map = fThreadInfo.get();
|
||||||
if(map == null && create){
|
if(map == null && create){
|
||||||
map = new HashMap();
|
map = new HashMap<String, UpdateManagedProjectManager>();
|
||||||
fThreadInfo.set(map);
|
fThreadInfo.set(map);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
|
Loading…
Add table
Reference in a new issue