Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoopur Gupta2015-12-08 11:42:54 +0000
committerNoopur Gupta2015-12-08 11:42:54 +0000
commit72e462e9ef7843806c83c04a17ed2dd34dcc7c52 (patch)
tree8c427626aa51f2c7b802928b6a1c8ee0c30584f7
parenta0135375c7f4f85b769b2a731e6e1a3574906394 (diff)
downloadeclipse.jdt.ui-72e462e9ef7843806c83c04a17ed2dd34dcc7c52.tar.gz
eclipse.jdt.ui-72e462e9ef7843806c83c04a17ed2dd34dcc7c52.tar.xz
eclipse.jdt.ui-72e462e9ef7843806c83c04a17ed2dd34dcc7c52.zip
Fixed bug 483895: [content assist] Disable and remove substring
completion from Preferences
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java8
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java
index 241e0f3a7c..324e6d6464 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java
@@ -77,7 +77,7 @@ class CodeAssistConfigurationBlock extends OptionsConfigurationBlock {
private static final Key PREF_CODEASSIST_PREFIX_COMPLETION= getJDTUIKey(PreferenceConstants.CODEASSIST_PREFIX_COMPLETION);
private static final Key PREF_CODEASSIST_DEPRECATION_CHECK= getJDTCoreKey(JavaCore.CODEASSIST_DEPRECATION_CHECK);
private static final Key PREF_CODEASSIST_CAMEL_CASE_MATCH= getJDTCoreKey(JavaCore.CODEASSIST_CAMEL_CASE_MATCH);
- private static final Key PREF_CODEASSIST_SUBSTRING_MATCH= getJDTCoreKey(JavaCore.CODEASSIST_SUBSTRING_MATCH);
+// private static final Key PREF_CODEASSIST_SUBSTRING_MATCH= getJDTCoreKey(JavaCore.CODEASSIST_SUBSTRING_MATCH);
private static Key[] getAllKeys() {
return new Key[] {
@@ -97,7 +97,7 @@ class CodeAssistConfigurationBlock extends OptionsConfigurationBlock {
PREF_CODEASSIST_PREFIX_COMPLETION,
PREF_CODEASSIST_DEPRECATION_CHECK,
PREF_CODEASSIST_CAMEL_CASE_MATCH,
- PREF_CODEASSIST_SUBSTRING_MATCH
+// PREF_CODEASSIST_SUBSTRING_MATCH
};
}
@@ -276,8 +276,8 @@ class CodeAssistConfigurationBlock extends OptionsConfigurationBlock {
label= PreferencesMessages.CodeAssistConfigurationBlock_matchCamelCase_label;
addCheckBox(composite, label, PREF_CODEASSIST_CAMEL_CASE_MATCH, enabledDisabled, 0);
- label= PreferencesMessages.CodeAssistConfigurationBlock_matchSubstring_label;
- addCheckBox(composite, label, PREF_CODEASSIST_SUBSTRING_MATCH, enabledDisabled, 0);
+ /*label= PreferencesMessages.CodeAssistConfigurationBlock_matchSubstring_label;
+ addCheckBox(composite, label, PREF_CODEASSIST_SUBSTRING_MATCH, enabledDisabled, 0);*/
label= PreferencesMessages.JavaEditorPreferencePage_showOnlyProposalsVisibleInTheInvocationContext;
addCheckBox(composite, label, PREF_CODEASSIST_SHOW_VISIBLE_PROPOSALS, trueFalse, 0);
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
index 84e35dae02..a231df158f 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
@@ -883,8 +883,8 @@ public abstract class AbstractJavaCompletionProposal implements IJavaCompletionP
return false;
String start= string.substring(0, prefix.length());
return start.equalsIgnoreCase(prefix) ||
- isCamelCaseMatching() && CharOperation.camelCaseMatch(prefix.toCharArray(), string.toCharArray()) ||
- isSubstringMatching() && CharOperation.substringMatch(prefix.toCharArray(), string.toCharArray());
+ isCamelCaseMatching() && CharOperation.camelCaseMatch(prefix.toCharArray(), string.toCharArray())/* ||
+ isSubstringMatching() && CharOperation.substringMatch(prefix.toCharArray(), string.toCharArray())*/;
}
/**

Back to the top