mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
2005-03-9 Chris Wiebe
temporary fix for type parser timeout * browser/org/eclipse/cdt/core/browser/cache/TypeParser.java
This commit is contained in:
parent
7a1f792fe6
commit
1e4dae1a86
2 changed files with 26 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-03-9 Chris Wiebe
|
||||
temporary fix for type parser timeout
|
||||
* browser/org/eclipse/cdt/core/browser/cache/TypeParser.java
|
||||
|
||||
2005-03-13 Bogdan Gheorghe
|
||||
Updated references to IndexManager to reflect new multi-indexer framework.
|
||||
* browser/org/eclipse/cdt/internal/core/browser/cache/IndexerDependencies.java
|
||||
|
|
|
@ -927,10 +927,29 @@ public class TypeParser implements ISourceElementRequestor {
|
|||
return ParserUtil.createReader(finalPath, workingCopies);
|
||||
}
|
||||
|
||||
private static final int DEFAULT_PARSER_TIMEOUT = 30;
|
||||
|
||||
public int getParserTimeout() {
|
||||
// here we just reuse the indexer timeout
|
||||
String timeOut = CCorePlugin.getDefault().getPluginPreferences().getString("CDT_INDEXER_TIMEOUT");
|
||||
return Integer.valueOf(timeOut).intValue();
|
||||
//TODO we shouldn't be trying to access the indexer prefs
|
||||
//TODO clean this up
|
||||
int timeout = 0;
|
||||
try {
|
||||
// here we just reuse the indexer timeout
|
||||
String str = CCorePlugin.getDefault().getPluginPreferences().getString("CDT_INDEXER_TIMEOUT"); //$NON-NLS-1$
|
||||
if (str != null && str.length() > 0) {
|
||||
int val = Integer.valueOf(str).intValue();
|
||||
if (val > 0) {
|
||||
timeout = val;
|
||||
}
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
if (timeout == 0) {
|
||||
timeout = DEFAULT_PARSER_TIMEOUT;
|
||||
}
|
||||
return timeout;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue