diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java index 80a43d6aa83..8d63ec9bb9b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. + * Copyright (c) 2005, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,6 +40,7 @@ import org.eclipse.cdt.ui.PreferenceConstants; import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.internal.ui.editor.CEditor; +import org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistPreference; /* * The page for setting the editor options. @@ -49,6 +50,10 @@ public class CEditorPreferencePage extends AbstractPreferencePage implements IWo protected final String[][] fAppearanceColorListModel = new String[][] { {PreferencesMessages.CEditorPreferencePage_behaviorPage_matchingBracketColor, CEditor.MATCHING_BRACKETS_COLOR, null }, {PreferencesMessages.CEditorPreferencePage_behaviorPage_inactiveCodeColor, CEditor.INACTIVE_CODE_COLOR, null }, + {PreferencesMessages.CEditorPreferencePage_ContentAssistPage_completionProposalBackgroundColor, ContentAssistPreference.PROPOSALS_BACKGROUND, null }, + {PreferencesMessages.CEditorPreferencePage_ContentAssistPage_completionProposalForegroundColor, ContentAssistPreference.PROPOSALS_FOREGROUND, null }, + {PreferencesMessages.CEditorPreferencePage_ContentAssistPage_parameterBackgroundColor, ContentAssistPreference.PARAMETERS_BACKGROUND, null }, + {PreferencesMessages.CEditorPreferencePage_ContentAssistPage_parameterForegroundColor, ContentAssistPreference.PARAMETERS_FOREGROUND, null }, }; private List fAppearanceColorList; @@ -69,6 +74,10 @@ public class CEditorPreferencePage extends AbstractPreferencePage implements IWo overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CEditor.INACTIVE_CODE_COLOR)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CEditor.INACTIVE_CODE_ENABLE)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.ENSURE_NEWLINE_AT_EOF)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_BACKGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_FOREGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_BACKGROUND)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_FOREGROUND)); OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()]; overlayKeys.toArray(keys); @@ -84,6 +93,10 @@ public class CEditorPreferencePage extends AbstractPreferencePage implements IWo store.setDefault(CEditor.INACTIVE_CODE_ENABLE, true); PreferenceConverter.setDefault(store, CEditor.INACTIVE_CODE_COLOR, new RGB(224, 224, 224)); + PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_BACKGROUND, new RGB(254, 241, 233)); + PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_FOREGROUND, new RGB(0, 0, 0)); + PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_BACKGROUND, new RGB(254, 241, 233)); + PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_FOREGROUND, new RGB(0, 0, 0)); } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistPreferencePage.java index b285235c1e2..88629172e34 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistPreferencePage.java @@ -1,24 +1,21 @@ /******************************************************************************* - * Copyright (c) 2002, 2006 QNX Software Systems and others. + * Copyright (c) 2002, 2007 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * QNX Software Systems - Initial API and implementation + * QNX Software Systems - Initial API and implementation + * Anton Leherbauer (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.internal.ui.preferences; import java.util.ArrayList; -import org.eclipse.cdt.internal.ui.ICHelpContextIds; -import org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistPreference; import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceConverter; import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -26,6 +23,9 @@ import org.eclipse.swt.widgets.Group; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.PlatformUI; +import org.eclipse.cdt.internal.ui.ICHelpContextIds; +import org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistPreference; + /** * CodeAssistPreferencePage */ @@ -44,12 +44,8 @@ public class CodeAssistPreferencePage extends AbstractPreferencePage { overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ContentAssistPreference.AUTOACTIVATION_DELAY)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOINSERT)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.CODEASSIST_PREFIX_COMPLETION)); + overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.PREFIX_COMPLETION)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ContentAssistPreference.TIMEOUT_DELAY)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_BACKGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_FOREGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_BACKGROUND)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_FOREGROUND)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_DOT)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_ARROW)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_DOUBLECOLON)); @@ -78,16 +74,18 @@ public class CodeAssistPreferencePage extends AbstractPreferencePage { layout.numColumns = 2; contentAssistComposite.setLayout(layout); + String label; //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + // search scope (no longer supported) // The following three radio buttons are grouped together - String label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_searchGroupTitle; - Group searchGroup = addGroupBox(contentAssistComposite, label, 2); - - label= PreferencesMessages.CEditorPreferencePage_ContentAssistPage_searchGroupCurrentFileOption; - addRadioButton(searchGroup, label, ContentAssistPreference.CURRENT_FILE_SEARCH_SCOPE, 0); - - label= PreferencesMessages.CEditorPreferencePage_ContentAssistPage_searchGroupCurrentProjectOption; - addRadioButton(searchGroup, label, ContentAssistPreference.PROJECT_SEARCH_SCOPE, 0); +// label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_searchGroupTitle; +// Group searchGroup = addGroupBox(contentAssistComposite, label, 2); +// +// label= PreferencesMessages.CEditorPreferencePage_ContentAssistPage_searchGroupCurrentFileOption; +// addRadioButton(searchGroup, label, ContentAssistPreference.CURRENT_FILE_SEARCH_SCOPE, 0); +// +// label= PreferencesMessages.CEditorPreferencePage_ContentAssistPage_searchGroupCurrentProjectOption; +// addRadioButton(searchGroup, label, ContentAssistPreference.PROJECT_SEARCH_SCOPE, 0); //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_insertionGroupTitle; @@ -97,15 +95,23 @@ public class CodeAssistPreferencePage extends AbstractPreferencePage { addCheckBox(insertionGroup, label, ContentAssistPreference.AUTOINSERT, 0); label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_insertCommonProposalAutomatically; - addCheckBox(insertionGroup, label, ContentAssistPreference.CODEASSIST_PREFIX_COMPLETION, 0); + addCheckBox(insertionGroup, label, ContentAssistPreference.PREFIX_COMPLETION, 0); + // parsing timeout (no longer supported) +// label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_timeoutDelay; +// addTextField(insertionGroup, label, ContentAssistPreference.TIMEOUT_DELAY, 6, 0, true); + + //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + // sorting and filtering + label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_sortingSection_title; + Group sortingGroup = addGroupBox(contentAssistComposite, label, 2); + label= PreferencesMessages.CEditorPreferencePage_ContentAssistPage_showProposalsInAlphabeticalOrder; - addCheckBox(insertionGroup, label, ContentAssistPreference.ORDER_PROPOSALS, 0); - - label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_timeoutDelay; - addTextField(insertionGroup, label, ContentAssistPreference.TIMEOUT_DELAY, 6, 0, true); - + addCheckBox(sortingGroup, label, ContentAssistPreference.ORDER_PROPOSALS, 0); + label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_proposalFilterSelect ; + addComboBox(sortingGroup, label, ContentAssistPreference.PROPOSALS_FILTER, 20, 0); + //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& // The following items are grouped for Auto Activation label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_autoActivationGroupTitle; @@ -123,22 +129,6 @@ public class CodeAssistPreferencePage extends AbstractPreferencePage { label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_autoActivationDelay; addTextField(enableGroup, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0, true); - //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& - label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_completionProposalBackgroundColor; - addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0); - - label= PreferencesMessages.CEditorPreferencePage_ContentAssistPage_completionProposalForegroundColor; - addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0); - -// label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.parameterBackgroundColor"); -// addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_BACKGROUND, 0); -// -// label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.parameterForegroundColor"); -// addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_FOREGROUND, 0); - - label = PreferencesMessages.CEditorPreferencePage_ContentAssistPage_proposalFilterSelect ; - addComboBox(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FILTER, 20, 0); - initializeFields(); PlatformUI.getWorkbench().getHelpSystem().setHelp(contentAssistComposite, ICHelpContextIds.C_EDITOR_CONTENT_ASSIST_PREF_PAGE); @@ -165,11 +155,7 @@ public class CodeAssistPreferencePage extends AbstractPreferencePage { store.setDefault(ContentAssistPreference.AUTOACTIVATION_DELAY, 500); store.setDefault(ContentAssistPreference.AUTOINSERT, true); - store.setDefault(ContentAssistPreference.CODEASSIST_PREFIX_COMPLETION, true); - PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_BACKGROUND, new RGB(254, 241, 233)); - PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_FOREGROUND, new RGB(0, 0, 0)); - PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_BACKGROUND, new RGB(254, 241, 233)); - PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_FOREGROUND, new RGB(0, 0, 0)); + store.setDefault(ContentAssistPreference.PREFIX_COMPLETION, true); store.setDefault(ContentAssistPreference.ORDER_PROPOSALS, false); store.setDefault(ContentAssistPreference.ADD_INCLUDE, true); store.setDefault(ContentAssistPreference.PROPOSALS_FILTER, ProposalFilterPreferencesUtil.getProposalFilternamesAsString()); // $NON_NLS 1$ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.java index 7c01ee4fabc..8d8b89cfb4b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -79,7 +79,10 @@ public final class PreferencesMessages extends NLS { public static String CEditorPreferencePage_ContentAssistPage_proposalFilterSelect; public static String CEditorPreferencePage_ContentAssistPage_completionProposalBackgroundColor; public static String CEditorPreferencePage_ContentAssistPage_completionProposalForegroundColor; + public static String CEditorPreferencePage_ContentAssistPage_parameterBackgroundColor; + public static String CEditorPreferencePage_ContentAssistPage_parameterForegroundColor; public static String CEditorPreferencePage_ContentAssistPage_autoActivationEnableDoubleColon; + public static String CEditorPreferencePage_ContentAssistPage_sortingSection_title; public static String CEditorColoringConfigurationBlock_MultiLine; public static String CEditorColoringConfigurationBlock_singleLine; public static String CEditorColoringConfigurationBlock_keywords; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties index 75a782818ce..c0b720ad808 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000, 2006 IBM Corporation and others. +# Copyright (c) 2000, 2007 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -76,14 +76,17 @@ CEditorPreferencePage_ContentAssistPage_insertSingleProposalAutomatically=&Inser CEditorPreferencePage_ContentAssistPage_insertCommonProposalAutomatically=Insert common prefixes automatically CEditorPreferencePage_ContentAssistPage_showProposalsInAlphabeticalOrder=Present proposals in a&lphabetical order CEditorPreferencePage_ContentAssistPage_timeoutDelay=Content Assist parsing &timeout (ms) -CEditorPreferencePage_ContentAssistPage_autoActivationGroupTitle=Auto activation: +CEditorPreferencePage_ContentAssistPage_autoActivationGroupTitle=Auto-Activation CEditorPreferencePage_ContentAssistPage_autoActivationEnableDot=Enable "." as trigger CEditorPreferencePage_ContentAssistPage_autoActivationEnableArrow=Enable "->" as trigger CEditorPreferencePage_ContentAssistPage_autoActivationDelay=dela&y (ms) CEditorPreferencePage_ContentAssistPage_proposalFilterSelect=Completion Proposal Filter: -CEditorPreferencePage_ContentAssistPage_completionProposalBackgroundColor=&Background for completion proposals: -CEditorPreferencePage_ContentAssistPage_completionProposalForegroundColor=&Foreground for completion proposals: +CEditorPreferencePage_ContentAssistPage_completionProposalBackgroundColor=Completion proposal background +CEditorPreferencePage_ContentAssistPage_completionProposalForegroundColor=Completion proposal foreground +CEditorPreferencePage_ContentAssistPage_parameterBackgroundColor=Parameter hint background +CEditorPreferencePage_ContentAssistPage_parameterForegroundColor=Parameter hint foreground CEditorPreferencePage_ContentAssistPage_autoActivationEnableDoubleColon=Enable "::" as trigger +CEditorPreferencePage_ContentAssistPage_sortingSection_title=Sorting and Filtering CEditorColoringConfigurationBlock_MultiLine=Multi-line comment CEditorColoringConfigurationBlock_singleLine=Single-line comment CEditorColoringConfigurationBlock_keywords=Keywords diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistPreference.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistPreference.java index e0ed2e82f50..44657226ead 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistPreference.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistPreference.java @@ -1,12 +1,13 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM - Initial API and implementation + * IBM - Initial API and implementation + * Anton Leherbauer (Wind River Systems) *******************************************************************************/ package org.eclipse.cdt.internal.ui.text.contentassist; @@ -31,7 +32,7 @@ public class ContentAssistPreference { //public final static String AUTOACTIVATION= "content_assist_autoactivation"; /** Preference key for content assist auto activation delay */ public final static String AUTOACTIVATION_DELAY= "content_assist_autoactivation_delay"; //$NON-NLS-1$ - /** Preference key for content assist timeout delay */ + /** Preference key for content assist timeout delay (unused) */ public final static String TIMEOUT_DELAY= "content_assist_timeout_delay"; //$NON-NLS-1$ /** Preference key for content assist proposal color */ public final static String PROPOSALS_FOREGROUND= "content_assist_proposals_foreground"; //$NON-NLS-1$ @@ -44,24 +45,24 @@ public class ContentAssistPreference { /** Preference key for content assist auto insert */ public final static String AUTOINSERT= "content_assist_autoinsert"; //$NON-NLS-1$ /** Preference key for content assist to insert the common prefix */ - public final static String CODEASSIST_PREFIX_COMPLETION= "content_assist_prefix_completion"; //$NON-NLS-1$ + public final static String PREFIX_COMPLETION= "content_assist_prefix_completion"; //$NON-NLS-1$ /** Preference key for C/CPP content assist auto activation triggers */ public final static String AUTOACTIVATION_TRIGGERS_DOT= "content_assist_autoactivation_trigger_dot"; //$NON-NLS-1$ public final static String AUTOACTIVATION_TRIGGERS_ARROW= "content_assist_autoactivation_trigger_arrow"; //$NON-NLS-1$ public final static String AUTOACTIVATION_TRIGGERS_DOUBLECOLON= "content_assist_autoactivation_trigger_doublecolon"; //$NON-NLS-1$ - /** Preference key for visibility of proposals */ + /** Preference key for visibility of proposals (unused) */ public final static String SHOW_DOCUMENTED_PROPOSALS= "content_assist_show_visible_proposals"; //$NON-NLS-1$ /** Preference key for alphabetic ordering of proposals */ public final static String ORDER_PROPOSALS= "content_assist_order_proposals"; //$NON-NLS-1$ /** Preference key for case sensitivity of propsals */ //public final static String CASE_SENSITIVITY= "content_assist_case_sensitivity"; - /** Preference key for adding imports on code assist */ + /** Preference key for adding includes on code assist (unused) */ public final static String ADD_INCLUDE= "content_assist_add_import"; //$NON-NLS-1$ - /** Preference key for completion search scope */ + /** Preference key for completion search scope (unused) */ public final static String CURRENT_FILE_SEARCH_SCOPE= "content_assist_current_file_search_scope"; //$NON-NLS-1$ - /** Preference key for completion search scope */ + /** Preference key for completion search scope (unused) */ public final static String PROJECT_SEARCH_SCOPE= "content_assist_project_search_scope"; //$NON-NLS-1$ /** Preference key for completion filtering */ public final static String PROPOSALS_FILTER= "content_assist_proposal_filter"; //$NON-NLS-1$ @@ -131,7 +132,6 @@ public class ContentAssistPreference { int delay= store.getInt(AUTOACTIVATION_DELAY); assistant.setAutoActivationDelay(delay); - delay= store.getInt(TIMEOUT_DELAY); Color c1= getColor(store, PROPOSALS_FOREGROUND, manager); assistant.setProposalSelectorForeground(c1); @@ -149,7 +149,7 @@ public class ContentAssistPreference { enabled= store.getBoolean(AUTOINSERT); assistant.enableAutoInsert(enabled); - enabled = store.getBoolean(CODEASSIST_PREFIX_COMPLETION); + enabled = store.getBoolean(PREFIX_COMPLETION); assistant.enablePrefixCompletion(enabled); configureCProcessor(assistant, store); @@ -231,6 +231,9 @@ public class ContentAssistPreference { } else if (AUTOINSERT.equals(p)) { boolean enabled= store.getBoolean(AUTOINSERT); assistant.enableAutoInsert(enabled); + } else if (PREFIX_COMPLETION.equals(p)) { + boolean enabled= store.getBoolean(PREFIX_COMPLETION); + assistant.enablePrefixCompletion(enabled); } changeCProcessor(assistant, store, p);