diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 3a21d9270da..2586462e7ac 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,7 @@ +2004-02-10 Hoda Amer + Content Assist Preference : Reduced search options to two choices: + Current file (plus its included files) + Current project (plus its included paths) + 2004-02-10 Alain Magloire Fix to PR 50794 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 bea282691c3..c5d6d27054d 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 @@ -198,11 +198,9 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_DOUBLECOLON)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.SHOW_DOCUMENTED_PROPOSALS)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ORDER_PROPOSALS)); - //overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.CASE_SENSITIVITY)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ADD_INCLUDE)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.CURRENT_FILE_SEARCH_SCOPE)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.PROJECT_SEARCH_SCOPE)); - overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.PROJECT_AND_DEPENDENCY_SEARCH_SCOPE)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_TASK_TAG_COLOR)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_TASK_TAG_BOLD)); overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_TASK_INDICATION_COLOR)); @@ -279,7 +277,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP store.setDefault(ContentAssistPreference.CURRENT_FILE_SEARCH_SCOPE, true); store.setDefault(ContentAssistPreference.PROJECT_SEARCH_SCOPE, false); - store.setDefault(ContentAssistPreference.PROJECT_AND_DEPENDENCY_SEARCH_SCOPE, false); store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_DOT, true); store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_ARROW, true); @@ -291,10 +288,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP 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.AUTOACTIVATION_TRIGGERS_C, ".,"); - //store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, "@"); - //store.setDefault(ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, true); - //store.setDefault(ContentAssistPreference.CASE_SENSITIVITY, false); store.setDefault(ContentAssistPreference.ORDER_PROPOSALS, false); store.setDefault(ContentAssistPreference.ADD_INCLUDE, true); @@ -850,8 +843,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.searchGroupCurrentProjectOption"); addRadioButton(searchGroup, label, ContentAssistPreference.PROJECT_SEARCH_SCOPE, 0); - label= PreferencesMessages.getString("CEditorPreferencePage.ContentAssistPage.searchGroupCurrentProjectAndDependenciesOption"); - addRadioButton(searchGroup, label, ContentAssistPreference.PROJECT_AND_DEPENDENCY_SEARCH_SCOPE, 0); //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java index 75be5dc7ee5..6f083d7f57f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CCompletionProcessor.java @@ -512,10 +512,9 @@ public class CCompletionProcessor implements IContentAssistProcessor { IPreferenceStore store = CUIPlugin.getDefault().getPreferenceStore(); boolean fileScope = store.getBoolean(ContentAssistPreference.CURRENT_FILE_SEARCH_SCOPE); boolean projectScope = store.getBoolean(ContentAssistPreference.PROJECT_SEARCH_SCOPE); - boolean projectScopeAndDependency = store.getBoolean(ContentAssistPreference.PROJECT_AND_DEPENDENCY_SEARCH_SCOPE); ICSearchScope scope = null; - if (((projectScope) || (projectScopeAndDependency)) + if ( (projectScope) && ( (completionNode.getCompletionKind() == IASTCompletionNode.CompletionKind.SINGLE_NAME_REFERENCE) || (completionNode.getCompletionKind() == IASTCompletionNode.CompletionKind.SINGLE_NAME_REFERENCE) || (completionNode.getCompletionKind() == IASTCompletionNode.CompletionKind.VARIABLE_TYPE) @@ -525,7 +524,7 @@ public class CCompletionProcessor implements IContentAssistProcessor { ICElement[] projectScopeElement = new ICElement[1]; projectScopeElement[0] = (ICElement)fCurrentSourceUnit.getCProject(); - scope = SearchEngine.createCSearchScope(projectScopeElement, projectScopeAndDependency); + scope = SearchEngine.createCSearchScope(projectScopeElement, true); // search for global variables, functions, classes, structs, unions, enums, macros, and namespaces OrPattern orPattern = new OrPattern(); 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 a7fcaab501a..51219cbb816 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 @@ -54,8 +54,6 @@ public class ContentAssistPreference { public final static String CURRENT_FILE_SEARCH_SCOPE= "content_assist_current_file_search_scope"; /** Preference key for completion search scope */ public final static String PROJECT_SEARCH_SCOPE= "content_assist_project_search_scope"; - /** Preference key for completion search scope */ - public final static String PROJECT_AND_DEPENDENCY_SEARCH_SCOPE= "content_assist_project_and_dependency_search_scope"; private static Color getColor(IPreferenceStore store, String key, IColorManager manager) { RGB rgb= PreferenceConverter.getColor(store, key);