mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Increase range of valid numbers for database-cache size percentage.
This commit is contained in:
parent
433aa00c34
commit
6a73a387be
1 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Wind River Systems, Inc. and others.
|
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -53,7 +53,8 @@ public class CacheSizeBlock extends AbstractCOptionPage {
|
||||||
setContainer(container);
|
setContainer(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createControl(Composite parent) {
|
@Override
|
||||||
|
public void createControl(Composite parent) {
|
||||||
GridData gd;
|
GridData gd;
|
||||||
GridLayout gl;
|
GridLayout gl;
|
||||||
Composite composite = ControlFactory.createComposite(parent, 1);
|
Composite composite = ControlFactory.createComposite(parent, 1);
|
||||||
|
@ -77,7 +78,7 @@ public class CacheSizeBlock extends AbstractCOptionPage {
|
||||||
|
|
||||||
Label dbCacheLabel= ControlFactory.createLabel(cacheComp, DialogsMessages.CacheSizeBlock_indexDatabaseCache);
|
Label dbCacheLabel= ControlFactory.createLabel(cacheComp, DialogsMessages.CacheSizeBlock_indexDatabaseCache);
|
||||||
fDBLimitPct= new IntegerFieldEditor(CCorePreferenceConstants.INDEX_DB_CACHE_SIZE_PCT, DialogsMessages.CacheSizeBlock_limitRelativeToMaxHeapSize, cacheComp, 3);
|
fDBLimitPct= new IntegerFieldEditor(CCorePreferenceConstants.INDEX_DB_CACHE_SIZE_PCT, DialogsMessages.CacheSizeBlock_limitRelativeToMaxHeapSize, cacheComp, 3);
|
||||||
fDBLimitPct.setValidRange(1, 40);
|
fDBLimitPct.setValidRange(1, 75);
|
||||||
ControlFactory.createLabel(cacheComp, "%"); //$NON-NLS-1$
|
ControlFactory.createLabel(cacheComp, "%"); //$NON-NLS-1$
|
||||||
|
|
||||||
fDBAbsoluteLimit= new IntegerFieldEditor(CCorePreferenceConstants.MAX_INDEX_DB_CACHE_SIZE_MB, DialogsMessages.CacheSizeBlock_absoluteLimit, cacheComp, 4);
|
fDBAbsoluteLimit= new IntegerFieldEditor(CCorePreferenceConstants.MAX_INDEX_DB_CACHE_SIZE_MB, DialogsMessages.CacheSizeBlock_absoluteLimit, cacheComp, 4);
|
||||||
|
@ -138,6 +139,7 @@ public class CacheSizeBlock extends AbstractCOptionPage {
|
||||||
fCodeReaderLimit.load();
|
fCodeReaderLimit.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void performApply(IProgressMonitor monitor) throws CoreException {
|
public void performApply(IProgressMonitor monitor) throws CoreException {
|
||||||
fDBLimitPct.store();
|
fDBLimitPct.store();
|
||||||
fDBAbsoluteLimit.store();
|
fDBAbsoluteLimit.store();
|
||||||
|
@ -150,7 +152,8 @@ public class CacheSizeBlock extends AbstractCOptionPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void performDefaults() {
|
@Override
|
||||||
|
public void performDefaults() {
|
||||||
fDBLimitPct.loadDefault();
|
fDBLimitPct.loadDefault();
|
||||||
fDBAbsoluteLimit.loadDefault();
|
fDBAbsoluteLimit.loadDefault();
|
||||||
fCodeReaderLimit.loadDefault();
|
fCodeReaderLimit.loadDefault();
|
||||||
|
|
Loading…
Add table
Reference in a new issue