mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15:38 +02:00
Fix for Bug 65132: Deletion of "Work In Progress" preferences
This commit is contained in:
parent
75fee20f69
commit
b2719be9c5
7 changed files with 247 additions and 72 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2004-06-11 Bogdan Gheorghe
|
||||||
|
Fix for Bug 66016: Moved search related items from work in progress to search page
|
||||||
|
|
||||||
2004-06-10 Bogdan Gheorghe
|
2004-06-10 Bogdan Gheorghe
|
||||||
Fix for Bug 65132: moving folder onto itself deletes entire project
|
Fix for Bug 65132: moving folder onto itself deletes entire project
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,8 @@ HideHeaderFiles.description= Hides all Header files
|
||||||
|
|
||||||
WorkInProgress.name=Work In Progress
|
WorkInProgress.name=Work In Progress
|
||||||
|
|
||||||
|
CDTSearch.name=Search
|
||||||
|
|
||||||
CDTIndexerProperty.name=C/C++ Indexer
|
CDTIndexerProperty.name=C/C++ Indexer
|
||||||
|
|
||||||
CDTFileTypesProperty.name=C/C++ File Types
|
CDTFileTypesProperty.name=C/C++ File Types
|
||||||
|
|
|
@ -379,6 +379,11 @@
|
||||||
class="org.eclipse.cdt.internal.ui.preferences.CFileTypesPreferencePage"
|
class="org.eclipse.cdt.internal.ui.preferences.CFileTypesPreferencePage"
|
||||||
id="org.eclipse.cdt.ui.preferences.CFileTypesPreferences">
|
id="org.eclipse.cdt.ui.preferences.CFileTypesPreferences">
|
||||||
</page>
|
</page>
|
||||||
|
<page
|
||||||
|
class="org.eclipse.cdt.internal.ui.preferences.CSearchPreferencePage"
|
||||||
|
category="org.eclipse.cdt.ui.preferences.CPluginPreferencePage"
|
||||||
|
name="%CDTSearch.name"
|
||||||
|
id="org.eclipse.cdt.ui.preferences.CSearchPreferencePage"/>
|
||||||
<!--page
|
<!--page
|
||||||
name="%WorkInProgress.name"
|
name="%WorkInProgress.name"
|
||||||
category="org.eclipse.cdt.ui.preferences.CPluginPreferencePage"
|
category="org.eclipse.cdt.ui.preferences.CPluginPreferencePage"
|
||||||
|
|
|
@ -0,0 +1,233 @@
|
||||||
|
/**********************************************************************
|
||||||
|
Copyright (c) 2002, 2004 IBM Rational Software and others.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Common Public License v1.0
|
||||||
|
which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/cpl-v10.html
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Rational Software - Initial Contribution
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
package org.eclipse.cdt.internal.ui.preferences;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
import org.eclipse.cdt.internal.core.search.indexing.SourceIndexer;
|
||||||
|
import org.eclipse.cdt.internal.ui.search.CSearchPage;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
||||||
|
import org.eclipse.core.runtime.Preferences;
|
||||||
|
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||||
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
import org.eclipse.jface.preference.PreferencePage;
|
||||||
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
|
import org.eclipse.swt.events.SelectionListener;
|
||||||
|
import org.eclipse.swt.layout.GridData;
|
||||||
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
|
import org.eclipse.swt.widgets.Button;
|
||||||
|
import org.eclipse.swt.widgets.Combo;
|
||||||
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
import org.eclipse.swt.widgets.Control;
|
||||||
|
import org.eclipse.swt.widgets.Group;
|
||||||
|
import org.eclipse.swt.widgets.Label;
|
||||||
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
import org.eclipse.ui.IWorkbench;
|
||||||
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
|
|
||||||
|
public class CSearchPreferencePage extends PreferencePage
|
||||||
|
implements
|
||||||
|
IWorkbenchPreferencePage {
|
||||||
|
|
||||||
|
private Combo fExternLinks;
|
||||||
|
private Button fExternEnabled;
|
||||||
|
|
||||||
|
protected OverlayPreferenceStore fOverlayStore;
|
||||||
|
private Text fTextControl;
|
||||||
|
|
||||||
|
private static final String TIMEOUT_VALUE = "20000"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public CSearchPreferencePage(){
|
||||||
|
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
|
||||||
|
fOverlayStore = createOverlayStore();
|
||||||
|
}
|
||||||
|
|
||||||
|
private OverlayPreferenceStore createOverlayStore() {
|
||||||
|
ArrayList overlayKeys = new ArrayList();
|
||||||
|
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CSearchPage.EXTERNALMATCH_ENABLED));
|
||||||
|
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, CSearchPage.EXTERNALMATCH_VISIBLE));
|
||||||
|
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, SourceIndexer.CDT_INDEXER_TIMEOUT));
|
||||||
|
|
||||||
|
OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
|
||||||
|
overlayKeys.toArray(keys);
|
||||||
|
return new OverlayPreferenceStore(getPreferenceStore(), keys);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
|
||||||
|
*/
|
||||||
|
protected Control createContents(Composite parent) {
|
||||||
|
fOverlayStore.load();
|
||||||
|
fOverlayStore.start();
|
||||||
|
|
||||||
|
initializeDialogUnits(parent);
|
||||||
|
|
||||||
|
Composite result= new Composite(parent, SWT.NONE);
|
||||||
|
GridLayout layout= new GridLayout();
|
||||||
|
layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
|
||||||
|
layout.marginWidth= 0;
|
||||||
|
layout.verticalSpacing= convertVerticalDLUsToPixels(10);
|
||||||
|
layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
|
||||||
|
result.setLayout(layout);
|
||||||
|
|
||||||
|
Group group= new Group(result, SWT.NONE);
|
||||||
|
group.setLayout(new GridLayout());
|
||||||
|
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
group.setText(PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.ExternalSearchLinksGroup")); //$NON-NLS-1$
|
||||||
|
|
||||||
|
fExternEnabled = createCheckButton(group, PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.EnableMessage")); //$NON-NLS-1$
|
||||||
|
fExternEnabled.addSelectionListener(new SelectionListener() {
|
||||||
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
|
}
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
Button button = (Button) e.widget;
|
||||||
|
boolean externLinkEnabled = false;
|
||||||
|
fExternLinks.setEnabled(false);
|
||||||
|
if (button.getSelection()){
|
||||||
|
fExternLinks.setEnabled(true);
|
||||||
|
externLinkEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
fOverlayStore.setValue(CSearchPage.EXTERNALMATCH_ENABLED, externLinkEnabled);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
fExternLinks = createComboBox(group,PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.EnableMarkerLinkType"),new String[]{PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.Visible"),PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.Invisible")},PreferencesMessages.getString("CSearchPreferences.ExternalSearchLinks.Invisible")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
|
fExternLinks.addSelectionListener(new SelectionListener() {
|
||||||
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
|
}
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
Combo combo = (Combo) e.widget;
|
||||||
|
fOverlayStore.setValue(CSearchPage.EXTERNALMATCH_VISIBLE, combo.getSelectionIndex());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Group indexerTimeoutGroup= new Group(result, SWT.NONE);
|
||||||
|
indexerTimeoutGroup.setLayout(new GridLayout());
|
||||||
|
indexerTimeoutGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
indexerTimeoutGroup.setText(PreferencesMessages.getString("CSearchPreferences.IndexerTimeout.IndexerTimeoutGroup")); //$NON-NLS-1$
|
||||||
|
|
||||||
|
fTextControl = (Text) addTextField( indexerTimeoutGroup, PreferencesMessages.getString("CSearchPreferences.IndexerTimeout.Timeout"),"TimeOut",6,0,true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
||||||
|
initialize();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initialize(){
|
||||||
|
boolean extEnabled = fOverlayStore.getBoolean(CSearchPage.EXTERNALMATCH_ENABLED);
|
||||||
|
fExternEnabled.setSelection(extEnabled);
|
||||||
|
|
||||||
|
fExternLinks.select(fOverlayStore.getInt(CSearchPage.EXTERNALMATCH_VISIBLE));
|
||||||
|
fExternLinks.setEnabled(extEnabled);
|
||||||
|
|
||||||
|
fTextControl.setText(fOverlayStore.getString(SourceIndexer.CDT_INDEXER_TIMEOUT));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
||||||
|
*/
|
||||||
|
public void init(IWorkbench workbench) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a button with the given label and sets the default
|
||||||
|
* configuration data.
|
||||||
|
*/
|
||||||
|
private Combo createComboBox( Composite parent, String label, String[] items, String selection )
|
||||||
|
{
|
||||||
|
ControlFactory.createLabel( parent, label );
|
||||||
|
Combo combo = ControlFactory.createSelectCombo( parent, items, selection );
|
||||||
|
combo.setLayoutData( new GridData() );
|
||||||
|
return combo;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Creates a button with the given label and sets the default
|
||||||
|
* configuration data.
|
||||||
|
*/
|
||||||
|
private Button createCheckButton( Composite parent, String label )
|
||||||
|
{
|
||||||
|
Button button = new Button( parent, SWT.CHECK | SWT.LEFT );
|
||||||
|
button.setText( label );
|
||||||
|
// FieldEditor GridData
|
||||||
|
GridData data = new GridData();
|
||||||
|
button.setLayoutData( data );
|
||||||
|
return button;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Control addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) {
|
||||||
|
|
||||||
|
Label labelControl = new Label(composite, SWT.NONE);
|
||||||
|
labelControl.setText(label);
|
||||||
|
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
|
||||||
|
gd.horizontalIndent = indentation;
|
||||||
|
labelControl.setLayoutData(gd);
|
||||||
|
|
||||||
|
Text textControl = new Text(composite, SWT.BORDER | SWT.SINGLE);
|
||||||
|
gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
|
||||||
|
gd.widthHint = convertWidthInCharsToPixels(textLimit + 1);
|
||||||
|
textControl.setLayoutData(gd);
|
||||||
|
textControl.setTextLimit(textLimit);
|
||||||
|
|
||||||
|
return textControl;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @see IPreferencePage#performOk()
|
||||||
|
*/
|
||||||
|
public boolean performOk() {
|
||||||
|
|
||||||
|
String timeOut = fTextControl.getText();
|
||||||
|
try {
|
||||||
|
// Check the string number
|
||||||
|
Integer.parseInt(timeOut);
|
||||||
|
} catch (NumberFormatException ex){
|
||||||
|
timeOut = TIMEOUT_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
fOverlayStore.setValue(SourceIndexer.CDT_INDEXER_TIMEOUT, timeOut);
|
||||||
|
fOverlayStore.propagate();
|
||||||
|
|
||||||
|
// Store IProblem Marker value in CCorePlugin Preferences
|
||||||
|
Preferences prefs = CCorePlugin.getDefault().getPluginPreferences();
|
||||||
|
|
||||||
|
prefs.setValue(SourceIndexer.CDT_INDEXER_TIMEOUT,timeOut);
|
||||||
|
CCorePlugin.getDefault().savePluginPreferences();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param store
|
||||||
|
*/
|
||||||
|
public static void initDefaults(IPreferenceStore store) {
|
||||||
|
store.setDefault(CSearchPage.EXTERNALMATCH_ENABLED, true);
|
||||||
|
store.setDefault(CSearchPage.EXTERNALMATCH_VISIBLE, 1);
|
||||||
|
store.setDefault(SourceIndexer.CDT_INDEXER_TIMEOUT,TIMEOUT_VALUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @see PreferencePage#performDefaults()
|
||||||
|
*/
|
||||||
|
protected void performDefaults() {
|
||||||
|
fOverlayStore.loadDefaults();
|
||||||
|
initialize();
|
||||||
|
super.performDefaults();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -168,6 +168,7 @@ CEditorHoverConfigurationBlock.showAffordance= &Show affordance in hover on how
|
||||||
#Search Preferences
|
#Search Preferences
|
||||||
CSearchPreferences.ExternalSearchLinks.ExternalSearchLinksGroup=External Search Links
|
CSearchPreferences.ExternalSearchLinks.ExternalSearchLinksGroup=External Search Links
|
||||||
CSearchPreferences.ExternalSearchLinks.EnableMarkerLinkType=Enable Marker Link Type
|
CSearchPreferences.ExternalSearchLinks.EnableMarkerLinkType=Enable Marker Link Type
|
||||||
|
CSearchPreferences.ExternalSearchLinks.EnableMessage=Enable external search markers
|
||||||
CSearchPreferences.ExternalSearchLinks.Visible=Visible
|
CSearchPreferences.ExternalSearchLinks.Visible=Visible
|
||||||
CSearchPreferences.ExternalSearchLinks.Invisible=Invisible
|
CSearchPreferences.ExternalSearchLinks.Invisible=Invisible
|
||||||
CSearchPreferences.IndexerTimeout.IndexerTimeoutGroup=Indexer Timeout
|
CSearchPreferences.IndexerTimeout.IndexerTimeoutGroup=Indexer Timeout
|
||||||
|
|
|
@ -43,16 +43,8 @@ public class WorkInProgressPreferencePage extends PreferencePage
|
||||||
implements
|
implements
|
||||||
IWorkbenchPreferencePage {
|
IWorkbenchPreferencePage {
|
||||||
|
|
||||||
private Combo fExternLinks;
|
|
||||||
private Button fExternEnabled;
|
|
||||||
private Button fIProblemMarkers;
|
|
||||||
private Button fBackgroundTypeCacheEnabled;
|
private Button fBackgroundTypeCacheEnabled;
|
||||||
|
|
||||||
|
|
||||||
protected OverlayPreferenceStore fOverlayStore;
|
protected OverlayPreferenceStore fOverlayStore;
|
||||||
private Text fTextControl;
|
|
||||||
|
|
||||||
private static final String TIMEOUT_VALUE = "20000"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
public WorkInProgressPreferencePage(){
|
public WorkInProgressPreferencePage(){
|
||||||
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
|
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
|
||||||
|
@ -89,45 +81,6 @@ public class WorkInProgressPreferencePage extends PreferencePage
|
||||||
layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
|
layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
|
||||||
result.setLayout(layout);
|
result.setLayout(layout);
|
||||||
|
|
||||||
Group group= new Group(result, SWT.NONE);
|
|
||||||
group.setLayout(new GridLayout());
|
|
||||||
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
|
||||||
group.setText("External Search Links"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
fExternEnabled = createCheckButton(group, "Enable external search markers"); //$NON-NLS-1$
|
|
||||||
fExternEnabled.addSelectionListener(new SelectionListener() {
|
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
|
||||||
}
|
|
||||||
public void widgetSelected(SelectionEvent e) {
|
|
||||||
Button button = (Button) e.widget;
|
|
||||||
boolean externLinkEnabled = false;
|
|
||||||
fExternLinks.setEnabled(false);
|
|
||||||
if (button.getSelection()){
|
|
||||||
fExternLinks.setEnabled(true);
|
|
||||||
externLinkEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
fOverlayStore.setValue(CSearchPage.EXTERNALMATCH_ENABLED, externLinkEnabled);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
fExternLinks = createComboBox(group,"External Marker Link Type",new String[]{"Visible","Invisible"},"Visible"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
|
||||||
fExternLinks.addSelectionListener(new SelectionListener() {
|
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
|
||||||
}
|
|
||||||
public void widgetSelected(SelectionEvent e) {
|
|
||||||
Combo combo = (Combo) e.widget;
|
|
||||||
fOverlayStore.setValue(CSearchPage.EXTERNALMATCH_VISIBLE, combo.getSelectionIndex());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Group indexerTimeoutGroup= new Group(result, SWT.NONE);
|
|
||||||
indexerTimeoutGroup.setLayout(new GridLayout());
|
|
||||||
indexerTimeoutGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
|
||||||
indexerTimeoutGroup.setText("Indexer Timeout"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
fTextControl = (Text) addTextField( indexerTimeoutGroup, "Time out (ms)","TimeOut",6,0,true); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
|
|
||||||
Group backgroundTypeCacheGroup= new Group(result, SWT.NONE);
|
Group backgroundTypeCacheGroup= new Group(result, SWT.NONE);
|
||||||
backgroundTypeCacheGroup.setLayout(new GridLayout());
|
backgroundTypeCacheGroup.setLayout(new GridLayout());
|
||||||
backgroundTypeCacheGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
backgroundTypeCacheGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
@ -155,14 +108,6 @@ public class WorkInProgressPreferencePage extends PreferencePage
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initialize(){
|
private void initialize(){
|
||||||
boolean extEnabled = fOverlayStore.getBoolean(CSearchPage.EXTERNALMATCH_ENABLED);
|
|
||||||
fExternEnabled.setSelection(extEnabled);
|
|
||||||
|
|
||||||
fExternLinks.select(fOverlayStore.getInt(CSearchPage.EXTERNALMATCH_VISIBLE));
|
|
||||||
fExternLinks.setEnabled(extEnabled);
|
|
||||||
|
|
||||||
fTextControl.setText(fOverlayStore.getString(SourceIndexer.CDT_INDEXER_TIMEOUT));
|
|
||||||
|
|
||||||
fBackgroundTypeCacheEnabled.setSelection(fOverlayStore.getBoolean(AllTypesCache.ENABLE_BACKGROUND_TYPE_CACHE));
|
fBackgroundTypeCacheEnabled.setSelection(fOverlayStore.getBoolean(AllTypesCache.ENABLE_BACKGROUND_TYPE_CACHE));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -220,25 +165,12 @@ public class WorkInProgressPreferencePage extends PreferencePage
|
||||||
*/
|
*/
|
||||||
public boolean performOk() {
|
public boolean performOk() {
|
||||||
|
|
||||||
String timeOut = fTextControl.getText();
|
|
||||||
try {
|
|
||||||
// Check the string number
|
|
||||||
Integer.parseInt(timeOut);
|
|
||||||
} catch (NumberFormatException ex){
|
|
||||||
timeOut = TIMEOUT_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
fOverlayStore.setValue(SourceIndexer.CDT_INDEXER_TIMEOUT, timeOut);
|
|
||||||
|
|
||||||
fOverlayStore.propagate();
|
fOverlayStore.propagate();
|
||||||
|
|
||||||
// Store IProblem Marker value in CCorePlugin Preferences
|
// Store IProblem Marker value in CCorePlugin Preferences
|
||||||
Preferences prefs = CCorePlugin.getDefault().getPluginPreferences();
|
Preferences prefs = CCorePlugin.getDefault().getPluginPreferences();
|
||||||
|
|
||||||
prefs.setValue(SourceIndexer.CDT_INDEXER_TIMEOUT,timeOut);
|
|
||||||
|
|
||||||
prefs.setValue(AllTypesCache.ENABLE_BACKGROUND_TYPE_CACHE, fOverlayStore.getString(AllTypesCache.ENABLE_BACKGROUND_TYPE_CACHE));
|
prefs.setValue(AllTypesCache.ENABLE_BACKGROUND_TYPE_CACHE, fOverlayStore.getString(AllTypesCache.ENABLE_BACKGROUND_TYPE_CACHE));
|
||||||
|
|
||||||
CCorePlugin.getDefault().savePluginPreferences();
|
CCorePlugin.getDefault().savePluginPreferences();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -248,9 +180,6 @@ public class WorkInProgressPreferencePage extends PreferencePage
|
||||||
* @param store
|
* @param store
|
||||||
*/
|
*/
|
||||||
public static void initDefaults(IPreferenceStore store) {
|
public static void initDefaults(IPreferenceStore store) {
|
||||||
store.setDefault(CSearchPage.EXTERNALMATCH_ENABLED, false);
|
|
||||||
store.setDefault(CSearchPage.EXTERNALMATCH_VISIBLE, 0);
|
|
||||||
store.setDefault(SourceIndexer.CDT_INDEXER_TIMEOUT,TIMEOUT_VALUE);
|
|
||||||
store.setDefault(AllTypesCache.ENABLE_BACKGROUND_TYPE_CACHE, false);
|
store.setDefault(AllTypesCache.ENABLE_BACKGROUND_TYPE_CACHE, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import org.eclipse.cdt.internal.ui.cview.CView;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.BuildConsolePreferencePage;
|
import org.eclipse.cdt.internal.ui.preferences.BuildConsolePreferencePage;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.CEditorPreferencePage;
|
import org.eclipse.cdt.internal.ui.preferences.CEditorPreferencePage;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
import org.eclipse.cdt.internal.ui.preferences.CPluginPreferencePage;
|
||||||
|
import org.eclipse.cdt.internal.ui.preferences.CSearchPreferencePage;
|
||||||
import org.eclipse.cdt.internal.ui.preferences.WorkInProgressPreferencePage;
|
import org.eclipse.cdt.internal.ui.preferences.WorkInProgressPreferencePage;
|
||||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
@ -40,6 +41,7 @@ public class CUIPreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
CPluginPreferencePage.initDefaults(store);
|
CPluginPreferencePage.initDefaults(store);
|
||||||
BuildConsolePreferencePage.initDefaults(store);
|
BuildConsolePreferencePage.initDefaults(store);
|
||||||
WorkInProgressPreferencePage.initDefaults(store);
|
WorkInProgressPreferencePage.initDefaults(store);
|
||||||
|
CSearchPreferencePage.initDefaults(store);
|
||||||
CView.initDefaults(store);
|
CView.initDefaults(store);
|
||||||
CEditorPreferencePage.initDefaults(store);
|
CEditorPreferencePage.initDefaults(store);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue